Code Duplication    Length = 7-7 lines in 2 locations

core/helpers/EEH_DTT_Helper.helper.php 2 locations

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