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 (668 forks)batch import
Help wantedeasy problemsenhancementgood first issue

Repository metrics

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

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