public function __construct(Coordinate $point1, Coordinate $point2) { $this->point1 = $point1; $this->point2 = $point2; }