Skip to content

Commit

Permalink
Fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
pszczekutowicz authored and dima committed Nov 27, 2014
1 parent 0e6131a commit a1ad0e4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,18 @@ public function __construct(array $mapping, array $reverse = null)
/**
* Safelly flip mapping array.
*
* @param array $array Array to flip
* @return array Flipped array
* @param array $array Array to flip
* @return array Flipped array
* @throws InvalidArgumentException
*/
protected function flipMapping(array $array)
{
array_walk($array, function($value) {
array_walk($array, function ($value) {
if (!is_string($value) && !is_int($value)) {
throw new InvalidArgumentException('Mapping array can\'t be flipped because of invalid value');
}
});

return array_flip($array);
}

Expand Down

0 comments on commit a1ad0e4

Please sign in to comment.