Code Duplication    Length = 7-7 lines in 2 locations

src/SpyClasses/SpyRouter.php 2 locations

@@ 84-90 (lines=7) @@
81
    public function addRoute($methods, $uri, $action)
82
    {
83
        $i = 2;
84
        while (
85
            ($info = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $i + 1)[$i])
86
            &&
87
            $this->isExcluded($info)
88
        ) {
89
            $i++;
90
        }
91
        $routeObj = $this->createRoute($methods, $uri, $action);
92
        $this->routesSpy && $this->routesSpy->addCallSiteInfo($routeObj, $info);
93
@@ 41-47 (lines=7) @@
38
        $newAttr = end($e);
39
40
        $i = 2;
41
        while (
42
            ($info = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $i + 1)[$i])
43
            &&
44
            $this->isExcluded($info)
45
        ) {
46
            $i++;
47
        }
48
        $ns = $newAttr['namespace'] ?? null;
49
        $dir = NamespaceCorrector::getRelativePathFromNamespace($ns);
50