| Conditions | 7 | 
| Paths | 4 | 
| Total Lines | 11 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 7 | 
| 1 | <?php  | 
            ||
| 18 | 9 | public function handleData($stream)  | 
            |
| 19 |     { | 
            ||
| 20 | 9 | $data = stream_socket_recvfrom($stream, $this->bufferSize);  | 
            |
| 21 | 9 |         if ('' !== $data && false !== $data) { | 
            |
| 22 | 5 |             $this->emit('data', array($data, $this)); | 
            |
| 23 | }  | 
            ||
| 24 | |||
| 25 | 9 |         if ('' === $data || false === $data || !is_resource($stream) || feof($stream)) { | 
            |
| 26 | 7 | $this->end();  | 
            |
| 27 | }  | 
            ||
| 28 | 9 | }  | 
            |
| 29 | |||
| 50 |