Skip to content
Permalink
Browse files

Add more info for too many params error

  • Loading branch information
muglug committed Dec 9, 2019
1 parent 517aaac commit 40bdc219ffbafe6dcf1aae683633d55140df3147
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Psalm/Type/Atomic/GenericTrait.php
@@ -289,7 +289,7 @@ public function checkGenericParams(
} elseif ($template_type_count < $template_param_count) {
if (IssueBuffer::accepts(
new TooManyTemplateParams(
$this->value . ' has too many template params, expecting '
$this->getId(). ' has too many template params, expecting '
. $template_type_count,
$code_location
),
@@ -329,7 +329,9 @@ public function checkGenericParams(
if (!TypeAnalyzer::isContainedBy($codebase, $type_param, $expected_type_param)) {
if (IssueBuffer::accepts(
new InvalidTemplateParam(
'Extended template param ' . $template_name . ' expects type '
'Extended template param ' . $template_name
. ' of ' . $this->getId()
. ' expects type '
. $expected_type_param->getId()
. ', type ' . $type_param->getId() . ' given',
$code_location

0 comments on commit 40bdc21

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