Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1274-1282 (lines=9) @@
1271
			// Content models should always be the same since we error
1272
			// out if they are different before this point.
1273
			$logger = LoggerFactory::getInstance( 'editpage' );
1274
			if ( $this->contentModel !== $rev->getContentModel() ) {
1275
				$logger->warning( "Overriding content model from current edit {prev} to {new}", [
1276
					'prev' => $this->contentModel,
1277
					'new' => $rev->getContentModel(),
1278
					'title' => $this->getTitle()->getPrefixedDBkey(),
1279
					'method' => __METHOD__
1280
				] );
1281
				$this->contentModel = $rev->getContentModel();
1282
			}
1283
1284
			// Given that the content models should match, the current selected
1285
			// format should be supported.
@@ 1286-1295 (lines=10) @@
1283
1284
			// Given that the content models should match, the current selected
1285
			// format should be supported.
1286
			if ( !$content->isSupportedFormat( $this->contentFormat ) ) {
1287
				$logger->warning( "Current revision content format unsupported. Overriding {prev} to {new}", [
1288
1289
					'prev' => $this->contentFormat,
1290
					'new' => $rev->getContentFormat(),
1291
					'title' => $this->getTitle()->getPrefixedDBkey(),
1292
					'method' => __METHOD__
1293
				] );
1294
				$this->contentFormat = $rev->getContentFormat();
1295
			}
1296
1297
			return $content;
1298
		}