@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | use DestructorTrait; |
20 | 20 | |
21 | 21 | private State $state; |
22 | - private FactoryInterface|Factory $factory; |
|
22 | + private FactoryInterface | Factory $factory; |
|
23 | 23 | private Scope $scope; |
24 | 24 | private Actor $actor; |
25 | 25 | |
@@ -51,9 +51,9 @@ discard block |
||
51 | 51 | * @throws ContainerException |
52 | 52 | * @throws \Throwable |
53 | 53 | */ |
54 | - public function get(string|Autowire $id, \Stringable|string|null $context = null): mixed |
|
54 | + public function get(string | Autowire $id, \Stringable | string | null $context = null): mixed |
|
55 | 55 | { |
56 | - if ($id instanceof Autowire) { |
|
56 | + if ($id instanceof Autowire){ |
|
57 | 57 | return $id->resolve($this->factory); |
58 | 58 | } |
59 | 59 | |
@@ -65,15 +65,15 @@ discard block |
||
65 | 65 | { |
66 | 66 | $this->actor->resolveType($id, $binding, $singleton, $injector, $actor, false); |
67 | 67 | |
68 | - if ($singleton !== null || $injector !== null) { |
|
68 | + if ($singleton !== null || $injector !== null){ |
|
69 | 69 | return true; |
70 | 70 | } |
71 | 71 | |
72 | - if ($binding === null) { |
|
72 | + if ($binding === null){ |
|
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | |
76 | - if ($binding instanceof \Spiral\Core\Config\Proxy) { |
|
76 | + if ($binding instanceof \Spiral\Core\Config\Proxy){ |
|
77 | 77 | $type = $binding->getReturnClass(); |
78 | 78 | return $id === $type |
79 | 79 | ? $binding->hasFactory() |
@@ -53,7 +53,8 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function get(string|Autowire $id, \Stringable|string|null $context = null): mixed |
55 | 55 | { |
56 | - if ($id instanceof Autowire) { |
|
56 | + if ($id instanceof Autowire) |
|
57 | + { |
|
57 | 58 | return $id->resolve($this->factory); |
58 | 59 | } |
59 | 60 | |
@@ -65,15 +66,18 @@ discard block |
||
65 | 66 | { |
66 | 67 | $this->actor->resolveType($id, $binding, $singleton, $injector, $actor, false); |
67 | 68 | |
68 | - if ($singleton !== null || $injector !== null) { |
|
69 | + if ($singleton !== null || $injector !== null) |
|
70 | + { |
|
69 | 71 | return true; |
70 | 72 | } |
71 | 73 | |
72 | - if ($binding === null) { |
|
74 | + if ($binding === null) |
|
75 | + { |
|
73 | 76 | return false; |
74 | 77 | } |
75 | 78 | |
76 | - if ($binding instanceof \Spiral\Core\Config\Proxy) { |
|
79 | + if ($binding instanceof \Spiral\Core\Config\Proxy) |
|
80 | + { |
|
77 | 81 | $type = $binding->getReturnClass(); |
78 | 82 | return $id === $type |
79 | 83 | ? $binding->hasFactory() |