| 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 | 4 | public function read(?SchemaProviderInterface $nextProvider = null): ?array |
|
| 29 | { |
||
| 30 | 4 | $schema = $this->cache->get($this->key); |
|
| 31 | |||
| 32 | 4 | if ($schema !== null || $nextProvider === null) { |
|
| 33 | 2 | return $schema; |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | $schema = $nextProvider->read(); |
|
| 37 | 2 | if ($schema !== null) { |
|
| 38 | 2 | $this->write($schema); |
|
| 39 | } |
||
| 40 | 2 | return $schema; |
|
| 41 | } |
||
| 57 |