Code Duplication    Length = 19-19 lines in 2 locations

includes/admin/tools/data/class-give-tools-delete-test-donors.php 1 location

@@ 364-382 (lines=19) @@
361
		return true;
362
	}
363
364
	public function get_delete_ids( $donation_ids, $page ) {
365
		$index            = $page --;
366
		$count            = count( $donation_ids );
367
		$temp             = 0;
368
		$current_page     = 0;
369
		$post_delete      = $this->per_step;
370
		$page_donation_id = array();
371
372
		foreach ( $donation_ids as $item ) {
373
			$temp ++;
374
			$page_donation_id[ $current_page ][] = $item;
375
			if ( $temp === $post_delete ) {
376
				$current_page ++;
377
				$temp = 0;
378
			}
379
		}
380
381
		return $page_donation_id[ $page ];
382
	}
383
384
	/**
385
	 * Given a key, get the information from the Database Directly

includes/admin/tools/data/class-give-tools-delete-import-donors.php 1 location

@@ 486-504 (lines=19) @@
483
	 *
484
	 * @return mixed
485
	 */
486
	public function get_delete_ids( $donation_ids, $page ) {
487
		$index            = $page --;
488
		$count            = count( $donation_ids );
489
		$temp             = 0;
490
		$current_page     = 0;
491
		$post_delete      = $this->per_step;
492
		$page_donation_id = array();
493
494
		foreach ( $donation_ids as $item ) {
495
			$temp ++;
496
			$page_donation_id[ $current_page ][] = $item;
497
			if ( $temp === $post_delete ) {
498
				$current_page ++;
499
				$temp = 0;
500
			}
501
		}
502
503
		return $page_donation_id[ $page ];
504
	}
505
506
	/**
507
	 * Given a key, get the information from the Database Directly