| Total Complexity | 8 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class MockSocket implements SocketInterface |
||
| 18 | { |
||
| 19 | use EventEmitterTrait; |
||
| 20 | |||
| 21 | private $transmissions = []; |
||
| 22 | |||
| 23 | public function send($data, $remoteAddress = null) |
||
| 24 | { |
||
| 25 | $this->transmissions[] = $data; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getLastTransmission(): string |
||
| 29 | { |
||
| 30 | return end($this->transmissions); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function close() |
||
| 34 | { |
||
| 35 | // TODO: Implement close() method. |
||
| 36 | } |
||
| 37 | |||
| 38 | public function end() |
||
| 40 | // TODO: Implement end() method. |
||
| 41 | } |
||
| 42 | |||
| 43 | public function resume() |
||
| 44 | { |
||
| 45 | // TODO: Implement resume() method. |
||
| 46 | } |
||
| 47 | |||
| 48 | public function pause() |
||
| 49 | { |
||
| 50 | // TODO: Implement pause() method. |
||
| 51 | } |
||
| 52 | |||
| 53 | public function getLocalAddress() |
||
| 54 | { |
||
| 55 | // TODO: Implement getLocalAddress() method. |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getRemoteAddress() |
||
| 60 | // TODO: Implement getRemoteAddress() method. |
||
| 61 | } |
||
| 62 | } |
||
| 63 |