| Conditions | 7 |
| Paths | 6 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 7 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 37 | public static function wrap($value): StreamInterface |
|
| 30 | { |
||
| 31 | 37 | if ($value instanceof StreamInterface) { |
|
| 32 | 1 | return $value; |
|
| 33 | } |
||
| 34 | |||
| 35 | 37 | if ($value instanceof Streamable) { |
|
| 36 | 1 | return $value->stream(); |
|
| 37 | } |
||
| 38 | |||
| 39 | 37 | if ($value === null || $value === []) { |
|
| 40 | 2 | return EmptyStream::instance(); |
|
| 41 | } |
||
| 42 | |||
| 43 | 37 | if (is_array($value)) { |
|
| 44 | 37 | return new ArrayStream($value); |
|
| 45 | } |
||
| 46 | |||
| 47 | 3 | if ($value instanceof Traversable) { |
|
| 48 | 1 | return new IteratorStream($value); |
|
| 49 | } |
||
| 50 | |||
| 51 | 3 | return new SingletonStream($value); |
|
| 52 | } |
||
| 54 |
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