original_string: public function updateDepth()
      {
          $parentTag = $this->getParent( true );
          $depth = $parentTag instanceof self ? $parentTag->attribute( 'depth' ) + 1 : 1;
  
          $this->setAttribute( 'depth', $depth );
          $this->store();
  
          foreach ( $this->getSynonyms( true ) as $s )
          {
              $s->setAttribute( 'depth', $depth );
              $s->store();
          }
  
          foreach ( $this->getChildren( 0, null, true ) as $c )
          {
              $c->updateDepth();
          }
      }
code: public function updateDepth()
      {
          $parentTag = $this->getParent( true );
          $depth = $parentTag instanceof self ? $parentTag->attribute( 'depth' ) + 1 : 1;
  
          $this->setAttribute( 'depth', $depth );
          $this->store();
  
          foreach ( $this->getSynonyms( true ) as $s )
          {
              $s->setAttribute( 'depth', $depth );
              $s->store();
          }
  
          foreach ( $this->getChildren( 0, null, true ) as $c )
          {
              $c->updateDepth();
          }
      }
code_tokens: public function updateDepth ( ) { $ parentTag = $ this -> getParent ( true ) ; $ depth = $ parentTag instanceof self ? $ parentTag -> attribute ( 'depth' ) + 1 : 1 ; $ this -> setAttribute ( 'depth' , $ depth ) ; $ this -> store ( ) ; foreach ( $ this -> getSynonyms ( true ) as $ s ) { $ s -> setAttribute ( 'depth' , $ depth ) ; $ s -> store ( ) ; } foreach ( $ this -> getChildren ( 0 , null , true ) as $ c ) { $ c -> updateDepth ( ) ; } }
docstring: Updates depth of the tag and all of it's children and synonyms.
docstring_tokens: Updates depth of the tag and all of it s children and synonyms .