original_string: private function parseMenusSettings(\DOMNode $menus) {
  
  		foreach ((new \DOMXPath($menus->ownerDocument))->query('menu', $menus) as $menu) {
  
  			$id = $menu->getAttribute('id') ?: Menu::DEFAULT_ID;
  
  			if(isset($this->menus[$id])) {
  				$this->appendMenuEntries($menu->childNodes, $this->menus[$id]);
  			}
  			else {
  				$this->menus[$id] = $this->parseMenu($menu);
  			}
  
  		}
  
  	}
code: private function parseMenusSettings(\DOMNode $menus) {
  
  		foreach ((new \DOMXPath($menus->ownerDocument))->query('menu', $menus) as $menu) {
  
  			$id = $menu->getAttribute('id') ?: Menu::DEFAULT_ID;
  
  			if(isset($this->menus[$id])) {
  				$this->appendMenuEntries($menu->childNodes, $this->menus[$id]);
  			}
  			else {
  				$this->menus[$id] = $this->parseMenu($menu);
  			}
  
  		}
  
  	}
code_tokens: private function parseMenusSettings ( \ DOMNode $ menus ) { foreach ( ( new \ DOMXPath ( $ menus -> ownerDocument ) ) -> query ( 'menu' , $ menus ) as $ menu ) { $ id = $ menu -> getAttribute ( 'id' ) ? : Menu :: DEFAULT_ID ; if ( isset ( $ this -> menus [ $ id ] ) ) { $ this -> appendMenuEntries ( $ menu -> childNodes , $ this -> menus [ $ id ] ) ; } else { $ this -> menus [ $ id ] = $ this -> parseMenu ( $ menu ) ; } } }
docstring: parse menu tree
  if menus share the same id entries of later menus are appended
  to the first; other menu attributes are left unchanged
  
  
  @param \DOMNode $menus
  @throws ConfigException
docstring_tokens: parse menu tree if menus share the same id entries of later menus are appended to the first ; other menu attributes are left unchanged