Skip to content

Commit 807f9c9

Browse files
committed
remove useless getMax method from interval
1 parent 3241c85 commit 807f9c9

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/Interval.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,4 @@ public function merge(Interval $otherInterval): Interval
7777
max($this->getHigh(), $otherInterval->getHigh())
7878
);
7979
}
80-
81-
public function getMax(): Interval
82-
{
83-
return $this;
84-
}
8580
}

src/Node.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function copyPairFrom(Node $otherNode): void
125125

126126
public function updateMax(): void
127127
{
128-
$this->max = $this->getPair()->getInterval()->getMax();
128+
$this->max = $this->getPair()->getInterval();
129129

130130
if ($this->getRight()->max !== null) {
131131
$this->max = $this->max->merge($this->getRight()->max);

0 commit comments

Comments
 (0)