@@ -70,7 +70,7 @@ |
||
70 | 70 | } |
71 | 71 | |
72 | 72 | $errors = array_map( |
73 | - static function (array $error): string { |
|
73 | + static function(array $error): string { |
|
74 | 74 | return sprintf('[%s] %s%s', $error['property'], $error['message'], PHP_EOL); |
75 | 75 | }, |
76 | 76 | $validator->getErrors() |
@@ -96,7 +96,7 @@ |
||
96 | 96 | |
97 | 97 | private function getValidator(): Closure |
98 | 98 | { |
99 | - return static function ($answerPath) { |
|
99 | + return static function($answerPath) { |
|
100 | 100 | $answerPath = $answerPath ? trim($answerPath) : $answerPath; |
101 | 101 | |
102 | 102 | if (!$answerPath || !file_exists($answerPath)) { |
@@ -111,7 +111,7 @@ |
||
111 | 111 | |
112 | 112 | private function getValidator(string $testFramework): Closure |
113 | 113 | { |
114 | - return function (string $answerDir) use ($testFramework): string { |
|
114 | + return function(string $answerDir) use ($testFramework): string { |
|
115 | 115 | $answerDir = trim($answerDir); |
116 | 116 | |
117 | 117 | if (!$answerDir) { |
@@ -106,7 +106,7 @@ |
||
106 | 106 | if (is_array($path)) { |
107 | 107 | array_walk_recursive( |
108 | 108 | $path, |
109 | - function ($el) use (&$dirs): void { |
|
109 | + function($el) use (&$dirs): void { |
|
110 | 110 | $this->parsePath($el, $dirs); |
111 | 111 | } |
112 | 112 | ); |
@@ -50,7 +50,7 @@ |
||
50 | 50 | public function colorize(string $diff): string |
51 | 51 | { |
52 | 52 | $lines = array_map( |
53 | - static function (string $line) { |
|
53 | + static function(string $line) { |
|
54 | 54 | if (strpos($line, '-') === 0) { |
55 | 55 | return sprintf('<diff-del>%s</diff-del>', $line); |
56 | 56 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | */ |
88 | 88 | public function generate(Node $node): iterable |
89 | 89 | { |
90 | - yield from take($this->mutators)->map(function (Mutator $mutator) use ($node) { |
|
90 | + yield from take($this->mutators)->map(function(Mutator $mutator) use ($node) { |
|
91 | 91 | yield from $this->generateForMutator($node, $mutator); |
92 | 92 | }); |
93 | 93 | } |
@@ -189,7 +189,7 @@ |
||
189 | 189 | return implode( |
190 | 190 | PHP_EOL, |
191 | 191 | array_map( |
192 | - static function (string $line): string { |
|
192 | + static function(string $line): string { |
|
193 | 193 | return ' ' . $line; |
194 | 194 | }, |
195 | 195 | explode(PHP_EOL, Str::trimLineReturns($value)) |
@@ -108,7 +108,7 @@ |
||
108 | 108 | * and that last clause is to covert them, or any other non-Iterator object, to |
109 | 109 | * a Generator which is an Iterator. Traversable types are complicated, right. |
110 | 110 | */ |
111 | - return (static function () use ($input): Iterator { |
|
111 | + return (static function() use ($input): Iterator { |
|
112 | 112 | yield from $input; |
113 | 113 | })(); |
114 | 114 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | private static function makeCheckingMinArgsMapper(int $minimumArgsCount, Closure $converter): Closure |
183 | 183 | { |
184 | - return static function (Node\Expr\FuncCall $node) use ($minimumArgsCount, $converter): iterable { |
|
184 | + return static function(Node\Expr\FuncCall $node) use ($minimumArgsCount, $converter): iterable { |
|
185 | 185 | if (count($node->args) >= $minimumArgsCount) { |
186 | 186 | yield from $converter($node); |
187 | 187 | } |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | */ |
196 | 196 | private static function makeCastToStringMapper(Closure $converter): Closure |
197 | 197 | { |
198 | - return static function (Node\Expr\FuncCall $node) use ($converter): iterable { |
|
198 | + return static function(Node\Expr\FuncCall $node) use ($converter): iterable { |
|
199 | 199 | foreach ($converter($node) as $newNode) { |
200 | 200 | yield new Node\Expr\Cast\String_($newNode); |
201 | 201 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | private static function makeBinaryOperatorMapper(string $operator): Closure |
211 | 211 | { |
212 | - return static function (Node\Expr\FuncCall $node) use ($operator): iterable { |
|
212 | + return static function(Node\Expr\FuncCall $node) use ($operator): iterable { |
|
213 | 213 | yield new $operator($node->args[0]->value, $node->args[1]->value); |
214 | 214 | }; |
215 | 215 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | */ |
220 | 220 | private static function makeSquareRootsMapper(): Closure |
221 | 221 | { |
222 | - return static function (Node\Expr\FuncCall $node): iterable { |
|
222 | + return static function(Node\Expr\FuncCall $node): iterable { |
|
223 | 223 | yield new Node\Expr\FuncCall(new Node\Name('\sqrt'), [$node->args[0]]); |
224 | 224 | }; |
225 | 225 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | private static function makePowerModuloMapper(): Closure |
231 | 231 | { |
232 | - return static function (Node\Expr\FuncCall $node): iterable { |
|
232 | + return static function(Node\Expr\FuncCall $node): iterable { |
|
233 | 233 | yield new Node\Expr\BinaryOp\Mod( |
234 | 234 | new Node\Expr\FuncCall( |
235 | 235 | new Node\Name('\pow'), |