for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kata\Rover;
final class Coordinates
{
private $coordinateX;
private $coordinateY;
public function __construct(int $a_coordinateX, int $a_coordinateY)
$this->coordinateX = $a_coordinateX;
$this->coordinateY = $a_coordinateY;
}
public function coordinateX(): int
return $this->coordinateX;
public function coordinateY(): int
return $this->coordinateY;
public function equals(Coordinates $coordinates): bool
if ($this->coordinateX === $coordinates->coordinateX() && $this->coordinateY === $coordinates->coordinateY()) {
return true;
return false;