public function setHttpMethod($method)
    {
        $allowedMethods = array(
             'POST',
             'PUT',
             'GET',
             'DELETE',
             'PATCH'
        );
        if (!in_array(strtoupper($method), $allowedMethods)) {
            throw new \InvalidArgumentException('Provided method not allowed');
        }
        $this->httpMethod = strtoupper($method);
        return $this;
    }
public function setHttpMethod($method)
    {
        $allowedMethods = array(
             'POST',
             'PUT',
             'GET',
             'DELETE',
             'PATCH'
        );
        if (!in_array(strtoupper($method), $allowedMethods)) {
            throw new \InvalidArgumentException('Provided method not allowed');
        }
        $this->httpMethod = strtoupper($method);
        return $this;
    }
public function setHttpMethod ( $ method ) { $ allowedMethods = array ( 'POST' , 'PUT' , 'GET' , 'DELETE' , 'PATCH' ) ; if ( ! in_array ( strtoupper ( $ method ) , $ allowedMethods ) ) { throw new \ InvalidArgumentException ( 'Provided method not allowed' ) ; } $ this -> httpMethod = strtoupper ( $ method ) ; return $ this ; }
Method to set the HTTP verb for the request

@param string $method
Method to set the HTTP verb for the request