original_string: public function findFirstVariableAssignment(array $statements, $name, $notFoundError = null)
      {
          foreach ($this->filterAssignments($statements) as $assign) {
              if ($assign->var instanceof Variable && $assign->var->name === $name) {
                  return $assign;
              }
          }
  
          throw new \RuntimeException($notFoundError ?: sprintf('Variable assignment $%s not found', $name));
      }
code: public function findFirstVariableAssignment(array $statements, $name, $notFoundError = null)
      {
          foreach ($this->filterAssignments($statements) as $assign) {
              if ($assign->var instanceof Variable && $assign->var->name === $name) {
                  return $assign;
              }
          }
  
          throw new \RuntimeException($notFoundError ?: sprintf('Variable assignment $%s not found', $name));
      }
code_tokens: public function findFirstVariableAssignment ( array $ statements , $ name , $ notFoundError = null ) { foreach ( $ this -> filterAssignments ( $ statements ) as $ assign ) { if ( $ assign -> var instanceof Variable && $ assign -> var -> name === $ name ) { return $ assign ; } } throw new \ RuntimeException ( $ notFoundError ? : sprintf ( 'Variable assignment $%s not found' , $ name ) ) ; }
docstring: Find first variable assignment with a given name.
  
  @param array       $statements
  @param string      $name
  @param string|null $notFoundError
  
  @return Assign
docstring_tokens: Find first variable assignment with a given name .