Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function forecastAction() |
||
24 | { |
||
25 | $request = $this->di->get('request'); |
||
26 | $curl = $this->di->get('curl'); |
||
27 | |||
28 | $ipAddr = (new IpLocator($request->getGet('ip')))->locateIp(); |
||
29 | $type = $request->getGet('type'); |
||
30 | $coords = $request->getGet('coords'); |
||
31 | $result = (new Weather)->processRequest($ipAddr, $coords, $type, $curl); |
||
32 | unset($result['map']); |
||
33 | |||
34 | return [$result]; |
||
35 | } |
||
37 |