@@ -23,19 +23,23 @@ |
||
| 23 | 23 | ): object { |
| 24 | 24 | $c ??= ContainerScope::getContainer() ?? throw new ContainerException('Proxy is out of scope.'); |
| 25 | 25 | |
| 26 | - try { |
|
| 26 | + try |
|
| 27 | + { |
|
| 27 | 28 | /** @psalm-suppress TooManyArguments */ |
| 28 | 29 | $result = $c->get($alias, $context) ?? throw new ContainerException( |
| 29 | 30 | 'Resolved `null` from the container.', |
| 30 | 31 | ); |
| 31 | - } catch (\Throwable $e) { |
|
| 32 | + } |
|
| 33 | + catch (\Throwable $e) |
|
| 34 | + { |
|
| 32 | 35 | throw new ContainerException( |
| 33 | 36 | \sprintf('Unable to resolve `%s` in a Proxy in `%s` scope.', $alias, self::getScope($c)), |
| 34 | 37 | previous: $e, |
| 35 | 38 | ); |
| 36 | 39 | } |
| 37 | 40 | |
| 38 | - if (Proxy::isProxy($result)) { |
|
| 41 | + if (Proxy::isProxy($result)) |
|
| 42 | + { |
|
| 39 | 43 | throw new RecursiveProxyException( |
| 40 | 44 | \sprintf('Recursive proxy detected for `%s` in `%s` scope.', $alias, self::getScope($c)), |
| 41 | 45 | ); |