Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1307-1315 (lines=9) @@
1304
			// The exception being, during an undo, the current revision might
1305
			// differ from the prior revision.
1306
			$logger = LoggerFactory::getInstance( 'editpage' );
1307
			if ( $this->contentModel !== $rev->getContentModel() ) {
1308
				$logger->warning( "Overriding content model from current edit {prev} to {new}", [
1309
					'prev' => $this->contentModel,
1310
					'new' => $rev->getContentModel(),
1311
					'title' => $this->getTitle()->getPrefixedDBkey(),
1312
					'method' => __METHOD__
1313
				] );
1314
				$this->contentModel = $rev->getContentModel();
1315
			}
1316
1317
			// Given that the content models should match, the current selected
1318
			// format should be supported.
@@ 1319-1328 (lines=10) @@
1316
1317
			// Given that the content models should match, the current selected
1318
			// format should be supported.
1319
			if ( !$content->isSupportedFormat( $this->contentFormat ) ) {
1320
				$logger->warning( "Current revision content format unsupported. Overriding {prev} to {new}", [
1321
1322
					'prev' => $this->contentFormat,
1323
					'new' => $rev->getContentFormat(),
1324
					'title' => $this->getTitle()->getPrefixedDBkey(),
1325
					'method' => __METHOD__
1326
				] );
1327
				$this->contentFormat = $rev->getContentFormat();
1328
			}
1329
		}
1330
		return $content;
1331
	}