Code Duplication    Length = 7-7 lines in 2 locations

core/helpers/EEH_DTT_Helper.helper.php 2 locations

@@ 289-295 (lines=7) @@
286
     * @throws EE_Error
287
     * @throws Exception
288
     */
289
    public static function date_time_add(EE_Base_Class $obj, $datetime_field_name, $period = 'years', $value = 1)
290
    {
291
        //get the raw UTC date.
292
        $DateTime = $obj->get_DateTime_object($datetime_field_name);
293
        $DateTime = EEH_DTT_Helper::calc_date($DateTime, $period, $value);
294
        return EEH_DTT_Helper::_set_date_time_field($obj, $DateTime, $datetime_field_name);
295
    }
296
297
298
    /**
@@ 310-316 (lines=7) @@
307
     * @throws EE_Error
308
     * @throws Exception
309
     */
310
    public static function date_time_subtract(EE_Base_Class $obj, $datetime_field_name, $period = 'years', $value = 1)
311
    {
312
        //get the raw UTC date
313
        $DateTime = $obj->get_DateTime_object($datetime_field_name);
314
        $DateTime = EEH_DTT_Helper::calc_date($DateTime, $period, $value, '-');
315
        return EEH_DTT_Helper::_set_date_time_field($obj, $DateTime, $datetime_field_name);
316
    }
317
318
319
    /**