1 | <?php |
||
14 | class Factory |
||
15 | { |
||
16 | /** @var array */ |
||
17 | protected $customFilters; |
||
18 | |||
19 | /** |
||
20 | * Create a new Sanitizer factory instance. |
||
21 | */ |
||
22 | public function __construct() |
||
26 | |||
27 | /** |
||
28 | * Create a new Sanitizer instance. |
||
29 | * |
||
30 | * @param array $data Data to be sanitized |
||
31 | * @param array $rules Filters to be applied to the given data |
||
32 | * |
||
33 | * @return Sanitizer |
||
34 | */ |
||
35 | public function make(array $data, array $rules) |
||
41 | |||
42 | /** |
||
43 | * Add a custom filters to all Sanitizers created with this Factory. |
||
44 | * |
||
45 | * @param string $name Name of the filter |
||
46 | * @param mixed $extension Either the full class name of a Filter class implementing the Filter contract, or a Closure. |
||
|
|||
47 | * |
||
48 | * @throws InvalidArgumentException |
||
49 | */ |
||
50 | public function extend($name, $customFilter) |
||
62 | } |
||
63 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.