src/Traits/VerbsTrait.php
public function withVerbs(string ...$verbs): RouteInterface
    {
        foreach ($verbs as &$verb) {
            $verb = strtoupper($verb);
            if (!in_array($verb, RouteInterface::VERBS)) {
                throw new RouteException("Invalid HTTP verb `{$verb}`.");
            }

            unset($verb);
        }

        $route = clone $this;
        $route->verbs = $verbs;

        return $route;
    }
public function withVerbs(string ...$verbs): RouteInterface
    {
        foreach ($verbs as &$verb) {
            $verb = strtoupper($verb);
            if (!in_array($verb, RouteInterface::VERBS)) {
                throw new RouteException("Invalid HTTP verb `{$verb}`.");
            }

            unset($verb);
        }

        $route = clone $this;
        $route->verbs = $verbs;

        return $route;
    }
public function withVerbs ( string ... $ verbs ) : RouteInterface { foreach ( $ verbs as & $ verb ) { $ verb = strtoupper ( $ verb ) ; if ( ! in_array ( $ verb , RouteInterface :: VERBS ) ) { throw new RouteException ( "Invalid HTTP verb `{$verb}`." ) ; } unset ( $ verb ) ; } $ route = clone $ this ; $ route -> verbs = $ verbs ; return $ route ; }
Attach specific list of HTTP verbs to the route.

@param string ...$verbs

@return RouteInterface|$this

@throws RouteException
Attach specific list of HTTP verbs to the route .