| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 2 | public function load(string $className): Generator |
|
| 31 | { |
||
| 32 | 2 | $cacheKey = $this->createCacheKey($className); |
|
| 33 | 2 | $payload = $this->cache->get($cacheKey); |
|
| 34 | |||
| 35 | 2 | if ($payload !== null) { |
|
| 36 | 1 | yield from $this->mapCachePayloadToLoadedRoutes($payload); |
|
| 37 | |||
| 38 | 1 | return; |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | $loadedRoutes = iterator_to_array($this->routeLoader->load($className)); |
|
| 42 | |||
| 43 | 1 | $this->cache->set($cacheKey, $this->mapLoadedRoutesToCachePayload(...$loadedRoutes)); |
|
| 44 | |||
| 45 | 1 | yield from $loadedRoutes; |
|
| 46 | 1 | } |
|
| 48 |
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