Conditions | 5 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
35 | public function __construct(float $lat, float $lon) |
||
36 | { |
||
37 | if ($lat < -90 || $lat > 90) { |
||
38 | throw new LogicException('Wrong latitude given'); |
||
39 | } |
||
40 | |||
41 | if ($lon < -180 || $lon > 180) { |
||
42 | throw new LogicException('Wrong longitude given'); |
||
43 | } |
||
44 | |||
45 | parent::__construct(); |
||
46 | $this->apiCall = 'weather'; |
||
47 | $this->lat = $lat; |
||
48 | $this->lon = $lon; |
||
49 | $this->params = $this->paramsToArray(); |
||
50 | } |
||
64 |