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

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