Code Duplication    Length = 4-6 lines in 2 locations

includes/api/ApiQueryProtectedTitles.php 1 location

@@ 169-174 (lines=6) @@
166
	}
167
168
	public function getCacheMode( $params ) {
169
		if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
170
			// formatComment() calls wfMessage() among other things
171
			return 'anon-public-user-private';
172
		} else {
173
			return 'public';
174
		}
175
	}
176
177
	public function getAllowedParams() {

includes/api/ApiQueryRecentChanges.php 1 location

@@ 602-605 (lines=4) @@
599
		if ( $this->userCanSeeRevDel() ) {
600
			return 'private';
601
		}
602
		if ( !is_null( $params['prop'] ) && in_array( 'parsedcomment', $params['prop'] ) ) {
603
			// formatComment() calls wfMessage() among other things
604
			return 'anon-public-user-private';
605
		}
606
607
		return 'public';
608
	}