Skip to content

Commit

Permalink
Results - make reasons unique
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 9, 2024
1 parent 5f0b1cc commit ccfb4ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Type/AcceptsResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public static function extremeIdentity(self ...$operands): self
}
}

return new self($result, $reasons);
return new self($result, array_values(array_unique($reasons)));
}

public static function maxMin(self ...$operands): self
Expand All @@ -125,7 +125,7 @@ public static function maxMin(self ...$operands): self
}
}

return new self($result, $reasons);
return new self($result, array_values(array_unique($reasons)));
}

}
2 changes: 1 addition & 1 deletion src/Type/IsSuperTypeOfResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static function mergeReasons(array $operands): array
}
}

return $reasons;
return array_values(array_unique($reasons));
}

}

0 comments on commit ccfb4ab

Please sign in to comment.