original_string: public function shiftFirstEntry(ContentStream $cs, $type, \Closure $withFilter = NULL) {
      if (($entry = $cs->findFirst($type, $withFilter)) != NULL) {
        $vars = $this->convertEntryTemplateVariables($entry, $cs);
        $cs->removeEntry($entry);
  
        return $vars;
      }
  
      return NULL;
    }
code: public function shiftFirstEntry(ContentStream $cs, $type, \Closure $withFilter = NULL) {
      if (($entry = $cs->findFirst($type, $withFilter)) != NULL) {
        $vars = $this->convertEntryTemplateVariables($entry, $cs);
        $cs->removeEntry($entry);
  
        return $vars;
      }
  
      return NULL;
    }
code_tokens: public function shiftFirstEntry ( ContentStream $ cs , $ type , \ Closure $ withFilter = NULL ) { if ( ( $ entry = $ cs -> findFirst ( $ type , $ withFilter ) ) != NULL ) { $ vars = $ this -> convertEntryTemplateVariables ( $ entry , $ cs ) ; $ cs -> removeEntry ( $ entry ) ; return $ vars ; } return NULL ; }
docstring: Finds the first occurence of the entry, removes it and returns the template Variables for it
  
  if nothing is found NULL is returned
  if entry is found it will be removed from content stream and its variables will be returned
  if $withFilter is given the function has to return true to find the entry
  @param Closure $withFilter function ($entry) should return TRUE if the filter matches
  @return Scalar|NULL
docstring_tokens: Finds the first occurence of the entry removes it and returns the template Variables for it