| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class IterableSource extends Source |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Retrieve the JSON fragments |
||
| 19 | * |
||
| 20 | * @return Traversable<int, string> |
||
| 21 | */ |
||
| 22 | 1 | public function getIterator(): Traversable |
|
| 23 | { |
||
| 24 | 1 | yield from $this->source; |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Determine whether the JSON source can be handled |
||
| 29 | * |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | 330 | public function matches(): bool |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Retrieve the calculated size of the JSON source |
||
| 39 | * |
||
| 40 | * @return int|null |
||
| 41 | */ |
||
| 42 | 1 | protected function calculateSize(): ?int |
|
| 45 | } |
||
| 46 | } |
||
| 47 |