Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 1 | public function indexActionGet() : array |
|
19 | { |
||
20 | 1 | $title = "Weather"; |
|
21 | 1 | $location = htmlentities($this->di->get("request")->getGet("location")); |
|
22 | 1 | $weather = $this->di->get("weather"); |
|
23 | |||
24 | $json = [ |
||
25 | 1 | "title" => $title, |
|
26 | 1 | "location" => $location, |
|
27 | 1 | "geocode" => $weather->loadGeolocation($location), |
|
28 | 1 | "weather" => $weather->loadWeather(), |
|
29 | 1 | "historic" => $weather->multiCurl() |
|
30 | ]; |
||
31 | |||
32 | 1 | return [$json]; |
|
33 | } |
||
35 |