@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | public readonly string $container = Container::class, |
51 | 51 | public readonly string $binder = Binder::class, |
52 | 52 | public readonly string $invoker = Invoker::class, |
53 | - ) { |
|
53 | + ){ |
|
54 | 54 | $this->scope = Scope::class; |
55 | 55 | $this->scopedBindings = new Internal\Config\StateStorage(); |
56 | 56 | $this->actor = Actor::class; |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function lockRoot(): bool |
77 | 77 | { |
78 | - try { |
|
78 | + try{ |
|
79 | 79 | return $this->rootLocked; |
80 | - } finally { |
|
80 | + }finally{ |
|
81 | 81 | $this->rootLocked = false; |
82 | 82 | } |
83 | 83 | } |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | public function __construct( |
23 | 23 | callable $callable, |
24 | 24 | public readonly bool $singleton = false, |
25 | - ) { |
|
25 | + ){ |
|
26 | 26 | $this->factory = $callable(...); |
27 | 27 | $reflection = new \ReflectionFunction($this->factory); |
28 | 28 | $this->parametersCount = $reflection->getNumberOfParameters(); |
29 | 29 | |
30 | 30 | // Detect the return type of the factory |
31 | - $returnType = (string) $reflection->getReturnType(); |
|
31 | + $returnType = (string)$reflection->getReturnType(); |
|
32 | 32 | $this->returnClass = \class_exists($returnType) ? $returnType : null; |
33 | 33 | |
34 | 34 | /** @psalm-suppress TypeDoesNotContainType */ |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | \is_object($callable[0]) ? $callable[0]::class : $callable[0], |
40 | 40 | $callable[1], |
41 | 41 | ), |
42 | - \is_object($callable) && $callable::class !== \Closure::class => 'object ' . $callable::class, |
|
42 | + \is_object($callable) && $callable::class !== \Closure::class => 'object '.$callable::class, |
|
43 | 43 | default => null, |
44 | 44 | }; |
45 | 45 | } |
@@ -12,11 +12,11 @@ |
||
12 | 12 | public function __construct( |
13 | 13 | public readonly object $value, |
14 | 14 | public readonly bool $singleton = false, |
15 | - ) {} |
|
15 | + ){} |
|
16 | 16 | |
17 | 17 | public function __toString(): string |
18 | 18 | { |
19 | - return 'Shared object of class ' . $this->value::class; |
|
19 | + return 'Shared object of class '.$this->value::class; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | ?\Throwable $previous = null, |
27 | 27 | ): static { |
28 | 28 | $result = new static( |
29 | - $message . ($traces === [] ? '' : "\nResolving trace:\n" . Tracer::renderTraceList($traces)), |
|
30 | - previous: $previous, |
|
29 | + $message.($traces === [] ? '' : "\nResolving trace:\n".Tracer::renderTraceList($traces)), |
|
30 | + previous : $previous, |
|
31 | 31 | ); |
32 | 32 | $result->originalMessage = $message; |
33 | 33 | $result->containerTrace = $traces; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public static function extendTracedException(string $message, array $traces, self $exception): static |
38 | 38 | { |
39 | 39 | $merge = $exception->containerTrace; |
40 | - if ($traces !== [] && $merge !== []) { |
|
40 | + if ($traces !== [] && $merge !== []){ |
|
41 | 41 | // merge lat element of $traces with first element of $merge |
42 | 42 | \array_push($traces[\count($traces) - 1], ...$merge[0]); |
43 | 43 | unset($merge[0]); |
@@ -37,7 +37,8 @@ |
||
37 | 37 | public static function extendTracedException(string $message, array $traces, self $exception): static |
38 | 38 | { |
39 | 39 | $merge = $exception->containerTrace; |
40 | - if ($traces !== [] && $merge !== []) { |
|
40 | + if ($traces !== [] && $merge !== []) |
|
41 | + { |
|
41 | 42 | // merge lat element of $traces with first element of $merge |
42 | 43 | \array_push($traces[\count($traces) - 1], ...$merge[0]); |
43 | 44 | unset($merge[0]); |
@@ -7,4 +7,4 @@ |
||
7 | 7 | /** |
8 | 8 | * When class can not be created. |
9 | 9 | */ |
10 | -class AutowireException extends TracedContainerException {} |
|
10 | +class AutowireException extends TracedContainerException{} |
@@ -7,4 +7,6 @@ |
||
7 | 7 | /** |
8 | 8 | * When class can not be created. |
9 | 9 | */ |
10 | -class AutowireException extends TracedContainerException {} |
|
10 | +class AutowireException extends TracedContainerException |
|
11 | +{ |
|
12 | +} |