Code Duplication    Length = 9-9 lines in 2 locations

lib/ar/html.php 1 location

@@ 169-177 (lines=9) @@
166
			}
167
			$prevErrorSetting = libxml_use_internal_errors(true);
168
			if ( $dom->loadHTML( $html ) ) {
169
				if ( $encoding ) {
170
					foreach( $dom->childNodes as $item ) {
171
						if ( $item->nodeType == XML_PI_NODE ) {
172
							$dom->removeChild( $item );
173
							break;
174
						}
175
					}
176
					$dom->encoding = $encoding;
177
				}
178
				$domroot = $dom->documentElement;
179
				if ( $domroot ) {
180
					$result = self::parseHead( $dom );

lib/ar/xml.php 1 location

@@ 279-287 (lines=9) @@
276
			}
277
			$prevErrorSetting = libxml_use_internal_errors(true);
278
			if ( $dom->loadXML( $xml ) ) {
279
				if ( $encoding ) {
280
					foreach( $dom->childNodes as $item ) {
281
						if ( $item->nodeType == XML_PI_NODE ) {
282
							$dom->removeChild( $item );
283
							break;
284
						}
285
					}
286
					$dom->encoding = $encoding;
287
				}
288
				$domroot = $dom->documentElement;
289
				if ( $domroot ) {
290
					$result = self::parseHead( $dom );