Code Duplication    Length = 7-7 lines in 2 locations

src/Middleware/IncludeResponse.php 1 location

@@ 46-52 (lines=7) @@
43
    {
44
        $file = $this->getFilename($request, 'php');
45
46
        if (!is_file($file)) {
47
            if ($this->continueOnError) {
48
                return $next($request, $response);
49
            }
50
51
            return $response->withStatus(404);
52
        }
53
54
        if (strtolower(pathinfo($file, PATHINFO_EXTENSION)) === 'php') {
55
            $level = ob_get_level();

src/Middleware/ReadResponse.php 1 location

@@ 45-51 (lines=7) @@
42
    public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)
43
    {
44
        //If the method is not allowed
45
        if ($request->getMethod() !== 'GET') {
46
            if ($this->continueOnError) {
47
                return $next($request, $response);
48
            }
49
50
            return $response->withStatus(405);
51
        }
52
53
        $file = $this->getFilename($request);
54