public function allowMethod(string $method): Route
    {
        if (!in_array($method, self::$supportedMethods)) {
            throw new UnsupportedMethodException($method);
        }

        $this->methods[] = $method;

        return $this;
    }
public function allowMethod(string $method): Route
    {
        if (!in_array($method, self::$supportedMethods)) {
            throw new UnsupportedMethodException($method);
        }

        $this->methods[] = $method;

        return $this;
    }
public function allowMethod ( string $ method ) : Route { if ( ! in_array ( $ method , self :: $ supportedMethods ) ) { throw new UnsupportedMethodException ( $ method ) ; } $ this -> methods [ ] = $ method ; return $ this ; }
Allows an HTTP method.

@param string $method The HTTP method to allow
@return $this
@throws UnsupportedMethodException If the method is not supported
Allows an HTTP method .