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