| Conditions | 5 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 5 | public function execute(ConnectionInterface $connection) |
|
| 31 | { |
||
| 32 | 5 | while (!$this->stream->eof()) { |
|
| 33 | 5 | $bytes = $this->stream->read(1000); |
|
| 34 | 5 | $lines = explode("\r\n", $bytes); |
|
| 35 | 5 | foreach ($lines as $line) { |
|
| 36 | 5 | $line = rtrim($line, "\r"); |
|
| 37 | 5 | if (isset($line[0]) && $line[0] === '.') { |
|
| 38 | 1 | $line = '.' . $line; |
|
| 39 | } |
||
| 40 | |||
| 41 | 5 | $connection->send($line . "\r\n"); |
|
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | 5 | $connection->send(".\r\n"); |
|
| 46 | } |
||
| 47 | } |