Remove count() narrowing handling of empty array#3896
Conversation
Is already covered by the adaption of phpstan#3895
|
I realized late that this is slightly different though. the fix from @staabm is checking sizeType, while this was checking type. let's see what CI says, if in doubt, maybe it's better to keep? hmm on the other hand I do prefer a simpler if here though if possible :) |
|
I'll do a quick check for what I added this initially, can't remember |
|
no clue, it doesn't influence anything. independent of @staabm's sizeType check. even if I remove the whole sizeType check line no new tests start failing. while developing things initially, at some point, I'm sure the isIterableAtLeastOnce()->no() was needed to fix failing tests. but most likely I refactored then and it became irrelevant. if nobody else has another opinion, then I think it's fine to remove it |
|
agree we should not have code which does not fail tests when removed (except perf improvements) |
|
Thank you. |
Is already covered by the adaption of #3895