| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function __construct($ip) |
||
| 27 | { |
||
| 28 | $filteredValue = filter_var($ip, FILTER_VALIDATE_IP); |
||
| 29 | if ($filteredValue === false) { |
||
| 30 | throw new \InvalidArgumentException(sprintf( |
||
| 31 | 'Argument "%s" is invalid. Allowed types for argument are "ip address".', |
||
| 32 | $ip |
||
| 33 | )); |
||
| 34 | } |
||
| 35 | |||
| 36 | parent::__construct((string) $ip); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |