@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $out[] = [ |
20 | 20 | [1, 2, 3, 4, 5, 6], |
21 | - function ($item) { |
|
21 | + function($item) { |
|
22 | 22 | return ($item % 2) == 0; |
23 | 23 | }, |
24 | 24 | [1, 2 => 3, 4 => 5] |
@@ -54,7 +54,7 @@ |
||
54 | 54 | ['color' => 'blue', 'title' => 'foo'], |
55 | 55 | ['color' => 'blue', 'title' => 'bar'], |
56 | 56 | ], |
57 | - function ($item) { |
|
57 | + function($item) { |
|
58 | 58 | return $item['color']; |
59 | 59 | } |
60 | 60 | ], |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | public function testLast() |
17 | 17 | { |
18 | - $array = range(1,9); |
|
18 | + $array = range(1, 9); |
|
19 | 19 | |
20 | 20 | $result = Funct\collection_last($array); |
21 | 21 | $this->assertEquals(9, $result); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | public function testFirst() |
17 | 17 | { |
18 | - $array = range(1,9); |
|
18 | + $array = range(1, 9); |
|
19 | 19 | |
20 | 20 | $result = Funct\collection_first($array); |
21 | 21 | $this->assertEquals(1, $result); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | ['color' => 'blue', 'title' => 'foo'], |
46 | 46 | ['color' => 'blue', 'title' => 'bar'], |
47 | 47 | ], |
48 | - function ($item) { |
|
48 | + function($item) { |
|
49 | 49 | return $item['color']; |
50 | 50 | } |
51 | 51 | ], |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $out[] = [ |
38 | 38 | [2, 4, 6, 8], |
39 | - function ($item) { |
|
39 | + function($item) { |
|
40 | 40 | return ($item % 2) === 0; |
41 | 41 | }, |
42 | 42 | true |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $out[] = [ |
46 | 46 | [1, 3, 5, 7, 8], |
47 | - function ($item) { |
|
47 | + function($item) { |
|
48 | 48 | return ($item % 2) !== 0; |
49 | 49 | }, |
50 | 50 | false |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -call_user_func(function () { |
|
3 | +call_user_func(function() { |
|
4 | 4 | static $functions = [ |
5 | 5 | 'CodeBlocks\\Invoke\\invoke_if', |
6 | 6 | 'CodeBlocks\\Invoke\\invoke_if_isset', |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | $input = preg_replace_callback( |
28 | 28 | '/[-_\s]+(.)?/u', |
29 | - function ($match) { |
|
29 | + function($match) { |
|
30 | 30 | if (isset($match[1])) { |
31 | 31 | return strtoupper($match[1]); |
32 | 32 | } else { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | $input = preg_replace_callback( |
40 | 40 | '/[\d]+(.)?/u', |
41 | - function ($match) { |
|
41 | + function($match) { |
|
42 | 42 | return strtoupper($match[0]); |
43 | 43 | }, |
44 | 44 | $input |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | return preg_replace_callback( |
22 | 22 | '/([\S]+)/u', |
23 | - function ($match) use ($ignore) { |
|
23 | + function($match) use ($ignore) { |
|
24 | 24 | if (in_array(strtolower($match[0]), $ignore)) { |
25 | 25 | return $match[0]; |
26 | 26 | } else { |