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