Code Duplication    Length = 11-11 lines in 2 locations

src/Routing/Matcher/ArrayMatcher.php 2 locations

@@ 192-202 (lines=11) @@
189
     * @return array|bool
190
     * @throws \Exception
191
     */
192
    public function matchClosureTemplate($callback){
193
        if(is_array($cls = $this->matchClosure($callback))) {
194
            if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->matchTemplate($this->request['params']['template']))) {
195
                return array_merge(array_merge($cls, $tpl),[
196
                    'dispatcher' => [$this->dispatcher['matchClosure'], $this->dispatcher['matchTemplate']]
197
                ]);
198
            }
199
            return $cls;
200
        }
201
        return false;
202
    }
203
204
    /**
205
     * @param $callback
@@ 209-219 (lines=11) @@
206
     * @return array|bool
207
     * @throws \Exception
208
     */
209
    public function matchControllerTemplate($callback){
210
        if(is_array($ctrl = $this->matchController($callback))) {
211
            if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->matchTemplate($this->request['params']['template']))) {
212
                return array_merge(array_merge($ctrl, $tpl),[
213
                    'dispatcher' => [$this->dispatcher['matchController'], $this->dispatcher['matchTemplate']]
214
                ]);
215
            }
216
            return $ctrl;
217
        }
218
        return false;
219
    }
220
221
222
    /**