@@ -14,13 +14,13 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function __construct( |
| 16 | 16 | private readonly int $counter, |
| 17 | - ) { |
|
| 17 | + ){ |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function intercept(CallContextInterface $context, HandlerInterface $handler): mixed |
| 21 | 21 | { |
| 22 | 22 | $this->result = []; |
| 23 | - for ($i = 0; $i < $this->counter; ++$i) { |
|
| 23 | + for ($i = 0; $i < $this->counter; ++$i){ |
|
| 24 | 24 | $this->result[] = $handler->handle($context); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -20,7 +20,8 @@ |
||
| 20 | 20 | public function intercept(CallContextInterface $context, HandlerInterface $handler): mixed |
| 21 | 21 | { |
| 22 | 22 | $this->result = []; |
| 23 | - for ($i = 0; $i < $this->counter; ++$i) { |
|
| 23 | + for ($i = 0; $i < $this->counter; ++$i) |
|
| 24 | + { |
|
| 24 | 25 | $this->result[] = $handler->handle($context); |
| 25 | 26 | } |
| 26 | 27 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** @internal */ |
| 23 | 23 | protected ContainerInterface $container, |
| 24 | 24 | protected bool $resolveFromPath = true, |
| 25 | - ) { |
|
| 25 | + ){ |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -34,14 +34,14 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | // Resolve controller method |
| 36 | 36 | $method = $context->getTarget()->getReflection(); |
| 37 | - if ($method === null) { |
|
| 37 | + if ($method === null){ |
|
| 38 | 38 | $this->resolveFromPath or throw new TargetCallException( |
| 39 | 39 | "Reflection not provided for target `{$context->getTarget()}`.", |
| 40 | 40 | TargetCallException::NOT_FOUND, |
| 41 | 41 | ); |
| 42 | 42 | |
| 43 | 43 | $path = $context->getTarget()->getPath(); |
| 44 | - if (\count($path) !== 2) { |
|
| 44 | + if (\count($path) !== 2){ |
|
| 45 | 45 | throw new TargetCallException( |
| 46 | 46 | "Invalid target path to resolve reflection for `{$context->getTarget()}`." |
| 47 | 47 | . ' Expected two parts: class and method.', |
@@ -52,13 +52,13 @@ discard block |
||
| 52 | 52 | $method = ActionResolver::pathToReflection(\reset($path), \end($path)); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - if ($method instanceof \ReflectionFunction) { |
|
| 55 | + if ($method instanceof \ReflectionFunction){ |
|
| 56 | 56 | return $method->invokeArgs( |
| 57 | 57 | $this->resolveArguments($method, $context) |
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - if (!$method instanceof \ReflectionMethod) { |
|
| 61 | + if (!$method instanceof \ReflectionMethod){ |
|
| 62 | 62 | throw new TargetCallException("Action not found for target `{$context->getTarget()}`."); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -34,14 +34,16 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | // Resolve controller method |
| 36 | 36 | $method = $context->getTarget()->getReflection(); |
| 37 | - if ($method === null) { |
|
| 37 | + if ($method === null) |
|
| 38 | + { |
|
| 38 | 39 | $this->resolveFromPath or throw new TargetCallException( |
| 39 | 40 | "Reflection not provided for target `{$context->getTarget()}`.", |
| 40 | 41 | TargetCallException::NOT_FOUND, |
| 41 | 42 | ); |
| 42 | 43 | |
| 43 | 44 | $path = $context->getTarget()->getPath(); |
| 44 | - if (\count($path) !== 2) { |
|
| 45 | + if (\count($path) !== 2) |
|
| 46 | + { |
|
| 45 | 47 | throw new TargetCallException( |
| 46 | 48 | "Invalid target path to resolve reflection for `{$context->getTarget()}`." |
| 47 | 49 | . ' Expected two parts: class and method.', |
@@ -52,13 +54,15 @@ discard block |
||
| 52 | 54 | $method = ActionResolver::pathToReflection(\reset($path), \end($path)); |
| 53 | 55 | } |
| 54 | 56 | |
| 55 | - if ($method instanceof \ReflectionFunction) { |
|
| 57 | + if ($method instanceof \ReflectionFunction) |
|
| 58 | + { |
|
| 56 | 59 | return $method->invokeArgs( |
| 57 | 60 | $this->resolveArguments($method, $context) |
| 58 | 61 | ); |
| 59 | 62 | } |
| 60 | 63 | |
| 61 | - if (!$method instanceof \ReflectionMethod) { |
|
| 64 | + if (!$method instanceof \ReflectionMethod) |
|
| 65 | + { |
|
| 62 | 66 | throw new TargetCallException("Action not found for target `{$context->getTarget()}`."); |
| 63 | 67 | } |
| 64 | 68 | |