Code Duplication    Length = 11-11 lines in 2 locations

src/Routing/Matcher/ArrayMatcher.php 2 locations

@@ 239-249 (lines=11) @@
236
     * @return array|bool
237
     * @throws \Exception
238
     */
239
    public function isClosureAndTemplate($callback){
240
        if(is_array($cls = $this->isClosure($callback))) {
241
            if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->isTemplate($this->request['params']['template']))) {
242
                return array_merge(array_merge($cls, $tpl),[
243
                    'dispatcher' => $this->dispatcher['isClosureAndTemplate']
244
                ]);
245
            }
246
            return $cls;
247
        }
248
        return false;
249
    }
250
251
    /**
252
     * @param $callback
@@ 256-266 (lines=11) @@
253
     * @return array|bool
254
     * @throws \Exception
255
     */
256
    public function isControllerAndTemplate($callback){
257
        if(is_array($ctrl = $this->isController($callback))) {
258
            if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->isTemplate($this->request['params']['template']))) {
259
                return array_merge(array_merge($ctrl, $tpl),[
260
                    'dispatcher' => $this->dispatcher['isControllerAndTemplate']
261
                ]);
262
            }
263
            return $ctrl;
264
        }
265
        return false;
266
    }
267
268
269
    /**