diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php index 77f9a813014..4b2d2c9ca04 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php @@ -3855,10 +3855,8 @@ public static function checkTemplateResult( if ($union_comparison_result->type_coerced_from_mixed) { if (IssueBuffer::accepts( new MixedArgumentTypeCoercion( - 'Could not reconcile upper and lower bounds ' - . $upper_bound_type->getId() . ' and ' - . $lower_bound_type->getId() . ' for template param ' - . $template_name, + 'Type ' . $lower_bound_type->getId() . ' should be a subtype of ' + . $upper_bound_type->getId(), $code_location, $function_id ), @@ -3869,10 +3867,8 @@ public static function checkTemplateResult( } else { if (IssueBuffer::accepts( new ArgumentTypeCoercion( - 'Could not reconcile upper and lower bounds ' - . $upper_bound_type->getId() . ' and ' - . $lower_bound_type->getId() . ' for template param ' - . $template_name, + 'Type ' . $lower_bound_type->getId() . ' should be a subtype of ' + . $upper_bound_type->getId(), $code_location, $function_id ), @@ -3884,10 +3880,8 @@ public static function checkTemplateResult( } elseif ($union_comparison_result->scalar_type_match_found) { if (IssueBuffer::accepts( new InvalidScalarArgument( - 'Could not reconcile upper and lower bounds ' - . $upper_bound_type->getId() . ' and ' - . $lower_bound_type->getId() . ' for template param ' - . $template_name, + 'Type ' . $lower_bound_type->getId() . ' should be a subtype of ' + . $upper_bound_type->getId(), $code_location, $function_id ), @@ -3898,10 +3892,8 @@ public static function checkTemplateResult( } else { if (IssueBuffer::accepts( new InvalidArgument( - 'Could not reconcile upper and lower bounds ' - . $upper_bound_type->getId() . ' and ' - . $lower_bound_type->getId() . ' for template param ' - . $template_name, + 'Type ' . $lower_bound_type->getId() . ' should be a subtype of ' + . $upper_bound_type->getId(), $code_location, $function_id ),