Code Duplication    Length = 11-11 lines in 2 locations

src/Processor/Polyline/SimplifyDouglasPeucker.php 1 location

@@ 74-84 (lines=11) @@
71
72
        $counterPoints = $geometry->getNumberOfPoints();
73
74
        if ($geometry instanceof Polygon) {
75
            if ($counterPoints <= 3) {
76
                return clone $geometry;
77
            }
78
            $result = new Polygon();
79
        } else {
80
            if ($counterPoints < 3) {
81
                return clone $geometry;
82
            }
83
            $result = new Polyline();
84
        }
85
86
        $simplifiedLine = $this->douglasPeucker($geometry->getPoints());
87

src/Processor/Polyline/SimplifyBearing.php 1 location

@@ 75-85 (lines=11) @@
72
73
        $counterPoints = $geometry->getNumberOfPoints();
74
75
        if ($geometry instanceof Polygon) {
76
            if ($counterPoints <= 3) {
77
                return clone $geometry;
78
            }
79
            $result = new Polygon();
80
        } else {
81
            if ($counterPoints < 3) {
82
                return clone $geometry;
83
            }
84
            $result = new Polyline();
85
        }
86
87
        $bearingCalc = new BearingEllipsoidal();
88