public function setMethod($method)
    {
        // Allow null, otherwise expect an array or a string
        if (null !== $method && !is_array($method) && !is_string($method)) {
            throw new InvalidArgumentException('Expected an array or string. Got a '. gettype($method));
        }

        $this->method = $method;

        return $this;
    }
public function setMethod($method)
    {
        // Allow null, otherwise expect an array or a string
        if (null !== $method && !is_array($method) && !is_string($method)) {
            throw new InvalidArgumentException('Expected an array or string. Got a '. gettype($method));
        }

        $this->method = $method;

        return $this;
    }
public function setMethod ( $ method ) { // Allow null, otherwise expect an array or a string if ( null !== $ method && ! is_array ( $ method ) && ! is_string ( $ method ) ) { throw new InvalidArgumentException ( 'Expected an array or string. Got a ' . gettype ( $ method ) ) ; } $ this -> method = $ method ; return $ this ; }
Set the method

@param string|array|null $method
@throws InvalidArgumentException If a non-string or non-array type is passed
@return Route
Set the method