Skip to content
Permalink
Browse files

Add null check

  • Loading branch information
muglug committed Dec 11, 2019
1 parent 848cbbb commit c27d0d953b6eb90085bed3446253b92ab03d9737
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/Psalm/Internal/Analyzer/TypeAnalyzer.php
@@ -1865,7 +1865,7 @@ private static function isMatchingTypeContainedBy(
$replacement_templates = [];

if ($input_template_types) {
foreach ($input_template_types as $template_name => $template_type_map) {
foreach ($input_template_types as $template_name => $_) {
if (!isset($input_type_params[$i])) {
break;
}
@@ -1918,9 +1918,11 @@ private static function isMatchingTypeContainedBy(
}
}

$new_input_param->replaceTemplateTypesWithArgTypes(
$replacement_templates
);
if ($new_input_param) {
$new_input_param->replaceTemplateTypesWithArgTypes(
$replacement_templates
);
}

$new_input_params[] = $new_input_param ?: Type::getMixed();
}

0 comments on commit c27d0d9

Please sign in to comment.
You can’t perform that action at this time.