vimeo/psalm

MissingTemplateParam triggered by calling code

Open

#6,870 opened on Nov 9, 2021

View on GitHub
 (13 comments) (0 reactions) (0 assignees)PHP (668 forks)batch import
easy problemsenhancementgood first issue

Repository metrics

Stars
 (5,369 stars)
PR merge metrics
 (Avg merge 3d 12h) (5 merged PRs in 30d)

Description

Psalm version 4.12.0

ERROR: MissingTemplateParam - app/Services/ReportBuilder.php:126:19 - ArrayObject has missing template params, expecting 2 (see https://psalm.dev/182)
      $drawings = $sheeet->getDrawingCollection();

The problem is with the PhpSpreadsheet Worksheet class which only templates one argument.

I tried to make a simplified test case for this and it didn't work. This was the attempt. https://psalm.dev/r/1a3c9bae46

Contributor guide