Conditions | 6 |
Paths | 7 |
Total Lines | 30 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public static function loadConfig(string $fileName): ConfigurationHolder |
||
14 | { |
||
15 | if (class_exists(Configuration::class)) { |
||
16 | // @codeCoverageIgnoreStart |
||
17 | $configuration = Configuration::getInstance($fileName); |
||
18 | $filename = $configuration->getFilename(); |
||
19 | $phpunit = $configuration->getPHPUnitConfiguration(); |
||
20 | $bootstrap = ''; |
||
21 | if (isset($phpunit['bootstrap'])) { |
||
22 | $bootstrap = $phpunit['bootstrap']; |
||
23 | } |
||
24 | } else { |
||
25 | if (class_exists('PHPUnit\TextUI\Configuration\Loader', true)) { |
||
26 | // PHPUnit < 9.3 |
||
27 | $loader = new \PHPUnit\TextUI\Configuration\Loader(); |
||
28 | // @codeCoverageIgnoreEnd |
||
29 | } elseif (class_exists('PHPUnit\TextUI\XmlConfiguration\Loader', true)) { |
||
30 | // PHPUnit >= 9.3 |
||
31 | $loader = new \PHPUnit\TextUI\XmlConfiguration\Loader(); |
||
32 | } else { |
||
33 | throw new \RuntimeException('Could not find PHPUnit configuration loader class'); // @codeCoverageIgnore |
||
34 | } |
||
35 | |||
36 | $configuration = $loader->load($fileName); |
||
37 | $filename = $configuration->filename(); |
||
38 | $phpunit = $configuration->phpunit(); |
||
39 | $bootstrap = $phpunit->hasBootstrap() ? $phpunit->bootstrap() : null; |
||
40 | } |
||
41 | |||
42 | return new ConfigurationHolder($configuration, $filename, $bootstrap); |
||
43 | } |
||
45 |
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