Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
54 | 221 | private function concreteValidate(string $received): bool |
|
55 | { |
||
56 | 221 | if (\filter_var($received, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { |
|
57 | 56 | return false; |
|
58 | } |
||
59 | |||
60 | 165 | if (\filter_var($received, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { |
|
61 | 158 | return false; |
|
62 | } |
||
63 | |||
64 | 7 | $this->message = 'Received value is not a valid ip address'; |
|
65 | 7 | return true; |
|
66 | } |
||
78 |