Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| SimpleFtpServerFactory | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| createConnector | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| createServer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\FtpServer\Factories; |
| 3 | |
| 4 | use React\Socket\Connector; |
| 5 | use React\Socket\ConnectorInterface; |
| 6 | use React\Socket\ServerInterface; |
| 7 | use React\Socket\SocketServer; |
| 8 | |
| 9 | class SimpleFtpServerFactory implements ServerFactoryInterface |
| 10 | { |
| 11 | public function createConnector(): ConnectorInterface |
| 12 | { |
| 13 | return new Connector(); |
| 14 | } |
| 15 | |
| 16 | public function createServer(int $port): ServerInterface |
| 17 | { |
| 18 | return new SocketServer('0.0.0.0:' . $port); |
| 19 | } |
| 20 | } |