src/HtmlFormatter.php
private function removeElements( $elements ) {
		$list = $elements;
		if ( $elements instanceof \DOMNodeList ) {
			$list = [];
			foreach ( $elements as $element ) {
				$list[] = $element;
			}
		}
		/** @var $element \DOMElement */
		foreach ( $list as $element ) {
			if ( $element->parentNode ) {
				$element->parentNode->removeChild( $element );
			}
		}
		return $list;
	}
private function removeElements( $elements ) {
		$list = $elements;
		if ( $elements instanceof \DOMNodeList ) {
			$list = [];
			foreach ( $elements as $element ) {
				$list[] = $element;
			}
		}
		/** @var $element \DOMElement */
		foreach ( $list as $element ) {
			if ( $element->parentNode ) {
				$element->parentNode->removeChild( $element );
			}
		}
		return $list;
	}
private function removeElements ( $ elements ) { $ list = $ elements ; if ( $ elements instanceof \ DOMNodeList ) { $ list = [ ] ; foreach ( $ elements as $ element ) { $ list [ ] = $ element ; } } /** @var $element \DOMElement */ foreach ( $ list as $ element ) { if ( $ element -> parentNode ) { $ element -> parentNode -> removeChild ( $ element ) ; } } return $ list ; }
Removes a list of elelments from DOMDocument
@param array|\DOMNodeList $elements
@return array Array of removed elements
Removes a list of elelments from DOMDocument