Code Duplication    Length = 8-10 lines in 2 locations

includes/skins/SkinTemplate.php 2 locations

@@ 985-994 (lines=10) @@
982
						];
983
					}
984
				// Checks if the page has some kind of viewable source content
985
				} elseif ( $title->hasSourceText() ) {
986
					// Adds view source view link
987
					$content_navigation['views']['viewsource'] = [
988
						'class' => ( $onPage && $action == 'edit' ) ? 'selected' : false,
989
						'text' => wfMessageFallback( "$skname-action-viewsource", 'viewsource' )
990
							->setContext( $this->getContext() )->text(),
991
						'href' => $title->getLocalURL( $this->editUrlOptions() ),
992
						'primary' => true, // don't collapse this in vector
993
					];
994
				}
995
996
				// Checks if the page exists
997
				if ( $title->exists() ) {
@@ 1006-1013 (lines=8) @@
1003
						'href' => $title->getLocalURL( 'action=history' ),
1004
					];
1005
1006
					if ( $title->quickUserCan( 'delete', $user ) ) {
1007
						$content_navigation['actions']['delete'] = [
1008
							'class' => ( $onPage && $action == 'delete' ) ? 'selected' : false,
1009
							'text' => wfMessageFallback( "$skname-action-delete", 'delete' )
1010
								->setContext( $this->getContext() )->text(),
1011
							'href' => $title->getLocalURL( 'action=delete' )
1012
						];
1013
					}
1014
1015
					if ( $title->quickUserCan( 'move', $user ) ) {
1016
						$moveTitle = SpecialPage::getTitleFor( 'Movepage', $title->getPrefixedDBkey() );