Conditions | 7 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 7 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 4 | public function write($buf, int $off = null, int $len = null) |
|
25 | { |
||
26 | $data = null; |
||
27 | 4 | if ($off === null && $len === null) { |
|
28 | 4 | $data = $buf; |
|
29 | 3 | } elseif ($off !== null && $len === null) { |
|
30 | 1 | $data = substr($buf, $off); |
|
31 | 2 | } elseif ($off === null && $len !== null) { |
|
32 | 1 | $data = substr($buf, 0, $len); |
|
33 | } else { |
||
34 | 1 | $data = substr($buf, $off, $len); |
|
35 | } |
||
36 | |||
37 | 4 | $this->stream .= $data; |
|
38 | } |
||
56 |