/** * @param \Geometry\Points $points * @throws \InvalidArgumentException */ public function __construct(Points $points) { if (!$points->isClosed()) { throw new \InvalidArgumentException("points are not closed"); } $this->points = $points; }