Code Duplication    Length = 4-4 lines in 4 locations

includes/Preferences.php 4 locations

@@ 598-601 (lines=4) @@
595
			$linkTools = [];
596
			$userName = $user->getName();
597
598
			if ( $allowUserCss ) {
599
				$cssPage = Title::makeTitleSafe( NS_USER, $userName . '/common.css' );
600
				$linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
601
			}
602
603
			if ( $allowUserJs ) {
604
				$jsPage = Title::makeTitleSafe( NS_USER, $userName . '/common.js' );
@@ 603-606 (lines=4) @@
600
				$linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
601
			}
602
603
			if ( $allowUserJs ) {
604
				$jsPage = Title::makeTitleSafe( NS_USER, $userName . '/common.js' );
605
				$linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
606
			}
607
608
			$defaultPreferences['commoncssjs'] = [
609
				'type' => 'info',
@@ 1141-1144 (lines=4) @@
1138
			$linkTools[] = "<a target='_blank' href=\"$mplink\">$previewtext</a>";
1139
1140
			# Create links to user CSS/JS pages
1141
			if ( $allowUserCss ) {
1142
				$cssPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.css' );
1143
				$linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
1144
			}
1145
1146
			if ( $allowUserJs ) {
1147
				$jsPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.js' );
@@ 1146-1149 (lines=4) @@
1143
				$linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
1144
			}
1145
1146
			if ( $allowUserJs ) {
1147
				$jsPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.js' );
1148
				$linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
1149
			}
1150
1151
			$display = $sn . ' ' . $context->msg( 'parentheses' )
1152
				->rawParams( $context->getLanguage()->pipeList( $linkTools ) )