| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 14 |
| Ratio | 100 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 29 | View Code Duplication | protected function doLoad($file) |
| 21 | { |
||
| 22 | 29 | $config = Yaml::parse(file_get_contents($file)); |
|
| 23 | |||
| 24 | 29 | if ( ! is_array($config)) { |
|
| 25 | throw new \InvalidArgumentException('Not valid configuration.'); |
||
| 26 | } |
||
| 27 | |||
| 28 | 29 | if (isset($config['migrations_directory'])) { |
|
| 29 | 19 | $config['migrations_directory'] = $this->getDirectoryRelativeToFile($file, $config['migrations_directory']); |
|
| 30 | } |
||
| 31 | |||
| 32 | 29 | $this->setConfiguration($config); |
|
| 33 | 26 | } |
|
| 34 | } |
||
| 35 |