@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | function collapse(array $list): array |
17 | 17 | { |
18 | - return array_reduce($list, function ($carry, $item) { |
|
18 | + return array_reduce($list, function($carry, $item) { |
|
19 | 19 | return is_array($item) ? array_merge($carry, $item) : append($item, $carry); |
20 | 20 | }, []); |
21 | 21 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | function |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | function |
@@ -19,7 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | return array_reduce( |
21 | 21 | $pairs, |
22 | - function ($carry, $item) { |
|
22 | + function($carry, $item) { |
|
23 | 23 | list ($key, $value) = $item; |
24 | 24 | |
25 | 25 | return array_merge($carry, [$key => $value]); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | function unique(array $list): array |
19 | 19 | { |
20 | - $reducer = function ($carry, $item) { |
|
20 | + $reducer = function($carry, $item) { |
|
21 | 21 | return in_array($item, $carry, true) ? $carry : append($item, $carry); |
22 | 22 | }; |
23 | 23 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | function |
@@ -30,7 +30,7 @@ |
||
30 | 30 | function typeCond(array $pairs): \Closure |
31 | 31 | { |
32 | 32 | $typeToPredicate = ifElse('\\is_callable', identity, is); |
33 | - $mapRow = function ($row) use ($typeToPredicate) { |
|
33 | + $mapRow = function($row) use ($typeToPredicate) { |
|
34 | 34 | $p = $typeToPredicate($row[0]); |
35 | 35 | return [$p, $row[1]]; |
36 | 36 | }; |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $middle = count($numbers) / 2; |
24 | 24 | $even = (0 === $middle % 2); |
25 | 25 | |
26 | - $offsets = $even ? [$middle - 1, 2] : [(int)floor($middle), 1]; |
|
26 | + $offsets = $even ? [$middle - 1, 2] : [(int) floor($middle), 1]; |
|
27 | 27 | $slice = array_slice($numbers, ...$offsets); |
28 | 28 | |
29 | 29 | return mean($slice); |
@@ -35,7 +35,7 @@ |