src/Router/Helper/NotFound.php
protected function notFound(ServerRequestInterface $request, ResponseInterface $response)
    {
        $finalResponse = $response
            ->withProtocolVersion($request->getProtocolVersion())
            ->withStatus(404)
            ->withHeader('Content-Type', 'text/plain');
        
        $finalResponse->getBody()->write("Not found");
        
        return $finalResponse;
    }
protected function notFound(ServerRequestInterface $request, ResponseInterface $response)
    {
        $finalResponse = $response
            ->withProtocolVersion($request->getProtocolVersion())
            ->withStatus(404)
            ->withHeader('Content-Type', 'text/plain');
        
        $finalResponse->getBody()->write("Not found");
        
        return $finalResponse;
    }
protected function notFound ( ServerRequestInterface $ request , ResponseInterface $ response ) { $ finalResponse = $ response -> withProtocolVersion ( $ request -> getProtocolVersion ( ) ) -> withStatus ( 404 ) -> withHeader ( 'Content-Type' , 'text/plain' ) ; $ finalResponse -> getBody ( ) -> write ( "Not found" ) ; return $ finalResponse ; }
Return with a 404 not found response

@param ServerRequestInterface $request
@param ResponseInterface $response
@return ResponseInterface
Return with a 404 not found response