| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 76 | public function write(string $buffer): void |
||
| 77 | { |
||
| 78 | if ($this->isClosed()) { |
||
| 79 | throw new ConnectionException('Connection has been closed'); |
||
| 80 | } |
||
| 81 | |||
| 82 | if (false == @fwrite($this->socket, $buffer) && !empty($buffer)) { |
||
| 83 | throw $this->createExceptionFromLastError('fwrite'); |
||
| 84 | } |
||
| 85 | } |
||
| 86 | |||
| 108 |