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

@@ 123-132 (lines=10) @@
120
     *
121
     * @return Polyline
122
     */
123
    public function getReverse(): Polyline
124
    {
125
        $reversed = new static();
126
127
        foreach (array_reverse($this->points) as $point) {
128
            $reversed->addPoint($point);
129
        }
130
131
        return $reversed;
132
    }
133
134
    /**
135
     * @return Coordinate|null