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