Code Duplication    Length = 11-11 lines in 2 locations

src/LocalDate.php 2 locations

@@ 408-418 (lines=11) @@
405
     *
406
     * @throws \Exception When the given param is not a valid date interval
407
     */
408
    public function addInterval($interval)
409
    {
410
        if (! $interval instanceof \DateInterval) {
411
            $interval = new \DateInterval($interval);
412
        }
413
414
        $dateCloned = clone $this->date;
415
        $dateCloned->add($interval);
416
417
        return new LocalDate($dateCloned, $this->timezone);
418
    }
419
420
    /**
421
     * @param \DateInterval|string $interval
@@ 427-437 (lines=11) @@
424
     *
425
     * @throws \Exception When the given param is not a valid date interval
426
     */
427
    public function subInterval($interval)
428
    {
429
        if (! $interval instanceof \DateInterval) {
430
            $interval = new \DateInterval($interval);
431
        }
432
433
        $dateCloned = clone $this->date;
434
        $dateCloned->sub($interval);
435
436
        return new LocalDate($dateCloned, $this->timezone);
437
    }
438
439
    /**
440
     * @param $minutesInterval