Code Duplication    Length = 16-17 lines in 2 locations

core/EE_Cron_Tasks.core.php 2 locations

@@ 221-237 (lines=17) @@
218
     * @param int $TXN_ID
219
     * @param int $PAY_ID
220
     */
221
    public static function schedule_update_transaction_with_payment(
222
        $timestamp,
223
        $TXN_ID,
224
        $PAY_ID
225
    ) {
226
        do_action('AHEE_log', __CLASS__, __FUNCTION__);
227
        // validate $TXN_ID and $timestamp
228
        $TXN_ID    = absint($TXN_ID);
229
        $timestamp = absint($timestamp);
230
        if ($TXN_ID && $timestamp) {
231
            wp_schedule_single_event(
232
                $timestamp,
233
                'AHEE__EE_Cron_Tasks__update_transaction_with_payment_2',
234
                array($TXN_ID, $PAY_ID)
235
            );
236
        }
237
    }
238
239
240
    /**
@@ 344-359 (lines=16) @@
341
     * @param int $timestamp
342
     * @param int $TXN_ID
343
     */
344
    public static function schedule_finalize_abandoned_transactions_check(
345
        $timestamp,
346
        $TXN_ID
347
    ) {
348
        // validate $TXN_ID and $timestamp
349
        $TXN_ID    = absint($TXN_ID);
350
        $timestamp = absint($timestamp);
351
        do_action('AHEE_log', __CLASS__, __FUNCTION__, $TXN_ID, '$TXN_ID');
352
        if ($TXN_ID && $timestamp) {
353
            wp_schedule_single_event(
354
                $timestamp,
355
                'AHEE__EE_Cron_Tasks__finalize_abandoned_transactions',
356
                array($TXN_ID)
357
            );
358
        }
359
    }
360
361
362
    /**