Code Duplication    Length = 5-5 lines in 2 locations

includes/api/ApiWatch.php 2 locations

@@ 112-116 (lines=5) @@
109
		if ( $params['unwatch'] ) {
110
			$status = UnwatchAction::doUnwatch( $title, $user );
111
			$res['unwatched'] = $status->isOK();
112
			if ( $status->isOK() ) {
113
				$msgKey = $title->isTalkPage() ? 'removedwatchtext-talk' : 'removedwatchtext';
114
				$res['message'] = $this->msg( $msgKey, $title->getPrefixedText() )
115
					->title( $title )->parseAsBlock();
116
			}
117
		} else {
118
			$status = WatchAction::doWatch( $title, $user );
119
			$res['watched'] = $status->isOK();
@@ 120-124 (lines=5) @@
117
		} else {
118
			$status = WatchAction::doWatch( $title, $user );
119
			$res['watched'] = $status->isOK();
120
			if ( $status->isOK() ) {
121
				$msgKey = $title->isTalkPage() ? 'addedwatchtext-talk' : 'addedwatchtext';
122
				$res['message'] = $this->msg( $msgKey, $title->getPrefixedText() )
123
					->title( $title )->parseAsBlock();
124
			}
125
		}
126
127
		if ( !$status->isOK() ) {