Code Duplication    Length = 10-10 lines in 2 locations

src/Processor/Polyline/SimplifyDouglasPeucker.php 1 location

@@ 47-56 (lines=10) @@
44
     * @return Polyline
45
     * @throws RuntimeException
46
     */
47
    public function simplify(Polyline $polyline): Polyline
48
    {
49
        $result = $this->simplifyGeometry($polyline);
50
51
        if (!($result instanceof Polyline)) {
52
            throw new RuntimeException('Result is no Polyline', 9737647468);
53
        }
54
55
        return $result;
56
    }
57
58
    /**
59
     * This method is a workaround to allow simplifying polygons too. It'll be

src/Processor/Polyline/SimplifyBearing.php 1 location

@@ 41-50 (lines=10) @@
38
     * @return Polyline
39
     * @throws RuntimeException
40
     */
41
    public function simplify(Polyline $polyline): Polyline
42
    {
43
        $result = $this->simplifyGeometry($polyline);
44
45
        if (!($result instanceof Polyline)) {
46
            throw new RuntimeException('Result is no Polyline', 4231694400);
47
        }
48
49
        return $result;
50
    }
51
52
    /**
53
     * Simplifies the given polyline