Code Duplication    Length = 3-3 lines in 2 locations

src/Polygon.php 1 location

@@ 107-109 (lines=3) @@
104
            return $segments;
105
        }
106
107
        for ($i = 1; $i < $length; $i++) {
108
            $segments[] = new Line($this->points[$i - 1], $this->points[$i]);
109
        }
110
111
        // to close the polygon we have to add the final segment between
112
        // the last point and the first point

src/Polyline.php 1 location

@@ 109-111 (lines=3) @@
106
            return $segments;
107
        }
108
109
        for ($i = 1; $i < $length; $i++) {
110
            $segments[] = new Line($this->points[$i - 1], $this->points[$i]);
111
        }
112
113
        return $segments;
114
    }