Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 12, 2024
1 parent 33a8596 commit d9bd5b8
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/NodeTypeResolver/PHPStan/Type/TypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,7 @@ private function createUnionOrSingleType(array $types): Type
return $types[0];
}

$unionType = new UnionType($types);

if ($unionType->isFloat()->yes()) {
return new IntegerType();
}

if ($unionType->isString()->yes()) {
return new StringType();
}

if ($unionType->isInteger()->yes()) {
return new IntegerType();
}

return $unionType;
return new UnionType($types);
}

private function removeValueFromConstantType(Type $type): Type
Expand Down

0 comments on commit d9bd5b8

Please sign in to comment.