private function isAllowed(RequestInterface $request, array $route): bool
    {
        $allowed = true;

        if (false === empty($route['methods'])) {
            $allowed = in_array($request->getMethod(), (array)$route['methods']);
        }

        return $allowed;
    }
private function isAllowed(RequestInterface $request, array $route): bool
    {
        $allowed = true;

        if (false === empty($route['methods'])) {
            $allowed = in_array($request->getMethod(), (array)$route['methods']);
        }

        return $allowed;
    }
private function isAllowed ( RequestInterface $ request , array $ route ) : bool { $ allowed = true ; if ( false === empty ( $ route [ 'methods' ] ) ) { $ allowed = in_array ( $ request -> getMethod ( ) , ( array ) $ route [ 'methods' ] ) ; } return $ allowed ; }
Whether request method is allowed for given route

@param \Psr\Http\Message\RequestInterface $request
@param array $route
@return bool
Whether request method is allowed for given route