Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
18 | class Str extends AbstractString implements RuleSanitizeInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var array Rule properties |
||
22 | */ |
||
23 | public static $config = [ |
||
24 | 'class' => 'Str1ng', |
||
25 | 'full_class' => __CLASS__, |
||
26 | 'alias' => ['string', 'str', 's'], |
||
27 | 'args_count' => 0, |
||
28 | 'args_type' => [], |
||
29 | 'has_validate' => true, |
||
30 | 'has_sanitize' => true |
||
31 | ]; |
||
32 | |||
33 | /** |
||
34 | * @var string Error message |
||
35 | */ |
||
36 | private $message = ''; |
||
37 | |||
38 | /** |
||
39 | * Validate. |
||
40 | * |
||
41 | * @param mixed $received |
||
42 | * |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function validate($received): bool |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * Return error message. |
||
57 | * |
||
58 | * @return string Error message |
||
59 | */ |
||
60 | public function getMessage(): string |
||
65 |