Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 15 | public function read(?SchemaProviderInterface $nextProvider = null): ?array |
|
17 | { |
||
18 | 15 | if ($this->providers === null) { |
|
19 | 1 | throw new SchemaProviderException(self::class . ' is not configured.'); |
|
20 | } |
||
21 | 14 | if ($this->providers->count() === 0) { |
|
22 | 4 | return $nextProvider?->read(); |
|
23 | } |
||
24 | |||
25 | 11 | return $this->providers[0]->read($nextProvider); |
|
26 | } |
||
28 |