| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 20 | public function addListener($host = '127.0.0.1', $port = 8080, $use_ssl = false, $cert = null)  | 
            ||
| 21 |     { | 
            ||
| 22 | $proxy = new Server($this->loop);  | 
            ||
| 23 |         $proxy->on('connection', new ConnectionHandler($this)); | 
            ||
| 24 | $context = !$use_ssl ? [] : [  | 
            ||
| 25 | 'ssl' => [  | 
            ||
| 26 | 'local_cert' => $cert === null ? (__DIR__ . '/../certificate.pem') : $cert,  | 
            ||
| 27 | 'allow_self_signed' => true,  | 
            ||
| 28 | 'verify_peer' => false,  | 
            ||
| 29 | ],  | 
            ||
| 30 | ];  | 
            ||
| 31 | $proxy->listen($port, $host, $context);  | 
            ||
| 32 | }  | 
            ||
| 33 | }  | 
            ||
| 34 |