Conditions | 3 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 6 | public function __construct($latitude, $longitude) |
|
22 | { |
||
23 | 6 | if (empty($latitude) || empty($longitude)) { |
|
24 | 2 | throw new \InvalidArgumentException('A latitude and longitude must be defined'); |
|
25 | } |
||
26 | |||
27 | 4 | $this->latitude = (float) $latitude; |
|
28 | 4 | $this->longitude = (float) $longitude; |
|
29 | 4 | } |
|
30 | |||
58 |