Skip to content

Commit

Permalink
Fix feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed May 21, 2020
1 parent 04e6094 commit 474d1eb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Intervals.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ public static function compactConstraint(ConstraintInterface $constraint)
$isConjunctive = true;
for ($i = 0; $i < $count-1; $i++) {
$interval = $numeric[$i];
if (isset($numeric[$i+1]) && $interval->getEnd()->getVersion() === $numeric[$i+1]->getStart()->getVersion() && $interval->getEnd()->getOperator() === '<' && $numeric[$i+1]->getStart()->getOperator() === '>') {
if ($interval->getEnd()->getVersion() === $numeric[$i+1]->getStart()->getVersion() && $interval->getEnd()->getOperator() === '<' && $numeric[$i+1]->getStart()->getOperator() === '>') {
$constraints[] = new Constraint('!=', $interval->getEnd()->getVersion());
$numeric[$i+1] = new Interval($interval->getStart(), $numeric[$i+1]->getEnd());
$isConjunctive = true;
continue;
}

Expand Down

0 comments on commit 474d1eb

Please sign in to comment.