| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | 8 | public function stream_open(string $path, string $mode, int $options, &$opened_path): bool |
|
| 45 | { |
||
| 46 | 8 | $options = stream_context_get_options($this->context); |
|
| 47 | 8 | $stream = $options[static::NAME]['stream'] ?? null; |
|
| 48 | |||
| 49 | 8 | if (!$stream instanceof StreamInterface || !$stream->isReadable()) { |
|
| 50 | 3 | return false; |
|
| 51 | } |
||
| 52 | |||
| 53 | 5 | $this->stream = $stream; |
|
| 54 | |||
| 55 | 5 | return true; |
|
| 56 | } |
||
| 79 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.