Code Duplication    Length = 13-18 lines in 2 locations

includes/cache/LinkCache.php 1 location

@@ 210-222 (lines=13) @@
207
	 * @since 1.28
208
	 * @return array
209
	 */
210
	public static function getSelectFields() {
211
		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
212
213
		$fields = [ 'page_id', 'page_len', 'page_is_redirect', 'page_latest' ];
214
		if ( $wgContentHandlerUseDB ) {
215
			$fields[] = 'page_content_model';
216
		}
217
		if ( $wgPageLanguageUseDB ) {
218
			$fields[] = 'page_lang';
219
		}
220
221
		return $fields;
222
	}
223
224
	/**
225
	 * Add a title to the link cache, return the page_id or zero if non-existent

includes/Title.php 1 location

@@ 376-393 (lines=18) @@
373
	 *
374
	 * @return array
375
	 */
376
	protected static function getSelectFields() {
377
		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
378
379
		$fields = [
380
			'page_namespace', 'page_title', 'page_id',
381
			'page_len', 'page_is_redirect', 'page_latest',
382
		];
383
384
		if ( $wgContentHandlerUseDB ) {
385
			$fields[] = 'page_content_model';
386
		}
387
388
		if ( $wgPageLanguageUseDB ) {
389
			$fields[] = 'page_lang';
390
		}
391
392
		return $fields;
393
	}
394
395
	/**
396
	 * Create a new Title from an article ID