Code Duplication    Length = 10-10 lines in 2 locations

src/Polygon.php 1 location

@@ 258-267 (lines=10) @@
255
     *
256
     * @return Polygon
257
     */
258
    public function getReverse(): Polygon
259
    {
260
        $reversed = new self();
261
262
        foreach (array_reverse($this->points) as $point) {
263
            $reversed->addPoint($point);
264
        }
265
266
        return $reversed;
267
    }
268
}
269

src/Polyline.php 1 location

@@ 154-163 (lines=10) @@
151
     *
152
     * @return Polyline
153
     */
154
    public function getReverse(): Polyline
155
    {
156
        $reversed = new self();
157
158
        foreach (array_reverse($this->points) as $point) {
159
            $reversed->addPoint($point);
160
        }
161
162
        return $reversed;
163
    }
164
165
    /**
166
     * Returns the point which is defined by the avarages of all