| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 4.125 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | public function getNextPlaceToTry(PointInterface $current) |
|
| 20 | { |
||
| 21 | 1 | if ($current->getX() < $this->imgWidth) { |
|
| 22 | 1 | return new Point($current->getX() + $this->increment, $current->getY()); |
|
| 23 | } |
||
| 24 | |||
| 25 | if ($current->getY() < $this->imgHeight) { |
||
| 26 | return new Point(0, $current->getY() + $this->$increment); |
||
|
|
|||
| 27 | } |
||
| 28 | |||
| 29 | return false; |
||
| 30 | } |
||
| 31 | |||
| 38 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.