| 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 | 2 | @fclose($this->getWriteHandle()); |
|
| 25 | |||
| 26 | 2 | $this->status->parseResponse($response); |
|
| 27 | 2 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Prepend a chunk sent to ClamAv with its length |
||
| 31 | * @param string $data |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | 2 | protected function prepareChunk($data){ |
|
| 35 | 2 | $chunkLength = pack('N', strlen($data)); |
|
| 36 | 2 | return $chunkLength . $data; |
|
| 37 | } |
||
| 38 | } |
||
| 39 |
If you suppress an error, we recommend checking for the error condition explicitly: