| 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 |
||
| 42 | 4 | public function read(?SchemaProviderInterface $nextProvider = null): ?array |
|
| 43 | { |
||
| 44 | 4 | $schema = $this->cache->get($this->key); |
|
| 45 | |||
| 46 | 4 | if ($schema !== null || $nextProvider === null) { |
|
| 47 | 2 | return $schema; |
|
| 48 | } |
||
| 49 | |||
| 50 | 2 | $schema = $nextProvider->read(); |
|
| 51 | 2 | if ($schema !== null) { |
|
| 52 | 2 | $this->write($schema); |
|
| 53 | } |
||
| 54 | 2 | return $schema; |
|
| 55 | } |
||
| 74 |