Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

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