Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 4.3145 |
Changes | 0 |
1 | <?php |
||
17 | 1 | public function __construct(AppConfig $config, ILogger $logger) { |
|
18 | 1 | parent::__construct($config, $logger); |
|
19 | } |
||
20 | |||
21 | / |
||
|
|||
22 | public function initScanner(){ |
||
23 | parent::initScanner(); |
||
24 | $this->writeHandle = stream_socket_client( |
||
25 | 'unix://' . $this->appConfig->getAvSocket(), $errorCode, $errorMessage, 5 |
||
26 | ); |
||
27 | if (!$this->getWriteHandle()) { |
||
28 | throw new InitException( |
||
29 | sprintf( |
||
30 | 'Could not connect to socket "%s": %s (code %d)', |
||
31 | $this->appConfig->getAvSocket(), |
||
32 | $errorMessage, |
||
33 | $errorCode |
||
48 |