original_string: private function doTraverse($node, $path = array())
      {
          foreach ($node as $name => $value) {
              $path[] = $name;
              $value = $this->doVisit($path, $value, self::BEFORE);
  
              if (is_array($value)) {
                  $value = $this->doTraverse($value, $path);
              }
  
              $value = $this->doVisit($path, $value, self::AFTER);
              $node[$name] = $value;
              array_pop($path);
          }
  
          return $node;
      }
code: private function doTraverse($node, $path = array())
      {
          foreach ($node as $name => $value) {
              $path[] = $name;
              $value = $this->doVisit($path, $value, self::BEFORE);
  
              if (is_array($value)) {
                  $value = $this->doTraverse($value, $path);
              }
  
              $value = $this->doVisit($path, $value, self::AFTER);
              $node[$name] = $value;
              array_pop($path);
          }
  
          return $node;
      }
code_tokens: private function doTraverse ( $ node , $ path = array ( ) ) { foreach ( $ node as $ name => $ value ) { $ path [ ] = $ name ; $ value = $ this -> doVisit ( $ path , $ value , self :: BEFORE ) ; if ( is_array ( $ value ) ) { $ value = $ this -> doTraverse ( $ value , $ path ) ; } $ value = $ this -> doVisit ( $ path , $ value , self :: AFTER ) ; $ node [ $ name ] = $ value ; array_pop ( $ path ) ; } return $ node ; }
docstring: Recursive traversal implementation
  
  @param mixed $node
  @param array $path
  @return mixed
docstring_tokens: Recursive traversal implementation