Conditions | 6 |
Paths | 10 |
Total Lines | 21 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 7.6393 |
Changes | 0 |
1 | <?php |
||
22 | 2 | ['app' => 'files_antivirus'] |
|
23 | 2 | ); |
|
24 | @fclose($this->getWriteHandle()); |
||
25 | 2 | ||
26 | $this->status->parseResponse($response); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Prepend a chunk sent to ClamAv with its length |
||
31 | * @param string $data |
||
32 | 2 | * @return string |
|
33 | 2 | */ |
|
34 | 2 | protected function prepareChunk($data){ |
|
35 | 2 | $chunkLength = pack('N', strlen($data)); |
|
36 | return $chunkLength . $data; |
||
37 | } |
||
38 | } |
||
39 |
If you suppress an error, we recommend checking for the error condition explicitly: