vimeo/psalm

array_is_list makes the type less specific.

Open

#8046 aperta il 2 giu 2022

Vedi su GitHub
 (7 commenti) (0 reazioni) (1 assegnatario)PHP (668 fork)batch import
Help wantedeasy problemsenhancementgood first issue

Metriche repository

Star
 (5369 star)
Metriche merge PR
 (Merge medio 3g 12h) (5 PR mergiate in 30 g)

Descrizione

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>.

Guida contributor