original_string: public function next_sibling()
      {
          if ($this->parent === null) {
              return null;
          }
  
          $idx = 0;
          $count = count($this->parent->children);
          while ($idx < $count && $this !== $this->parent->children[$idx]) {
              ++$idx;
          }
          if (++$idx >= $count) {
              return null;
          }
          return $this->parent->children[$idx];
      }
code: public function next_sibling()
      {
          if ($this->parent === null) {
              return null;
          }
  
          $idx = 0;
          $count = count($this->parent->children);
          while ($idx < $count && $this !== $this->parent->children[$idx]) {
              ++$idx;
          }
          if (++$idx >= $count) {
              return null;
          }
          return $this->parent->children[$idx];
      }
code_tokens: public function next_sibling ( ) { if ( $ this -> parent === null ) { return null ; } $ idx = 0 ; $ count = count ( $ this -> parent -> children ) ; while ( $ idx < $ count && $ this !== $ this -> parent -> children [ $ idx ] ) { ++ $ idx ; } if ( ++ $ idx >= $ count ) { return null ; } return $ this -> parent -> children [ $ idx ] ; }
docstring: returns the next sibling of node
docstring_tokens: returns the next sibling of node