Code Duplication    Length = 5-5 lines in 2 locations

includes/payments/functions.php 2 locations

@@ 740-744 (lines=5) @@
737
	$args = apply_filters( 'give_get_earnings_by_date_args', $args );
738
	$key  = Give_Cache::get_key( 'give_stats', $args );
739
740
	if ( ! empty( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'give-refresh-reports' ) ) {
741
		$earnings = false;
742
	} else {
743
		$earnings = Give_Cache::get( $key );
744
	}
745
746
	if ( false === $earnings ) {
747
		$donations = get_posts( $args );
@@ 825-829 (lines=5) @@
822
823
	$key = Give_Cache::get_key( 'give_stats', $args );
824
825
	if ( ! empty( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'give-refresh-reports' ) ) {
826
		$count = false;
827
	} else {
828
		$count = Give_Cache::get( $key );
829
	}
830
831
	if ( false === $count ) {
832
		$donations = new WP_Query( $args );