Code Duplication    Length = 11-11 lines in 2 locations

src/RM/DateInterval.php 2 locations

@@ 57-67 (lines=11) @@
54
		}
55
	}
56
57
	public function add($interval) : self
58
	{
59
		$d1 = $this->getRefDT();
60
		$d1->add($this);
61
		$d1->add(new self($interval));
62
		$int = ($this->getRefDT())->diff($d1);
63
		self::__construct(self::parse($int));
64
		if ($d1 < $this->getRefDT())
65
			$this->invert = 1;
66
		return $this;
67
	}
68
69
	public function sub($interval) : self
70
	{
@@ 69-79 (lines=11) @@
66
		return $this;
67
	}
68
69
	public function sub($interval) : self
70
	{
71
		$d1 = $this->getRefDT();
72
		$d1->add($this);
73
		$d1->sub(new self($interval));
74
		$int = ($this->getRefDT())->diff($d1);
75
		self::__construct(self::parse($int));
76
		if ($d1 < $this->getRefDT())
77
			$this->invert = 1;
78
		return $this;
79
	}
80
81
	public function toSeconds() : int
82
	{