| 1 | <?php |
||
| 8 | class MockableConnection implements ConnectionInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Create a new Mockable connection. |
||
| 12 | * |
||
| 13 | * @param string|int $appId |
||
| 14 | * @param string $socketId |
||
| 15 | * @return void |
||
|
|
|||
| 16 | */ |
||
| 17 | public function __construct($appId, string $socketId) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Send data to the connection. |
||
| 27 | * |
||
| 28 | * @param string $data |
||
| 29 | * @return \Ratchet\ConnectionInterface |
||
| 30 | */ |
||
| 31 | public function send($data) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Close the connection. |
||
| 38 | * |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | public function close() |
||
| 45 | } |
||
| 46 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.