Code Duplication    Length = 5-6 lines in 2 locations

includes/libs/xmp/XMP.php 2 locations

@@ 560-565 (lines=6) @@
557
		// when parsing truncated XML, which causes unit tests to fail.
558
		MediaWiki\suppressWarnings();
559
		while ( $reader->read() ) {
560
			if ( $reader->nodeType === XMLReader::ELEMENT ) {
561
				// Reached the first element without hitting a doctype declaration
562
				$this->parsable = self::PARSABLE_OK;
563
				$result = true;
564
				break;
565
			}
566
			if ( $reader->nodeType === XMLReader::DOC_TYPE ) {
567
				$this->parsable = self::PARSABLE_NO;
568
				$result = false;
@@ 566-570 (lines=5) @@
563
				$result = true;
564
				break;
565
			}
566
			if ( $reader->nodeType === XMLReader::DOC_TYPE ) {
567
				$this->parsable = self::PARSABLE_NO;
568
				$result = false;
569
				break;
570
			}
571
		}
572
		MediaWiki\restoreWarnings();
573