@@ -28,12 +28,12 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function handleError(\Throwable $exception): void |
| 30 | 30 | { |
| 31 | - $next = function () { |
|
| 31 | + $next = function() { |
|
| 32 | 32 | // NO-OP |
| 33 | 33 | }; |
| 34 | 34 | |
| 35 | 35 | foreach ($this->middleware as $middleware) { |
| 36 | - $next = function (\Throwable $exception) use ($middleware, $next) { |
|
| 36 | + $next = function(\Throwable $exception) use ($middleware, $next) { |
|
| 37 | 37 | return $middleware->handleError($exception, $next); |
| 38 | 38 | }; |
| 39 | 39 | } |
@@ -46,12 +46,12 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function handleExecutionError(ExecutionException $exception, ExecutionContext $context): void |
| 48 | 48 | { |
| 49 | - $next = function () { |
|
| 49 | + $next = function() { |
|
| 50 | 50 | // NO-OP |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | foreach ($this->middleware as $middleware) { |
| 54 | - $next = function (ExecutionException $exception, ExecutionContext $context) use ($middleware, $next) { |
|
| 54 | + $next = function(ExecutionException $exception, ExecutionContext $context) use ($middleware, $next) { |
|
| 55 | 55 | return $middleware->handleExecutionError($exception, $context, $next); |
| 56 | 56 | }; |
| 57 | 57 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public function getLocationsAsArray(): ?array |
| 162 | 162 | { |
| 163 | - return !empty($this->locations) ? \array_map(function (SourceLocation $location) { |
|
| 163 | + return !empty($this->locations) ? \array_map(function(SourceLocation $location) { |
|
| 164 | 164 | return $location->toArray(); |
| 165 | 165 | }, $this->locations) : null; |
| 166 | 166 | } |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $nodes = [$nodes]; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - $this->nodes = \array_filter($nodes, function ($node) { |
|
| 248 | + $this->nodes = \array_filter($nodes, function($node) { |
|
| 249 | 249 | return null !== $node; |
| 250 | 250 | }); |
| 251 | 251 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | protected function resolvePositions(?array $positions): self |
| 277 | 277 | { |
| 278 | 278 | if (null === $positions && !empty($this->nodes)) { |
| 279 | - $positions = \array_reduce($this->nodes, function (array $list, ?NodeInterface $node) { |
|
| 279 | + $positions = \array_reduce($this->nodes, function(array $list, ?NodeInterface $node) { |
|
| 280 | 280 | if (null !== $node) { |
| 281 | 281 | $location = $node->getLocation(); |
| 282 | 282 | if (null !== $location) { |
@@ -306,11 +306,11 @@ discard block |
||
| 306 | 306 | $locations = null; |
| 307 | 307 | |
| 308 | 308 | if (null !== $positions && null !== $source) { |
| 309 | - $locations = \array_map(function ($position) use ($source) { |
|
| 309 | + $locations = \array_map(function($position) use ($source) { |
|
| 310 | 310 | return SourceLocation::fromSource($source, $position); |
| 311 | 311 | }, $positions); |
| 312 | 312 | } elseif (!empty($this->nodes)) { |
| 313 | - $locations = \array_reduce($this->nodes, function (array $list, NodeInterface $node) { |
|
| 313 | + $locations = \array_reduce($this->nodes, function(array $list, NodeInterface $node) { |
|
| 314 | 314 | $location = $node->getLocation(); |
| 315 | 315 | if (null !== $location) { |
| 316 | 316 | $list[] = SourceLocation::fromSource($location->getSource(), $location->getStart()); |