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