Code Duplication    Length = 10-10 lines in 2 locations

src/Clusterer.php 2 locations

@@ 255-264 (lines=10) @@
252
        // create a new copy of this object, don't just change existing one
253
        $bounds = clone $bounds;
254
255
        if ($this->spanBoundsLat) {
256
            // workaround for crossover bounds being rounded too aggressively
257
            if ($bounds->sw->latitude == 0) {
258
                $bounds->sw->latitude += 180;
259
            }
260
261
            $neLat = max(180 + $bounds->ne->latitude, 180 + $bounds->sw->latitude);
262
            $bounds->sw->latitude = $bounds->ne->latitude;
263
            $bounds->ne->latitude = $neLat;
264
        }
265
        if ($this->spanBoundsLng) {
266
            // workaround for crossover bounds being rounded too aggressively
267
            if ($bounds->sw->longitude == 0) {
@@ 265-274 (lines=10) @@
262
            $bounds->sw->latitude = $bounds->ne->latitude;
263
            $bounds->ne->latitude = $neLat;
264
        }
265
        if ($this->spanBoundsLng) {
266
            // workaround for crossover bounds being rounded too aggressively
267
            if ($bounds->sw->longitude == 0) {
268
                $bounds->sw->longitude += 360;
269
            }
270
271
            $neLng = max(360 + $bounds->ne->longitude, 360 + $bounds->sw->longitude);
272
            $bounds->sw->longitude = $bounds->ne->longitude;
273
            $bounds->ne->longitude = $neLng;
274
        }
275
276
        return $bounds;
277
    }