Code Duplication    Length = 7-7 lines in 2 locations

src/Routing/Matcher/ArrayMatcher.php 1 location

@@ 157-163 (lines=7) @@
154
    /**
155
     * @param array $target
156
     */
157
    public function setTarget($target = []){
158
        $index = isset($this->request['collection_index']) ? $this->request['collection_index'] : 0;
159
        $this->router->route->setDetail($this->request);
160
        $this->router->route->setTarget($target);
161
        $this->router->route->addTarget('block', $this->router->collection->getRoutes('block_'.$index));
162
        $this->router->route->addTarget('view_dir', $this->router->collection->getRoutes('view_dir_'.$index));
163
    }
164
165
    /**
166
     *

src/Routing/Matcher/UriMatcher.php 1 location

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