| Total Complexity | 8 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 91.3% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class CachedRouter |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var callable |
||
| 17 | */ |
||
| 18 | protected $builder; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $cacheFile; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | protected $cacheEnabled; |
||
| 29 | |||
| 30 | 3 | public function __construct(callable $builder, string $cacheFile, bool $cacheEnabled = true) |
|
| 31 | { |
||
| 32 | 3 | $this->builder = $builder; |
|
| 33 | 3 | $this->cacheFile = $cacheFile; |
|
| 34 | 3 | $this->cacheEnabled = $cacheEnabled; |
|
| 35 | 3 | } |
|
| 36 | |||
| 37 | 3 | public function dispatch(ServerRequestInterface $request): ResponseInterface |
|
| 38 | { |
||
| 39 | 3 | $router = $this->buildRouter($request); |
|
| 40 | 3 | return $router->dispatch($request); |
|
| 41 | } |
||
| 42 | |||
| 43 | 3 | protected function buildRouter(ServerRequestInterface $request): Router |
|
| 68 | } |
||
| 69 | } |
||
| 70 |
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