original_string: private function factoryCallableCriteria($criteria)
      {
          if (!$this->isCallable($criteria)) {
              $criteria = function ($element, $key) use ($criteria) {
                  return $element->fetch($criteria);
              };
          }
  
          return $criteria;
      }
code: private function factoryCallableCriteria($criteria)
      {
          if (!$this->isCallable($criteria)) {
              $criteria = function ($element, $key) use ($criteria) {
                  return $element->fetch($criteria);
              };
          }
  
          return $criteria;
      }
code_tokens: private function factoryCallableCriteria ( $ criteria ) { if ( ! $ this -> isCallable ( $ criteria ) ) { $ criteria = function ( $ element , $ key ) use ( $ criteria ) { return $ element -> fetch ( $ criteria ) ; } ; } return $ criteria ; }
docstring: Get a function that returns something based on an element item
  
  @mixed $criteria either a callable function that returns a value or a
  string that is an element key
  
  @return callable
docstring_tokens: Get a function that returns something based on an element item