Code Duplication    Length = 16-17 lines in 2 locations

core/EE_Cron_Tasks.core.php 2 locations

@@ 137-153 (lines=17) @@
134
	 * @param int $TXN_ID
135
	 * @param int $PAY_ID
136
	 */
137
	public static function schedule_update_transaction_with_payment(
138
		$timestamp,
139
		$TXN_ID,
140
		$PAY_ID
141
	) {
142
		do_action( 'AHEE_log', __CLASS__, __FUNCTION__ );
143
		// validate $TXN_ID and $timestamp
144
		$TXN_ID = absint( $TXN_ID );
145
		$timestamp = absint( $timestamp );
146
		if ( $TXN_ID && $timestamp ) {
147
			wp_schedule_single_event(
148
				$timestamp,
149
				'AHEE__EE_Cron_Tasks__update_transaction_with_payment_2',
150
				array( $TXN_ID, $PAY_ID )
151
			);
152
		}
153
	}
154
155
156
@@ 256-271 (lines=16) @@
253
	 * @param int $timestamp
254
	 * @param int $TXN_ID
255
	 */
256
	public static function schedule_finalize_abandoned_transactions_check(
257
		$timestamp,
258
		$TXN_ID
259
	) {
260
		// validate $TXN_ID and $timestamp
261
		$TXN_ID = absint( $TXN_ID );
262
		$timestamp = absint( $timestamp );
263
		do_action( 'AHEE_log', __CLASS__, __FUNCTION__, $TXN_ID, '$TXN_ID' );
264
		if ( $TXN_ID && $timestamp ) {
265
			wp_schedule_single_event(
266
				$timestamp,
267
				'AHEE__EE_Cron_Tasks__finalize_abandoned_transactions',
268
				array( $TXN_ID )
269
			);
270
		}
271
	}
272
273
274