Code Duplication    Length = 9-9 lines in 2 locations

src/Routing/Matcher/UriMatcher.php 1 location

@@ 89-97 (lines=9) @@
86
     */
87
    public function match()
88
    {
89
        foreach($this->resolver as $resolver){
90
            if(is_array($target = call_user_func([$this,$resolver]))) {
91
                $this->setTarget($target);
92
                if($this->router->middleware->globalMiddleware() === false || $this->router->middleware->blockMiddleware() === false || $this->router->middleware->classMiddleware() === false || $this->router->middleware->routeMiddleware() === false)
93
                    return null;
94
                $this->router->response->setStatusCode(202);
95
                return true;
96
            }
97
        }
98
        return false;
99
    }
100

src/Routing/Matcher/ArrayMatcher.php 1 location

@@ 189-197 (lines=9) @@
186
    private function generateTarget()
187
    {
188
        if ($this->validMethod()) {
189
            foreach ($this->resolver as $resolver) {
190
                if (is_array($target = call_user_func_array([$this, $resolver], [$this->router->route->getCallback()]))) {
191
                    $this->setTarget($target);
192
                    if ($this->router->middleware->globalMiddleware() === false || $this->router->middleware->blockMiddleware() === false || $this->router->middleware->classMiddleware() === false || $this->router->middleware->routeMiddleware() === false)
193
                        return null;
194
                    $this->router->response->setStatusCode(202);
195
                    return true;
196
                }
197
            }
198
            return false;
199
        }
200
        $this->router->response->setStatusCode(405);