Code Duplication    Length = 9-9 lines in 2 locations

includes/FileDeleteForm.php 1 location

@@ 103-111 (lines=9) @@
100
			$deleteReasonList = $wgRequest->getText( 'wpDeleteReasonList' );
101
			$deleteReason = $wgRequest->getText( 'wpReason' );
102
103
			if ( $deleteReasonList == 'other' ) {
104
				$reason = $deleteReason;
105
			} elseif ( $deleteReason != '' ) {
106
				// Entry from drop down menu + additional comment
107
				$reason = $deleteReasonList . wfMessage( 'colon-separator' )
108
					->inContentLanguage()->text() . $deleteReason;
109
			} else {
110
				$reason = $deleteReasonList;
111
			}
112
113
			$status = self::doDelete(
114
				$this->title,

includes/page/Article.php 1 location

@@ 1670-1678 (lines=9) @@
1667
		$deleteReasonList = $request->getText( 'wpDeleteReasonList', 'other' );
1668
		$deleteReason = $request->getText( 'wpReason' );
1669
1670
		if ( $deleteReasonList == 'other' ) {
1671
			$reason = $deleteReason;
1672
		} elseif ( $deleteReason != '' ) {
1673
			// Entry from drop down menu + additional comment
1674
			$colonseparator = wfMessage( 'colon-separator' )->inContentLanguage()->text();
1675
			$reason = $deleteReasonList . $colonseparator . $deleteReason;
1676
		} else {
1677
			$reason = $deleteReasonList;
1678
		}
1679
1680
		if ( $request->wasPosted() && $user->matchEditToken( $request->getVal( 'wpEditToken' ),
1681
			[ 'delete', $this->getTitle()->getPrefixedText() ] )