Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

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