1 | <?php namespace Sunspikes\ClamavValidator; |
||
10 | class ClamavValidator extends Validator |
||
11 | { |
||
12 | /** |
||
13 | * @const string CLAMAV_STATUS_OK |
||
14 | */ |
||
15 | const CLAMAV_STATUS_OK = 'OK'; |
||
16 | |||
17 | /** |
||
18 | * @const string CLAMAV_STATUS_ERROR |
||
19 | */ |
||
20 | const CLAMAV_STATUS_ERROR = 'ERROR'; |
||
21 | |||
22 | /** |
||
23 | * Creates a new instance of ClamavValidator] |
||
24 | * |
||
25 | * ClamavValidator constructor. |
||
26 | * @param Translator $translator |
||
27 | * @param array $data |
||
28 | * @param array $rules |
||
29 | * @param array $messages |
||
30 | * @param array $customAttributes |
||
31 | */ |
||
32 | 3 | public function __construct( |
|
41 | |||
42 | /** |
||
43 | * Validate the uploaded file for virus/malware with ClamAV |
||
44 | * |
||
45 | * @param $attribute string |
||
46 | * @param $value mixed |
||
47 | * @param $parameters array |
||
48 | * |
||
49 | * @return boolean |
||
50 | * @throws ClamavValidatorException |
||
51 | */ |
||
52 | 3 | public function validateClamav($attribute, $value, $parameters) |
|
78 | |||
79 | /** |
||
80 | * Guess the ClamAV socket |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | 3 | protected function getClamavSocket() |
|
97 | |||
98 | /** |
||
99 | * Return the file path from the passed object |
||
100 | * |
||
101 | * @param $file mixed |
||
102 | * @return string |
||
103 | */ |
||
104 | 3 | protected function getFilePath($file) |
|
119 | } |
||
120 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.