From 9c0475a423e7291de9e0df1cc7460b9527374f6b Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Sat, 21 Jan 2023 22:19:38 +0100 Subject: [PATCH] remove dead code in UnionType --- src/Type/UnionType.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Type/UnionType.php b/src/Type/UnionType.php index 8776291de5..378fcf3491 100644 --- a/src/Type/UnionType.php +++ b/src/Type/UnionType.php @@ -802,10 +802,8 @@ public function inferTemplateTypes(Type $receivedType): TemplateTypeMap $myTypes = $this->types; } - $myTemplateTypes = []; foreach ($myTypes as $type) { if ($type instanceof TemplateType || ($type instanceof GenericClassStringType && $type->getGenericType() instanceof TemplateType)) { - $myTemplateTypes[] = $type; continue; } $types = $types->union($type->inferTemplateTypes($receivedType));