public function allowMethods(array $methods = []): Route
    {
        $this->methods = [];
        foreach ($methods as $method) {
            $this->allowMethod($method);
        }

        return $this;
    }
public function allowMethods(array $methods = []): Route
    {
        $this->methods = [];
        foreach ($methods as $method) {
            $this->allowMethod($method);
        }

        return $this;
    }
public function allowMethods ( array $ methods = [ ] ) : Route { $ this -> methods = [ ] ; foreach ( $ methods as $ method ) { $ this -> allowMethod ( $ method ) ; } return $ this ; }
Allows a list of HTTP methods.

@param string[] $methods The HTTP methods list to allow
@return $this
@throws UnsupportedMethodException If at least one of the methods is not supported
Allows a list of HTTP methods .