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