Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 2 | public function getWeatherComing(String $latlon) : array |
|
44 | { |
||
45 | 2 | $res = []; |
|
46 | 2 | $res[0] = $this->curl->single($this->config["url"] . $latlon . $this->config["single"]); |
|
47 | 2 | $size = count($res[0]["daily"]["data"]); |
|
48 | 2 | for ($i = 0; $i < $size; $i++) { |
|
49 | 2 | $time = $res[0]["daily"]["data"][$i]["time"]; |
|
50 | 2 | $res[0]["daily"]["data"][$i]["date"] = date("Y-m-d", $time); |
|
51 | } |
||
52 | 2 | return $res; |
|
53 | } |
||
81 |