Code Duplication    Length = 8-8 lines in 2 locations

core/libraries/batch/JobHandlers/AttendeesReport.php 1 location

@@ 76-83 (lines=8) @@
73
	}
74
75
76
	public function cleanup_job(JobParameters $job_parameters) {
77
		$this->_file_helper->delete(
78
			\EEH_File::remove_filename_from_filepath( $job_parameters->extra_datum( 'filepath' ) ),
79
			true,
80
			'd'
81
		);
82
		return new JobStepResponse( $job_parameters, __( 'Cleaned up temporary file', 'event_espresso' ) );
83
	}
84
85
	public function count_units_to_process() {
86
		return \EEM_Attendee::instance()->count();

core/libraries/batch/JobHandlers/RegistrationsReport.php 1 location

@@ 412-419 (lines=8) @@
409
	 * @param JobParameters $job_parameters
410
	 * @return boolean
411
	 */
412
	public function cleanup_job( JobParameters $job_parameters ){
413
		$this->_file_helper->delete(
414
			\EEH_File::remove_filename_from_filepath( $job_parameters->extra_datum( 'filepath' ) ),
415
			true,
416
			'd'
417
		);
418
		return new JobStepResponse( $job_parameters, __( 'Cleaned up temporary file', 'event_espresso' ) );
419
	}
420
}
421
422