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

@@ 357-374 (lines=18) @@
354
	 *
355
	 * @return array
356
	 */
357
	protected static function getSelectFields() {
358
		global $wgContentHandlerUseDB, $wgPageLanguageUseDB;
359
360
		$fields = [
361
			'page_namespace', 'page_title', 'page_id',
362
			'page_len', 'page_is_redirect', 'page_latest',
363
		];
364
365
		if ( $wgContentHandlerUseDB ) {
366
			$fields[] = 'page_content_model';
367
		}
368
369
		if ( $wgPageLanguageUseDB ) {
370
			$fields[] = 'page_lang';
371
		}
372
373
		return $fields;
374
	}
375
376
	/**
377
	 * Create a new Title from an article ID