| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 2 | public function connect() |
|
| 28 | 2 | { |
|
| 29 | 2 | $this->disconnect(); |
|
| 30 | 2 | $host = $this->getConfigurationValue('host', '127.0.0.1'); |
|
| 31 | 2 | $port = $this->getConfigurationValue('port', Pheanstalk::DEFAULT_PORT); |
|
| 32 | $connectionTimeout = $this->getConfigurationValue('connectionTimeout'); |
||
| 33 | 2 | $connectPersistent = $this->getConfigurationValue('connectPersistent', false); |
|
| 34 | $connection = new Connection(new SocketFactory($host, $port ?: Pheanstalk::DEFAULT_PORT, $connectionTimeout ?? 0, $connectPersistent ?? SocketFactory::AUTODETECT)); |
||
| 35 | $this->instance = new Pheanstalk($connection); |
||
| 36 | return $this; |
||
| 37 | } |
||
| 51 |