Code Duplication    Length = 10-10 lines in 2 locations

src/Polygon.php 1 location

@@ 248-257 (lines=10) @@
245
     *
246
     * @return Polygon
247
     */
248
    public function getReverse(): Polygon
249
    {
250
        $reversed = new static();
251
252
        foreach (array_reverse($this->points) as $point) {
253
            $reversed->addPoint($point);
254
        }
255
256
        return $reversed;
257
    }
258
}
259

src/Polyline.php 1 location

@@ 144-153 (lines=10) @@
141
     *
142
     * @return Polyline
143
     */
144
    public function getReverse(): Polyline
145
    {
146
        $reversed = new static();
147
148
        foreach (array_reverse($this->points) as $point) {
149
            $reversed->addPoint($point);
150
        }
151
152
        return $reversed;
153
    }
154
155
    /**
156
     * Returns the point which is defined by the avarages of all