original_string: protected function methodToAction($method, $collection = false)
      {
          if ($method == 'GET' && $collection) {
              $method = $method . '-collection';
          }
          return isset($this->methodToAction[$method]) ? $this->methodToAction[$method] : $this->defaultAction;
      }
code: protected function methodToAction($method, $collection = false)
      {
          if ($method == 'GET' && $collection) {
              $method = $method . '-collection';
          }
          return isset($this->methodToAction[$method]) ? $this->methodToAction[$method] : $this->defaultAction;
      }
code_tokens: protected function methodToAction ( $ method , $ collection = false ) { if ( $ method == 'GET' && $ collection ) { $ method = $ method . '-collection' ; } return isset ( $ this -> methodToAction [ $ method ] ) ? $ this -> methodToAction [ $ method ] : $ this -> defaultAction ; }
docstring: Convert HTTP method to action name
  
  @param string $method
  @param bool $collection
  @return string
docstring_tokens: Convert HTTP method to action name