XBRL-Report-Base.php
private function countDepth( &$nodes, $depth = 0 )
	{
		if ( $depth > $this->maxDepth ) $this->maxDepth = $depth;

		foreach ( $nodes as $nodeKey => &$node )
		{
			$node['depth'] = $depth;

			if ( ! isset( $node['children'] ) || count( $node['children'] ) === 0 ) continue;
			$this->countDepth( $node['children'], $depth + 1 );
		}
	}
private function countDepth( &$nodes, $depth = 0 )
	{
		if ( $depth > $this->maxDepth ) $this->maxDepth = $depth;

		foreach ( $nodes as $nodeKey => &$node )
		{
			$node['depth'] = $depth;

			if ( ! isset( $node['children'] ) || count( $node['children'] ) === 0 ) continue;
			$this->countDepth( $node['children'], $depth + 1 );
		}
	}
private function countDepth ( & $ nodes , $ depth = 0 ) { if ( $ depth > $ this -> maxDepth ) $ this -> maxDepth = $ depth ; foreach ( $ nodes as $ nodeKey => & $ node ) { $ node [ 'depth' ] = $ depth ; if ( ! isset ( $ node [ 'children' ] ) || count ( $ node [ 'children' ] ) === 0 ) continue ; $ this -> countDepth ( $ node [ 'children' ] , $ depth + 1 ) ; } }
Set the max depth
@param array $nodes The current hierarchy nodes
@param int $depth The current depth
Set the max depth