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