src/Valkyrja/Routing/Route.php
public function setRequestMethods(array $requestMethods): self
    {
        if (array_diff($requestMethods, RequestMethod::validValues())) {
            throw new InvalidArgumentException('Invalid request methods set');
        }

        $this->requestMethods = $requestMethods;

        return $this;
    }
public function setRequestMethods(array $requestMethods): self
    {
        if (array_diff($requestMethods, RequestMethod::validValues())) {
            throw new InvalidArgumentException('Invalid request methods set');
        }

        $this->requestMethods = $requestMethods;

        return $this;
    }
Set the request methods.

@param array $requestMethods The request methods

@throws \InvalidArgumentException

@return $this