Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class IpVerifier |
||
8 | { |
||
9 | private $curl; |
||
10 | private $config; |
||
11 | |||
12 | /** |
||
13 | * Constructor, allow for $di to be injected. |
||
14 | * |
||
15 | * @param Array $config a config file containing keys url / key |
||
16 | */ |
||
17 | 2 | public function __construct($config) |
|
21 | 2 | } |
|
22 | |||
23 | /** |
||
24 | * Set config |
||
25 | */ |
||
26 | 2 | public function setConfig(Array $config) |
|
29 | 2 | } |
|
30 | |||
31 | /** |
||
32 | * This method takes one argument: |
||
33 | * A string that we are going to check if its a valid ip-adress. |
||
34 | * Returning an json with some information. |
||
35 | * |
||
36 | * @param string $value |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | 2 | public function getJson($ip) : array |
|
50 |