Conditions | 5 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 5 | public function __construct(public float $longitude, public float $latitude) |
|
25 | { |
||
26 | 5 | if ($this->longitude > static::MAX_LONGITUDE || $this->longitude < static::MIN_LONGITUDE) { |
|
27 | 2 | throw new InvalidBoundingBoxPositionException('The longitude should be between ' . static::MIN_LONGITUDE . ' and ' . static::MAX_LONGITUDE . ', "' . $this->longitude . '" provided.'); |
|
28 | } |
||
29 | |||
30 | 3 | if ($this->latitude > static::MAX_LATITUDE || $this->latitude < static::MIN_LATITUDE) { |
|
31 | 2 | throw new InvalidBoundingBoxPositionException('The latitude should be between ' . static::MIN_LATITUDE . ' and ' . static::MAX_LATITUDE . ', "' . $this->latitude . '" provided.'); |
|
32 | } |
||
35 |