Code Duplication    Length = 7-7 lines in 2 locations

src/Routing/Matcher/UriMatcher.php 1 location

@@ 103-109 (lines=7) @@
100
    /**
101
     * @param array $target
102
     */
103
    public function setTarget($target = []){
104
        $index = isset($this->request['collection_index']) ? $this->request['collection_index'] : 0;
105
        $this->router->route->setDetail($this->request);
106
        $this->router->route->setTarget($target);
107
        $this->router->route->addTarget('block', $this->router->collection->getRoutes('block_'.$index));
108
        $this->router->route->addTarget('view_dir', $this->router->collection->getRoutes('view_dir_'.$index));
109
    }
110
111
    /**
112
     * @return array|bool

src/Routing/Matcher/ArrayMatcher.php 1 location

@@ 197-203 (lines=7) @@
194
    /**
195
     * @param array $target
196
     */
197
    public function setTarget($target = []){
198
        $index = isset($this->request['collection_index']) ? $this->request['collection_index'] : 0;
199
        $this->router->route->setDetail($this->request);
200
        $this->router->route->setTarget($target);
201
        $this->router->route->addTarget('block', $this->router->collection->getRoutes('block_'.$index));
202
        $this->router->route->addTarget('view_dir', $this->router->collection->getRoutes('view_dir_'.$index));
203
    }
204
205
    /**
206
     *