| Conditions | 4 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 10 | public function getConfiguration() : Configuration |
|
| 19 | { |
||
| 20 | 10 | if (! file_exists($this->file)) { |
|
| 21 | 1 | throw FileNotFound::new($this->file); |
|
| 22 | } |
||
| 23 | |||
| 24 | 9 | $contents = file_get_contents($this->file); |
|
| 25 | |||
| 26 | 9 | assert($contents !== false); |
|
| 27 | |||
| 28 | 9 | $config = json_decode($contents, true); |
|
| 29 | |||
| 30 | 9 | if (json_last_error() !== JSON_ERROR_NONE) { |
|
| 31 | 1 | throw JsonNotValid::new(); |
|
|
|
|||
| 32 | } |
||
| 33 | |||
| 34 | 8 | if (isset($config['migrations_paths'])) { |
|
| 35 | 3 | $config['migrations_paths'] = $this->getDirectoriesRelativeToFile( |
|
| 36 | 3 | $config['migrations_paths'], |
|
| 37 | 3 | $this->file |
|
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | 8 | return (new ConfigurationArray($config))->getConfiguration(); |
|
| 42 | } |
||
| 44 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths