-
-
Notifications
You must be signed in to change notification settings - Fork 933
Closed
Description
Support question
I'm trying to fix static typing issue in my code but whatever I do, something complains. With the following code PHPStorm's EA extension complains (rightly) that $messageInterfaces might not support array operations (because it may be false):
$messageInterfaces = \class_implements('SomeClass');
$messageInterfaces[] = 'foobar';But when I fix this and check for false, then PHPStan complains that comparison between false and array is always false.
https://phpstan.org/r/6e1121b4-9b76-4403-8125-767d5b0003bc
What I don't understand is why this works fine with PHP8. To my knowledge the signature of \class_implements() did not change between 7.4 and 8.
Metadata
Metadata
Assignees
Labels
No labels