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