Conditions | 6 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 42 |
Changes | 0 |
1 | <?php |
||
24 | protected function checkArguments($x, $y, array $elevationOnBoundingBox) |
||
25 | { |
||
26 | if (4 !== count($elevationOnBoundingBox)) { |
||
27 | throw new InvalidArgumentException('Array with elevation on bounding box must have four values.'); |
||
28 | } |
||
29 | |||
30 | if ($x < 0.0 || 1.0 < $x) { |
||
31 | throw new InvalidArgumentException('$x must be within [0.0, 1.0]'); |
||
32 | } |
||
33 | |||
34 | if ($y < 0.0 || 1.0 < $y) { |
||
35 | throw new InvalidArgumentException('$y must be within [0.0, 1.0]'); |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 |