| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function connect(string $address, array $options = []): TransportInterface |
||
| 16 | { |
||
| 17 | $timeout = (float)($options['timeout'] ??(float) ini_get('default_socket_timeout')); |
||
| 18 | $port = $options['port'] ?? 0; |
||
| 19 | $url = $this->schema . $address; |
||
| 20 | $this->target = @fsockopen($url, $port, $this->errorNumber, $this->errorMessage, $timeout); |
||
| 21 | |||
| 22 | return $this; |
||
| 23 | } |
||
| 24 | } |
||
| 25 |