We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b87b4ed commit a86da0bCopy full SHA for a86da0b
src/Type/UnionType.php
@@ -1234,7 +1234,12 @@ private function notBenevolentUnionResults(callable $getResult): TrinaryLogic
1234
*/
1235
protected function unionTypes(callable $getType): Type
1236
{
1237
- return TypeCombinator::union(...array_map($getType, $this->types));
+ $newTypes = [];
1238
+ foreach($this->types as $type) {
1239
+ $newTypes[] = $getType($type);
1240
+ }
1241
+
1242
+ return TypeCombinator::union(...$newTypes);
1243
}
1244
1245
/**
0 commit comments