| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | 1 | public function indexAction() : array |
|
| 18 | { |
||
| 19 | 1 | $ipController = new Validera3(); |
|
| 20 | 1 | $ipadress = $this->di->request->getGet("ipjson"); |
|
| 21 | 1 | $weather = $this->di->get("validera3"); |
|
| 22 | |||
| 23 | $json = [ |
||
| 24 | 1 | "Stad" => $ipadress, |
|
| 25 | 1 | "validerbar" => $weather->check($ipadress), |
|
| 26 | 1 | "weatherForecast" => $weather->getWeather($ipadress)["weatherForecast"], |
|
| 27 | 1 | "weatherHistory" => $weather->getWeather($ipadress)["weatherHistory"], |
|
| 28 | ]; |
||
| 29 | |||
| 30 | 1 | return [$json]; |
|
| 31 | } |
||
| 33 |