Total Complexity | 5 |
Total Lines | 67 |
Duplicated Lines | 0 % |
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 Array $config for api key |
||
12 | */ |
||
13 | public function __construct($config) |
||
14 | { |
||
15 | $this->config = $config; |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * |
||
20 | * Returns Array[valid, ip, ipv, domain], get used at view. |
||
21 | * |
||
22 | */ |
||
23 | public function toJson($ip) : array |
||
72 | ]; |
||
73 | } |
||
76 |