1 | <?php |
||
26 | class Storage |
||
27 | { |
||
28 | /** |
||
29 | * @var array|DefinitionInterface[] |
||
30 | */ |
||
31 | private $definitions; |
||
32 | |||
33 | /** |
||
34 | * @var array|DeferredInterface[] |
||
35 | */ |
||
36 | private $resolvers; |
||
37 | |||
38 | /** |
||
39 | * @var DefinitionValueObject[] |
||
40 | */ |
||
41 | private $resolved = []; |
||
42 | |||
43 | /** |
||
44 | * @var StrategyInterface |
||
45 | */ |
||
46 | private $naming; |
||
47 | |||
48 | /** |
||
49 | * Pipeline constructor. |
||
50 | * @param StrategyInterface $naming |
||
51 | */ |
||
52 | public function __construct(StrategyInterface $naming) |
||
64 | |||
65 | /** |
||
66 | * @param DefinitionInterface $definition |
||
67 | * @param DeferredInterface $deferred |
||
68 | * @return $this|Storage |
||
69 | */ |
||
70 | public function remember(DefinitionInterface $definition, DeferredInterface $deferred): Storage |
||
77 | |||
78 | /** |
||
79 | * @param InvocationInterface $invocation |
||
80 | * @return \Generator|mixed |
||
81 | */ |
||
82 | public function invoke(InvocationInterface $invocation) |
||
94 | |||
95 | /** |
||
96 | * @param string $name |
||
97 | * @return bool |
||
98 | */ |
||
99 | private function isResolved(string $name): bool |
||
103 | |||
104 | /** |
||
105 | * @param TypeNameInterface $name |
||
106 | * @param ContextInterface $ctx |
||
107 | * @return array |
||
108 | */ |
||
109 | private function get(TypeNameInterface $name, ContextInterface $ctx): array |
||
120 | |||
121 | /** |
||
122 | * @param TypeNameInterface $name |
||
123 | * @return array|null |
||
124 | */ |
||
125 | private function find(TypeNameInterface $name): ?array |
||
135 | |||
136 | /** |
||
137 | * @param InvocationInterface $name |
||
138 | * @return bool |
||
139 | */ |
||
140 | public function resolved(InvocationInterface $name): bool |
||
144 | |||
145 | /** |
||
146 | * @param \Closure $filter |
||
147 | * @return \Generator|DeferredInterface[] |
||
148 | */ |
||
149 | public function export(\Closure $filter): \Generator |
||
161 | |||
162 | /** |
||
163 | * @param DefinitionInterface $def |
||
164 | * @param DeferredInterface $then |
||
165 | * @return DeferredInterface |
||
166 | */ |
||
167 | private function toInvocationDeferred(DefinitionInterface $def, DeferredInterface $then): DeferredInterface |
||
171 | |||
172 | /** |
||
173 | * @param DefinitionInterface $original |
||
174 | * @param DeferredInterface $then |
||
175 | * @return \Closure |
||
176 | */ |
||
177 | private function toInvocationDeferredCallback(DefinitionInterface $original, DeferredInterface $then): \Closure |
||
189 | } |
||
190 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..