Total Complexity | 9 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 92.59% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
5 | class LocationService |
||
6 | { |
||
7 | |||
8 | |||
9 | /* |
||
10 | * |
||
11 | * curls api, get_file_contents |
||
12 | * sends response to model |
||
13 | * |
||
14 | */ |
||
15 | |||
16 | private $key = null; |
||
17 | private $url = null; |
||
18 | |||
19 | 2 | public function setKey($key) |
|
20 | { |
||
21 | 2 | $this->key = $key; |
|
22 | 2 | } |
|
23 | |||
24 | 2 | public function setUrl($url): void |
|
25 | { |
||
26 | 2 | $this->url = $url; |
|
27 | 2 | } |
|
28 | |||
29 | 2 | public function getKey(): string |
|
30 | { |
||
31 | 2 | return $this->key; |
|
32 | } |
||
33 | |||
34 | 2 | public function getUrl(): string |
|
35 | { |
||
36 | 2 | return $this->url; |
|
37 | } |
||
38 | |||
39 | |||
40 | |||
41 | |||
42 | 2 | public function curlIpApi($ipAdr): array |
|
70 | } |
||
71 | } |
||
72 | } |
||
73 |