1 | <?php |
||
18 | abstract class AbstractStaticFilter |
||
19 | { |
||
20 | /** |
||
21 | * |
||
22 | * The proxied filter instance. |
||
23 | * |
||
24 | * @var ValueFilter |
||
25 | * |
||
26 | */ |
||
27 | protected static $instance; |
||
28 | |||
29 | /** |
||
30 | * |
||
31 | * Prevents construction of the static proxy as an instance. |
||
32 | * |
||
33 | * @codeCoverageIgnore |
||
34 | * |
||
35 | */ |
||
36 | private function __construct() |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | * Sets the proxied filter instance. |
||
43 | * |
||
44 | * @param ValueFilter $instance The proxied filter instance. |
||
45 | * |
||
46 | * @return null |
||
47 | * |
||
48 | */ |
||
49 | 2 | public static function setInstance(ValueFilter $instance) |
|
57 | |||
58 | /** |
||
59 | * |
||
60 | * Validates a value using a rule. |
||
61 | * |
||
62 | * @param mixed $value The value to validate. |
||
63 | * |
||
64 | * @param string $rule The rule name. |
||
65 | * |
||
66 | * @param ...$args Arguments to pass to the rule. |
||
67 | * |
||
68 | * @return bool True on success, false on failure. |
||
69 | * |
||
70 | */ |
||
71 | 2 | public static function validate($value, $rule) |
|
84 | |||
85 | /** |
||
86 | * |
||
87 | * Sanitizes a value in place using a rule. |
||
88 | * |
||
89 | * @param mixed $value The value to sanitize. |
||
90 | * |
||
91 | * @param string $rule The rule name. |
||
92 | * |
||
93 | * @param ...$args Arguments to pass to the rule. |
||
94 | * |
||
95 | * @return bool True on success, false on failure. |
||
96 | * |
||
97 | */ |
||
98 | 2 | public static function sanitize(&$value, $rule) |
|
112 | } |
||
113 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.