Conditions | 3 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | public function createStreamFromResource($resource): StreamInterface |
||
35 | { |
||
36 | if (!is_resource($resource) || get_resource_type($resource) !== 'stream') { |
||
37 | throw new \InvalidArgumentException('Invalid stream provided; must be a stream resource', 1566853697); |
||
38 | } |
||
39 | return new Stream($resource); |
||
40 | } |
||
42 |