Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 3.072 |
Changes | 0 |
1 | <?php |
||
30 | public function create(string $dsn): PromiseInterface |
||
31 | { |
||
32 | foreach ($this->getFactories() as $factory) { |
||
33 | if (!$factory->supports($dsn)) { |
||
34 | continue; |
||
35 | 1 | } |
|
36 | |||
37 | 1 | return $factory->create($dsn); |
|
38 | 1 | } |
|
39 | 1 | ||
40 | throw new \RuntimeException(\sprintf('Invalid storage DSN %s', $dsn)); |
||
41 | } |
||
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..