original_string: public function isActionAvailable($object, $action)
      {
          $method = $this->getActionMethod($action);
          try {
              $ref = new \ReflectionMethod($object, $method);
              if ($ref->isPublic() && $method === $ref->name) {
                  return true;
              } else {
                  return false;
              }
          } catch (\ReflectionException $e) {
              return false;
          }
      }
code: public function isActionAvailable($object, $action)
      {
          $method = $this->getActionMethod($action);
          try {
              $ref = new \ReflectionMethod($object, $method);
              if ($ref->isPublic() && $method === $ref->name) {
                  return true;
              } else {
                  return false;
              }
          } catch (\ReflectionException $e) {
              return false;
          }
      }
code_tokens: public function isActionAvailable ( $ object , $ action ) { $ method = $ this -> getActionMethod ( $ action ) ; try { $ ref = new \ ReflectionMethod ( $ object , $ method ) ; if ( $ ref -> isPublic ( ) && $ method === $ ref -> name ) { return true ; } else { return false ; } } catch ( \ ReflectionException $ e ) { return false ; } }
docstring: Check if action name is available
  
  Returns false when
  1. method is not found
  2. method is not public
  3. method letters case error
  
  @param object $object The object of controller
  @param string $action The name of action
  @return bool
docstring_tokens: Check if action name is available