@@ -62,7 +62,7 @@ |
||
62 | 62 | if (\is_object($callable) && ($callable instanceof \Closure)) { |
63 | 63 | $this->closure = $callable; |
64 | 64 | } elseif (\is_callable($callable)) { |
65 | - $this->closure = function () use ($callable) { |
|
65 | + $this->closure = function() use ($callable) { |
|
66 | 66 | return \call_user_func_array($callable, \func_get_args()); |
67 | 67 | }; |
68 | 68 | } else { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | public function testFromClosure() |
36 | 36 | { |
37 | 37 | $this |
38 | - ->given($closure = function () { |
|
38 | + ->given($closure = function() { |
|
39 | 39 | |
40 | 40 | }) |
41 | 41 | ->when($delegate = Delegate::fromClosure($closure)) |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->object($delegate) |
70 | 70 | ->isInstanceOf(Delegate::class) |
71 | 71 | ->exception( |
72 | - function () { |
|
72 | + function() { |
|
73 | 73 | Delegate::fromFunction('foo'); |
74 | 74 | } |
75 | 75 | )->isInstanceOf(\InvalidArgumentException::class) |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | public function testInvoke() |
83 | 83 | { |
84 | 84 | $this |
85 | - ->given($closure = function ($value = null) { |
|
85 | + ->given($closure = function($value = null) { |
|
86 | 86 | return $value; |
87 | 87 | }) |
88 | 88 | ->when($delegate = Delegate::fromClosure($closure)) |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ->isEqualTo('text-sufix') |
96 | 96 | ->given($delegate = Delegate::fromFunction('array_filter')) |
97 | 97 | ->then() |
98 | - ->array($delegate(['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5], function ($value) { |
|
98 | + ->array($delegate(['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5], function($value) { |
|
99 | 99 | return $value % 2 === 0; |
100 | 100 | })) |
101 | 101 | ->isEqualTo(['b' => 2, 'd' => 4]) |