@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function __construct( |
| 30 | 30 | /** @internal */ |
| 31 | 31 | #[Proxy] protected ContainerInterface $container |
| 32 | - ) { |
|
| 32 | + ){ |
|
| 33 | 33 | // TODO: can we simplify this? |
| 34 | 34 | // resolver is usually the container itself |
| 35 | 35 | /** @psalm-suppress MixedAssignment */ |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | ? $container |
| 38 | 38 | : $container |
| 39 | 39 | ->get(InvokerInterface::class) |
| 40 | - ->invoke(static fn (#[Proxy] ResolverInterface $resolver): ResolverInterface => $resolver); |
|
| 40 | + ->invoke(static fn (#[Proxy] ResolverInterface $resolver) : ResolverInterface => $resolver); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | protected function resolveArguments(\ReflectionMethod $method, array $parameters): array |
| 67 | 67 | { |
| 68 | - foreach ($method->getParameters() as $parameter) { |
|
| 68 | + foreach ($method->getParameters() as $parameter){ |
|
| 69 | 69 | $name = $parameter->getName(); |
| 70 | 70 | if ( |
| 71 | 71 | \array_key_exists($name, $parameters) && |
| 72 | 72 | $parameters[$name] === null && |
| 73 | 73 | $parameter->isDefaultValueAvailable() |
| 74 | - ) { |
|
| 74 | + ){ |
|
| 75 | 75 | /** @psalm-suppress MixedAssignment */ |
| 76 | 76 | $parameters[$name] = $parameter->getDefaultValue(); |
| 77 | 77 | } |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | private function invoke(?object $object, string $class, \ReflectionMethod $method, array $arguments): mixed |
| 88 | 88 | { |
| 89 | - try { |
|
| 89 | + try{ |
|
| 90 | 90 | $args = $this->resolveArguments($method, $arguments); |
| 91 | - } catch (ArgumentResolvingException | InvalidArgumentException $e) { |
|
| 91 | + }catch (ArgumentResolvingException | InvalidArgumentException $e){ |
|
| 92 | 92 | throw new ControllerException( |
| 93 | 93 | \sprintf( |
| 94 | 94 | 'Missing/invalid parameter %s of `%s`->`%s`', |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | ControllerException::BAD_ARGUMENT, |
| 100 | 100 | $e, |
| 101 | 101 | ); |
| 102 | - } catch (ContainerExceptionInterface $e) { |
|
| 102 | + }catch (ContainerExceptionInterface $e){ |
|
| 103 | 103 | throw new ControllerException( |
| 104 | 104 | $e->getMessage(), |
| 105 | 105 | ControllerException::ERROR, |