private function getCustomHttpMethod($httpMethod, array $resources, array $arguments)
    {
        if (in_array($httpMethod, $this->availableConventionalActions)) {
            // allow hypertext as the engine of application state
            // through conventional GET actions
            return 'get';
        }

        if (count($arguments) < count($resources)) {
            // resource collection
            return 'get';
        }

        // custom object
        return 'patch';
    }
private function getCustomHttpMethod($httpMethod, array $resources, array $arguments)
    {
        if (in_array($httpMethod, $this->availableConventionalActions)) {
            // allow hypertext as the engine of application state
            // through conventional GET actions
            return 'get';
        }

        if (count($arguments) < count($resources)) {
            // resource collection
            return 'get';
        }

        // custom object
        return 'patch';
    }
private function getCustomHttpMethod ( $ httpMethod , array $ resources , array $ arguments ) { if ( in_array ( $ httpMethod , $ this -> availableConventionalActions ) ) { // allow hypertext as the engine of application state // through conventional GET actions return 'get' ; } if ( count ( $ arguments ) < count ( $ resources ) ) { // resource collection return 'get' ; } // custom object return 'patch' ; }
Returns custom HTTP method for provided list of resources, arguments, method.

@param string                 $httpMethod current HTTP method
@param string[]               $resources  resources list
@param \ReflectionParameter[] $arguments  list of method arguments

@return string
Returns custom HTTP method for provided list of resources arguments method .