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

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