vimeo/psalm

array_is_list makes the type less specific.

Open

#8,046 opened on Jun 2, 2022

View on GitHub
 (7 comments) (0 reactions) (1 assignee)PHP (5,369 stars) (668 forks)batch import
Help wantedeasy problemsenhancementgood first issue

Description

https://psalm.dev/r/ffab419792

The test1 function passes the test successfully.

Errors are generated for the test2 function because array_is_list turns the $arr type into a non-empty-list<array<array-key, string>|string>.

Contributor guide