Code Duplication    Length = 9-10 lines in 2 locations

includes/EditPage.php 2 locations

@@ 1257-1265 (lines=9) @@
1254
			// Content models should always be the same since we error
1255
			// out if they are different before this point.
1256
			$logger = LoggerFactory::getInstance( 'editpage' );
1257
			if ( $this->contentModel !== $rev->getContentModel() ) {
1258
				$logger->warning( "Overriding content model from current edit {prev} to {new}", [
1259
					'prev' => $this->contentModel,
1260
					'new' => $rev->getContentModel(),
1261
					'title' => $this->getTitle()->getPrefixedDBkey(),
1262
					'method' => __METHOD__
1263
				] );
1264
				$this->contentModel = $rev->getContentModel();
1265
			}
1266
1267
			// Given that the content models should match, the current selected
1268
			// format should be supported.
@@ 1269-1278 (lines=10) @@
1266
1267
			// Given that the content models should match, the current selected
1268
			// format should be supported.
1269
			if ( !$content->isSupportedFormat( $this->contentFormat ) ) {
1270
				$logger->warning( "Current revision content format unsupported. Overriding {prev} to {new}", [
1271
1272
					'prev' => $this->contentFormat,
1273
					'new' => $rev->getContentFormat(),
1274
					'title' => $this->getTitle()->getPrefixedDBkey(),
1275
					'method' => __METHOD__
1276
				] );
1277
				$this->contentFormat = $rev->getContentFormat();
1278
			}
1279
1280
			return $content;
1281
		}