original_string: public function isRelevant($action, $resource)
      {
          // Nested resources can be passed through a associative array, this way conditions which are
          // dependent upon the association will work when using a class.
          $resource = is_array($resource) ? head(array_keys($resource)) : $resource;
          return parent::isRelevant($action, $resource);
      }
code: public function isRelevant($action, $resource)
      {
          // Nested resources can be passed through a associative array, this way conditions which are
          // dependent upon the association will work when using a class.
          $resource = is_array($resource) ? head(array_keys($resource)) : $resource;
          return parent::isRelevant($action, $resource);
      }
code_tokens: public function isRelevant ( $ action , $ resource ) { // Nested resources can be passed through a associative array, this way conditions which are // dependent upon the association will work when using a class. $ resource = is_array ( $ resource ) ? head ( array_keys ( $ resource ) ) : $ resource ; return parent :: isRelevant ( $ action , $ resource ) ; }
docstring: Determine if current rule is relevant based on an action and resource
  
  @param string|array  $action Action in question
  @param string|mixed  $resource Name of resource or instance of object
  @return boolean
docstring_tokens: Determine if current rule is relevant based on an action and resource