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 | |||
31 | 2 | return $this; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @throws JsonException |
||
36 | */ |
||
37 | 2 | public function getRoutes(): Generator |
|
38 | { |
||
39 | 2 | $cacheKey = $this->createCacheKey($this->getDirectories()); |
|
40 | 2 | $payload = $this->cache->get($cacheKey); |
|
41 | |||
42 | 2 | if ($payload !== null) { |
|
43 | 1 | yield from $this->mapCachePayloadToLoadedRoutes($payload); |
|
44 | |||
45 | 1 | return; |
|
46 | } |
||
55 |