original_string: private function digToc($id, array $header, array &$headers){
  		$keys = array_keys($headers);
  		krsort($keys);
  		$done = false;
  		foreach( $keys as $key ){
  			if( $headers[$key]['level'] < $header['level'] ){
  				if( !$this->digToc($id, $header, $headers[$key]['children']) ){
  					$headers[$key]['children'][$id] = $header;
  				}
  				return true;
  			}
  		}
  		return false;
  	}
code: private function digToc($id, array $header, array &$headers){
  		$keys = array_keys($headers);
  		krsort($keys);
  		$done = false;
  		foreach( $keys as $key ){
  			if( $headers[$key]['level'] < $header['level'] ){
  				if( !$this->digToc($id, $header, $headers[$key]['children']) ){
  					$headers[$key]['children'][$id] = $header;
  				}
  				return true;
  			}
  		}
  		return false;
  	}
code_tokens: private function digToc ( $ id , array $ header , array & $ headers ) { $ keys = array_keys ( $ headers ) ; krsort ( $ keys ) ; $ done = false ; foreach ( $ keys as $ key ) { if ( $ headers [ $ key ] [ 'level' ] < $ header [ 'level' ] ) { if ( ! $ this -> digToc ( $ id , $ header , $ headers [ $ key ] [ 'children' ] ) ) { $ headers [ $ key ] [ 'children' ] [ $ id ] = $ header ; } return true ; } } return false ; }
docstring: Arrange toc elements
  
  @param string $id
  @param array $header
  @param array $headers
  
  @return bool
docstring_tokens: Arrange toc elements