1 | <?php |
||
13 | class ClamavValidator extends Validator |
||
14 | { |
||
15 | /** |
||
16 | * Creates a new instance of ClamavValidator. |
||
17 | * |
||
18 | * ClamavValidator constructor. |
||
19 | * @param Translator $translator |
||
20 | * @param array $data |
||
21 | * @param array $rules |
||
22 | * @param array $messages |
||
23 | * @param array $customAttributes |
||
24 | */ |
||
25 | 6 | public function __construct( |
|
34 | |||
35 | /** |
||
36 | * Validate the uploaded file for virus/malware with ClamAV. |
||
37 | * |
||
38 | * @param $attribute string |
||
39 | * @param $value mixed |
||
40 | * @param $parameters array |
||
41 | * |
||
42 | * @return boolean |
||
43 | * @throws ClamavValidatorException |
||
44 | */ |
||
45 | 5 | public function validateClamav($attribute, $value, $parameters) |
|
62 | |||
63 | /** |
||
64 | * Validate the single uploaded file for virus/malware with ClamAV. |
||
65 | * |
||
66 | * @param $value mixed |
||
67 | * |
||
68 | * @return bool |
||
69 | * @throws ClamavValidatorException |
||
70 | */ |
||
71 | 5 | protected function validateFileWithClamAv($value) |
|
93 | |||
94 | /** |
||
95 | * Guess the ClamAV socket. |
||
96 | * |
||
97 | * @return string |
||
98 | */ |
||
99 | 4 | protected function getClamavSocket() |
|
113 | |||
114 | /** |
||
115 | * Return the file path from the passed object. |
||
116 | * |
||
117 | * @param mixed $file |
||
118 | * @return string |
||
119 | */ |
||
120 | 5 | protected function getFilePath($file) |
|
135 | |||
136 | /** |
||
137 | * Create a new quahog ClamAV scanner client. |
||
138 | * |
||
139 | * @param string $socket |
||
140 | * @return QuahogClient |
||
141 | */ |
||
142 | 4 | protected function createQuahogScannerClient($socket) |
|
149 | } |
||
150 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.