Code Duplication    Length = 7-7 lines in 2 locations

core/helpers/EEH_DTT_Helper.helper.php 2 locations

@@ 389-395 (lines=7) @@
386
     * @return EE_Base_Class           return the EE_Base_Class object so right away you can do something with it
387
     *                                 (chaining)
388
     */
389
    public static function date_time_add(EE_Base_Class $obj, $datetime_field_name, $period = 'years', $value = 1)
390
    {
391
        //get the raw UTC date.
392
        $DateTime = $obj->get_DateTime_object($datetime_field_name);
393
        $DateTime = EEH_DTT_Helper::calc_date($DateTime, $period, $value);
394
        return EEH_DTT_Helper::_set_date_time_field($obj, $DateTime, $datetime_field_name);
395
    }
396
397
398
    /**
@@ 408-414 (lines=7) @@
405
     * @param int            $value
406
     * @return \EE_Base_Class
407
     */
408
    public static function date_time_subtract(EE_Base_Class $obj, $datetime_field_name, $period = 'years', $value = 1)
409
    {
410
        //get the raw UTC date
411
        $DateTime = $obj->get_DateTime_object($datetime_field_name);
412
        $DateTime = EEH_DTT_Helper::calc_date($DateTime, $period, $value, '-');
413
        return EEH_DTT_Helper::_set_date_time_field($obj, $DateTime, $datetime_field_name);
414
    }
415
416
417
    /**