Code Duplication    Length = 18-18 lines in 2 locations

includes/admin/reports/class-donor-reports-table.php 1 location

@@ 376-393 (lines=18) @@
373
	 * @uses   Give_Donor_Reports_Table::get_total_donors()
374
	 * @return void
375
	 */
376
	public function prepare_items() {
377
378
		$columns  = $this->get_columns();
379
		$hidden   = array(); // No hidden columns
380
		$sortable = $this->get_sortable_columns();
381
382
		$this->_column_headers = array( $columns, $hidden, $sortable );
383
384
		$this->items = $this->reports_data();
385
386
		$this->total = $this->get_donor_count();
387
388
		$this->set_pagination_args( array(
389
			'total_items' => $this->total,
390
			'per_page'    => $this->per_page,
391
			'total_pages' => ceil( $this->total / $this->per_page ),
392
		) );
393
	}
394
}
395

includes/admin/donors/class-donor-table.php 1 location

@@ 497-514 (lines=18) @@
494
	 *
495
	 * @return void
496
	 */
497
	public function prepare_items() {
498
499
		$columns  = $this->get_columns();
500
		$hidden   = array(); // No hidden columns.
501
		$sortable = $this->get_sortable_columns();
502
503
		$this->_column_headers = array( $columns, $hidden, $sortable );
504
505
		$this->items = $this->donor_data();
506
507
		$this->total = $this->get_donor_count();
508
509
		$this->set_pagination_args( array(
510
			'total_items' => $this->total,
511
			'per_page'    => $this->per_page,
512
			'total_pages' => ceil( $this->total / $this->per_page ),
513
		) );
514
	}
515
}
516