| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 4 | public function getConfiguration() : Configuration |
|
| 43 | { |
||
| 44 | 4 | if (count($this->loaders) === 0) { |
|
| 45 | 4 | $this->setDefaultLoaders(); |
|
| 46 | } |
||
| 47 | |||
| 48 | 4 | $extension = pathinfo($this->file, PATHINFO_EXTENSION); |
|
| 49 | 4 | if (! isset($this->loaders[$extension])) { |
|
| 50 | 1 | throw InvalidConfigurationFormat::new($this->file); |
|
| 51 | } |
||
| 52 | |||
| 53 | 3 | return $this->loaders[$extension]($this->file)->getConfiguration(); |
|
| 54 | } |
||
| 55 | } |
||
| 56 |
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..