Conditions | 7 |
Paths | 7 |
Total Lines | 25 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 7 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 2 | public function createStream($body = null) |
|
23 | { |
||
24 | if ($body instanceof StreamInterface) { |
||
25 | 7 | return $body; |
|
26 | 3 | } |
|
27 | |||
28 | if (is_resource($body)) { |
||
29 | 4 | if (class_exists(LaminasStream::class)) { |
|
30 | 4 | return new LaminasStream($body); |
|
31 | 2 | } |
|
32 | |||
33 | return new ZendStream($body); |
||
34 | 4 | } |
|
35 | |||
36 | if (class_exists(LaminasStream::class)) { |
||
37 | $stream = new LaminasStream('php://memory', 'rw'); |
||
38 | } else { |
||
39 | $stream = new ZendStream('php://memory', 'rw'); |
||
40 | } |
||
41 | |||
42 | if (null !== $body && '' !== $body) { |
||
43 | $stream->write((string) $body); |
||
44 | } |
||
45 | |||
46 | return $stream; |
||
47 | } |
||
49 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths