Code Duplication    Length = 13-18 lines in 2 locations

includes/cache/LinkCache.php 1 location

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

includes/Title.php 1 location

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