Code Duplication    Length = 11-11 lines in 2 locations

src/Routing/Matcher/ArrayMatcher.php 2 locations

@@ 280-290 (lines=11) @@
277
     * @return array|bool
278
     * @throws \Exception
279
     */
280
    public function isClosureAndTemplate($callback)
281
    {
282
        if (is_array($cls = $this->isClosure($callback))) {
283
            if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->isTemplate($this->request['params']['template']))) {
284
                return array_merge(array_merge($cls, $tpl), [
285
                    'dispatcher' => $this->dispatcher['isClosureAndTemplate']
286
                ]);
287
            }
288
            return $cls;
289
        }
290
        return false;
291
    }
292
293
    /**
@@ 298-308 (lines=11) @@
295
     * @return array|bool
296
     * @throws \Exception
297
     */
298
    public function isControllerAndTemplate($callback)
299
    {
300
        if (is_array($ctrl = $this->isController($callback))) {
301
            if (is_array($this->request['params']) && isset($this->request['params']['template']) && is_array($tpl = $this->isTemplate($this->request['params']['template']))) {
302
                return array_merge(array_merge($ctrl, $tpl), [
303
                    'dispatcher' => $this->dispatcher['isControllerAndTemplate']
304
                ]);
305
            }
306
            return $ctrl;
307
        }
308
        return false;
309
    }
310
311