| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | 1 | public function getIterator(): Traversable |
|
| 23 | { |
||
| 24 | 1 | if (!in_array(StreamWrapper::NAME, stream_get_wrappers())) { |
|
| 25 | 1 | stream_wrapper_register(StreamWrapper::NAME, StreamWrapper::class); |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | $stream = fopen(StreamWrapper::NAME . '://stream', 'rb', false, stream_context_create([ |
|
| 29 | 1 | StreamWrapper::NAME => ['stream' => $this->source], |
|
| 30 | 1 | ])); |
|
| 31 | |||
| 32 | 1 | return new JsonResource($stream, $this->config); |
|
| 33 | } |
||
| 55 |