Code Duplication    Length = 6-7 lines in 2 locations

includes/changes/ChangesList.php 1 location

@@ 162-167 (lines=6) @@
159
		$classes = [];
160
		$logType = $rc->mAttribs['rc_log_type'];
161
162
		if ( $logType ) {
163
			$classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType );
164
		} else {
165
			$classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns' .
166
				$rc->mAttribs['rc_namespace'] . '-' . $rc->mAttribs['rc_title'] );
167
		}
168
169
		// Indicate watched status on the line to allow for more
170
		// comprehensive styling.

includes/changes/EnhancedChangesList.php 1 location

@@ 599-605 (lines=7) @@
596
		$classes = $this->getHTMLClasses( $rcObj, $rcObj->watched );
597
		$classes[] = 'mw-enhanced-rc';
598
599
		if ( $logType ) {
600
			# Log entry
601
			$classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType );
602
		} else {
603
			$classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns' .
604
				$rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
605
		}
606
607
		# Flag and Timestamp
608
		$data['recentChangesFlags'] = [