Code Duplication    Length = 6-7 lines in 2 locations

src/Route/Route.php 2 locations

@@ 116-122 (lines=7) @@
113
        string $path = null,
114
        ContainerInterface $di = null
115
    ) {
116
        if ($this->mount) {
117
            // Remove the mount path to get base for controller
118
            $len = strlen($this->mount);
119
            if (substr($path, 0, $len) == $this->mount) {
120
                $path = ltrim(substr($path, $len), "/");
121
            }
122
        }
123
124
        $handler = new RouteHandler();
125
        return $handler->handle($this->methodMatched, $path, $this->handler, $this->arguments, $di);
@@ 139-144 (lines=6) @@
136
    public function getMatchedPath()
137
    {
138
        $path = $this->pathMatched;
139
        if ($this->mount) {
140
            $len = strlen($this->mount);
141
            if (substr($path, 0, $len) == $this->mount) {
142
                $path = ltrim(substr($path, $len), "/");
143
            }
144
        }
145
146
        return $path;
147
    }