Code Duplication    Length = 9-9 lines in 2 locations

includes/class-give-db-comments.php 1 location

@@ 387-395 (lines=9) @@
384
	 *
385
	 * @return mixed
386
	 */
387
	private function validate_params( &$args ) {
388
		// fields params
389
		$args['fields'] = 'ids' === $args['fields']
390
			? 'comment_ID'
391
			: $args['fields'];
392
		$args['fields'] = array_key_exists( $args['fields'], $this->get_columns() )
393
			? $args['fields']
394
			: 'all';
395
	}
396
}
397
398
// @todo: update cache logic.

includes/class-give-db-logs.php 1 location

@@ 383-391 (lines=9) @@
380
	 *
381
	 * @return mixed
382
	 */
383
	private function validate_params( &$args ) {
384
		// fields params
385
		$args['fields'] = 'ids' === $args['fields'] ?
386
			'ID' :
387
			$args['fields'];
388
		$args['fields'] = array_key_exists( $args['fields'], $this->get_columns() ) ?
389
			$args['fields'] :
390
			'all';
391
	}
392
}
393