Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
29 | 8 | public function addRing(array $coordinates) |
|
30 | { |
||
31 | //die(var_dump((count($coordinates) - 1))); |
||
32 | 8 | if ($coordinates[0] != $coordinates[(count($coordinates) - 1)]) { |
|
33 | throw new \InvalidArgumentException('The first and last coordinates must be the same.'); |
||
34 | } |
||
35 | 8 | $this->rings[] = $coordinates; |
|
36 | 8 | return $this; |
|
37 | } |
||
48 |