diff --git a/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php b/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php index 68ae54b0fcb..fef791d7368 100644 --- a/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php +++ b/rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php @@ -132,10 +132,6 @@ private function unionToSingleType(array $staticTypesByArgumentPosition, bool $r $unionedType ); - if ($staticTypeByArgumentPosition[$position]->isNull()->yes()) { - $staticTypeByArgumentPosition[$position] = new MixedType(); - } - if ($staticTypeByArgumentPosition[$position] instanceof UnionType) { foreach ($staticTypeByArgumentPosition[$position]->getTypes() as $subType) { if ($subType instanceof MixedType) {