Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 3 | public function read(?SchemaProviderInterface $nextProvider = null): ?array |
|
29 | { |
||
30 | 3 | $schema = $this->cache->get($this->key); |
|
31 | |||
32 | 3 | if ($schema !== null || $nextProvider === null) { |
|
33 | 2 | return $schema; |
|
34 | } |
||
35 | |||
36 | 1 | $schema = $nextProvider->read(); |
|
37 | 1 | if ($schema !== null) { |
|
38 | 1 | $this->write($schema); |
|
39 | } |
||
40 | 1 | return $schema; |
|
41 | } |
||
57 |