Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.074 |
Changes | 0 |
1 | <?php |
||
43 | private function getFactories(): array |
||
44 | { |
||
45 | if (\is_array($this->factories)) { |
||
46 | return $this->factories; |
||
47 | } |
||
48 | 2 | ||
49 | $factories = []; |
||
50 | 2 | foreach ($this->factories as $factory) { |
|
51 | if ($factory === $this) { |
||
52 | 2 | continue; |
|
53 | 2 | } |
|
54 | 2 | $factories[] = $factory; |
|
55 | } |
||
56 | return $this->factories = (fn(StorageFactoryInterface ...$factories) => $factories)(...$factories); |
||
57 | } |
||
59 |
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..