Code Duplication    Length = 13-13 lines in 2 locations

includes/specials/SpecialBrokenRedirects.php 1 location

@@ 125-137 (lines=13) @@
122
		);
123
		$links = [];
124
		// if the page is editable, add an edit link
125
		if (
126
			// check user permissions
127
			$this->getUser()->isAllowed( 'edit' ) &&
128
			// check, if the content model is editable through action=edit
129
			ContentHandler::getForTitle( $fromObj )->supportsDirectEditing()
130
		) {
131
			$links[] = Linker::linkKnown(
132
				$fromObj,
133
				$this->msg( 'brokenredirects-edit' )->escaped(),
134
				[],
135
				[ 'action' => 'edit' ]
136
			);
137
		}
138
		$to = Linker::link(
139
			$toObj,
140
			null,

includes/specials/SpecialWhatlinkshere.php 1 location

@@ 385-397 (lines=13) @@
382
		];
383
384
		// if the page is editable, add an edit link
385
		if (
386
			// check user permissions
387
			$this->getUser()->isAllowed( 'edit' ) &&
388
			// check, if the content model is editable through action=edit
389
			ContentHandler::getForTitle( $target )->supportsDirectEditing()
390
		) {
391
			$links['edit'] = Linker::linkKnown(
392
				$target,
393
				$editText,
394
				[],
395
				[ 'action' => 'edit' ]
396
			);
397
		}
398
399
		// build the links html
400
		return $this->getLanguage()->pipeList( $links );