Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
59 | 3 | public function initScanner(){ |
|
60 | 3 | parent::initScanner(); |
|
61 | 3 | $this->writeHandle = @fsockopen($this->avHost, $this->avPort); |
|
62 | 3 | if (!$this->getWriteHandle()) { |
|
63 | 1 | throw new InitException( |
|
64 | 1 | sprintf( |
|
65 | 1 | 'Could not connect to host "%s" on port %d', $this->avHost, $this->avPort |
|
66 | 1 | ) |
|
67 | 1 | ); |
|
68 | } |
||
69 | // request scan from the daemon |
||
70 | 2 | @fwrite($this->getWriteHandle(), "nINSTREAM\n"); |
|
|
|||
71 | 2 | } |
|
72 | } |
||
73 |
If you suppress an error, we recommend checking for the error condition explicitly: