| Conditions | 4 | 
| Paths | 1 | 
| Total Lines | 30 | 
| Code Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 20 | protected function browser(): PantherBrowser | ||
| 21 |     { | ||
| 22 |         $browser = PantherBrowser::create(function() { | ||
| 23 |             if (!$this instanceof PantherTestCase) { | ||
| 24 |                 throw new \RuntimeException(\sprintf('The "%s" method can only be used on TestCases that extend "%s".', __METHOD__, PantherTestCase::class)); | ||
| 25 | } | ||
| 26 | |||
| 27 | $class = $_SERVER['PANTHER_BROWSER_CLASS'] ?? PantherBrowser::class; | ||
| 28 | |||
| 29 |             if (!\is_a($class, PantherBrowser::class, true)) { | ||
| 30 |                 throw new \RuntimeException(\sprintf('"PANTHER_BROWSER_CLASS" env variable must reference a class that extends %s.', PantherBrowser::class)); | ||
| 31 | } | ||
| 32 | |||
| 33 |             if (self::$primaryPantherClient) { | ||
| 34 | return new $class(static::createAdditionalPantherClient()); | ||
| 35 | } | ||
| 36 | |||
| 37 | self::$primaryPantherClient = static::createPantherClient( | ||
| 38 | ['browser' => $_SERVER['PANTHER_BROWSER'] ?? static::CHROME] | ||
| 39 | ); | ||
| 40 | |||
| 41 | return new $class(self::$primaryPantherClient); | ||
| 42 | }); | ||
| 43 | |||
| 44 | BrowserExtension::registerBrowser($browser); | ||
| 45 | |||
| 46 | return $browser | ||
| 47 | ->setSourceDir($_SERVER['BROWSER_SOURCE_DIR'] ?? './var/browser/source') | ||
| 48 | ->setScreenshotDir($_SERVER['BROWSER_SCREENSHOT_DIR'] ?? './var/browser/screenshots') | ||
| 49 | ->setConsoleLogDir($_SERVER['BROWSER_CONSOLE_LOG_DIR'] ?? './var/browser/console-logs') | ||
| 50 | ; | ||
| 53 | 
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