Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | protected function request($ip) |
||
22 | { |
||
23 | $driverResponse = null; |
||
24 | |||
25 | $content = $this->executeRequest($this->url($ip)); |
||
26 | |||
27 | if (is_string($content)) { |
||
28 | $driverResponse = json_decode($content, true); |
||
29 | } |
||
30 | |||
31 | if (null === $driverResponse) { |
||
32 | throw new AddressNotFoundException("The IP address {$ip} could not be found."); |
||
33 | } |
||
34 | |||
35 | return new Response($driverResponse); |
||
36 | } |
||
38 |