| Total Complexity | 5 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Ip implements RuleValidateInterface |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var array Rule properties |
||
| 22 | */ |
||
| 23 | public static $config = [ |
||
| 24 | 'full_class' => __CLASS__, |
||
| 25 | 'alias' => ['ip'], |
||
| 26 | 'args_count' => 0, |
||
| 27 | 'args_type' => [] |
||
| 28 | ]; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var string Error message |
||
| 32 | */ |
||
| 33 | private $message = ''; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Validate. |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 221 | public function validate(): bool |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Concrete validate. |
||
| 49 | * |
||
| 50 | * @param string $received |
||
| 51 | * |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | 221 | private function concreteValidate(string $received): bool |
|
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Return error message. |
||
| 70 | * |
||
| 71 | * @return string Error message |
||
| 72 | */ |
||
| 73 | 1 | public function getMessage(): string |
|
| 78 |