Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 6 |
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 | } |
||
56 |