| Total Complexity | 6 |
| Total Lines | 71 |
| Duplicated Lines | 0 % |
| Coverage | 90.63% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class IpValidator |
||
| 6 | { |
||
| 7 | private $config; |
||
| 8 | /** |
||
| 9 | * Constructor, allow for $di to be injected. |
||
| 10 | * |
||
| 11 | * @param str $config api key |
||
| 12 | */ |
||
| 13 | 1 | public function __construct($config) |
|
| 14 | { |
||
| 15 | 1 | $this->config = $config; |
|
| 16 | 1 | } |
|
| 17 | |||
| 18 | 1 | public function setConfig($config) |
|
| 21 | 1 | } |
|
| 22 | |||
| 23 | /** |
||
| 24 | * |
||
| 25 | * Returns Array[valid, ip, ipv, domain], get used at view. |
||
| 26 | * |
||
| 27 | */ |
||
| 28 | 1 | public function getIp($ip) : array |
|
| 80 |