| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 73 | public function addString(string $str): self |
||
| 74 | { |
||
| 75 | $len = strlen($str); |
||
| 76 | $data = chr($len); |
||
| 77 | if (253 < $len) { |
||
| 78 | $data = chr(254) . substr(self::pack('V', $len), 0, 3); |
||
| 79 | $len++; |
||
| 80 | } |
||
| 81 | $data .= $str . pack('@' . self::positiveModulo(-$len - 1, 4)); |
||
| 82 | $this->bytes .= $data; |
||
| 83 | return $this; |
||
| 84 | } |
||
| 94 | } |