Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function indexAction() : object |
||
19 | { |
||
20 | $title = "Weather"; |
||
21 | |||
22 | $location = htmlentities($this->di->get("request")->getPost("location")); |
||
23 | $weather = $this->di->get("weather"); |
||
24 | $page = $this->di->get("page"); |
||
25 | |||
26 | $page->add("anax/weather/index", [ |
||
27 | "title" => $title, |
||
28 | "location" => $location, |
||
29 | "geolocation" => $weather->loadGeolocation($location), |
||
30 | "weather" => $weather->loadWeather(), |
||
31 | "historic" => $weather->multiCurl(), |
||
32 | ]); |
||
33 | |||
34 | return $page->render([ |
||
35 | "title" => $title, |
||
36 | ]); |
||
39 |