public function checkMethods(array $methods): array
    {
        return array_map(
            function($method) {
                $method = strtolower($method);
                if (!\in_array($method, self::METHODS, false)) {
                    throw new Exception("Method \"$method\" is not in allowed list [" . implode(',',
                            self::METHODS) . ']');
                }
                return $method;
            },
            $methods
        );
    }
public function checkMethods(array $methods): array
    {
        return array_map(
            function($method) {
                $method = strtolower($method);
                if (!\in_array($method, self::METHODS, false)) {
                    throw new Exception("Method \"$method\" is not in allowed list [" . implode(',',
                            self::METHODS) . ']');
                }
                return $method;
            },
            $methods
        );
    }
public function checkMethods ( array $ methods ) : array { return array_map ( function ( $ method ) { $ method = strtolower ( $ method ) ; if ( ! \ in_array ( $ method , self :: METHODS , false ) ) { throw new Exception ( "Method \"$method\" is not in allowed list [" . implode ( ',' , self :: METHODS ) . ']' ) ; } return $ method ; } , $ methods ) ; }
Check if passed methods in allowed list

@param   array $methods list of methods for check
@throws  Exception
@return  array
Check if passed methods in allowed list