Code Duplication    Length = 10-10 lines in 2 locations

src/Polygon.php 1 location

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

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