| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 162 | public function load(string $class): Story |
|
| 30 | { |
||
| 31 | 162 | if (\array_key_exists($class, self::$globalInstances)) { |
|
| 32 | 4 | return self::$globalInstances[$class]; |
|
| 33 | } |
||
| 34 | |||
| 35 | 162 | if (\array_key_exists($class, self::$instances)) { |
|
| 36 | 4 | return self::$instances[$class]; |
|
| 37 | } |
||
| 38 | |||
| 39 | 162 | $story = $this->getOrCreateStory($class); |
|
| 40 | 162 | $story->build(); |
|
| 41 | |||
| 42 | 162 | return self::$instances[$class] = $story; |
|
| 43 | } |
||
| 73 |
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..