Skip to content

Conversation

@cs278
Copy link
Contributor

@cs278 cs278 commented Jan 12, 2020

Fixes phpstan/phpstan#2443

The return of array_filter($foo) has a type of array<mixed,mixed~0|0.0|''|false|null|array{}> which was not being regarded as a super type of an empty array.

I've also adjusted the ArrayType::describe() method to ensure mixed types with a subtracted type is explained.

@ondrejmirtes
Copy link
Member

Thank you, perfect! Next time, consider adding only a single commit with everything as this whole change is basically atomic.

@ondrejmirtes ondrejmirtes merged commit 8376548 into phpstan:master Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants