Skip to content

Commit ccfb4ab

Browse files
committed
Results - make reasons unique
1 parent 5f0b1cc commit ccfb4ab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Type/AcceptsResult.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public static function extremeIdentity(self ...$operands): self
108108
}
109109
}
110110

111-
return new self($result, $reasons);
111+
return new self($result, array_values(array_unique($reasons)));
112112
}
113113

114114
public static function maxMin(self ...$operands): self
@@ -125,7 +125,7 @@ public static function maxMin(self ...$operands): self
125125
}
126126
}
127127

128-
return new self($result, $reasons);
128+
return new self($result, array_values(array_unique($reasons)));
129129
}
130130

131131
}

src/Type/IsSuperTypeOfResult.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ private static function mergeReasons(array $operands): array
153153
}
154154
}
155155

156-
return $reasons;
156+
return array_values(array_unique($reasons));
157157
}
158158

159159
}

0 commit comments

Comments
 (0)