| Total Complexity | 10 |
| Total Lines | 87 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class InputStreamReader |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var InputStream 入力ストリーム |
||
| 19 | */ |
||
| 20 | protected InputStream $stream; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * constructor |
||
| 24 | * @param InputStream $stream 入力ストリーム |
||
| 25 | */ |
||
| 26 | 51 | public function __construct(InputStream $stream) |
|
| 27 | { |
||
| 28 | 51 | $this->stream = $stream; |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * destructor |
||
| 33 | */ |
||
| 34 | 51 | public function __destruct() |
|
| 35 | { |
||
| 36 | 51 | $this->close(); |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * 読み込んでいる入力ストリームを閉じる |
||
| 41 | */ |
||
| 42 | 51 | public function close() |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * 入力ストリームからデータを読み込む |
||
| 49 | * @return string 読み込みデータ |
||
| 50 | * @throws InvalidArgumentException |
||
| 51 | * @throws IOException |
||
| 52 | */ |
||
| 53 | 34 | public function read() |
|
| 54 | { |
||
| 55 | 34 | $args = func_get_args(); |
|
| 56 | 34 | $length = count($args) === 1 ? $args[0] : 0; |
|
| 57 | |||
| 58 | 34 | if (!is_int($length)) { |
|
| 59 | 2 | throw new InvalidArgumentException("Invalid read size."); |
|
| 60 | } |
||
| 61 | |||
| 62 | 32 | return $this->stream->read($length); |
|
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * 入力ストリームから行単位でデータを読み込む |
||
| 67 | * 末尾に改行コードは含まない |
||
| 68 | * @return string 読み込みデータ |
||
| 69 | */ |
||
| 70 | 2 | public function readLine() |
|
| 71 | { |
||
| 72 | 2 | return $this->stream->readLine(); |
|
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * 入力ストリームから指定バイト数後方へポインタを移動する |
||
| 77 | * @param int $pos 後方への移動バイト数(負数の場合は前方へ移動) |
||
| 78 | * @return int $skipNum 移動したバイト数、移動に失敗した場合-1 |
||
| 79 | */ |
||
| 80 | 26 | public function skip(int $pos) |
|
| 81 | { |
||
| 82 | 26 | return $this->stream->skip($pos); |
|
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * 最後にmarkされた位置に再配置する |
||
| 87 | * @throws IOException |
||
| 88 | */ |
||
| 89 | 4 | public function reset() |
|
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * 入力ストリームの現在位置にmarkを設定する |
||
| 96 | * @param int マークするバイト位置 |
||
| 97 | * @throws IOException |
||
| 98 | */ |
||
| 99 | 2 | public function mark() |
|
| 102 | } |
||
| 103 | } |
||
| 104 |
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