-
-
Notifications
You must be signed in to change notification settings - Fork 947
Wrong message - Instanceof between Xxx and string #5728
Copy link
Copy link
Closed
phpstan/phpstan-src
#1669Labels
Description
Bug report
Right part of instanceof operator can be a string. This is correctly evaluated by phpstan, however, the message is wrong and should display the actual given type.
Code snippet that reproduces the problem
https://phpstan.org/r/75cfa710-5a60-4be6-b706-e48cb685f453
Expected output
Instanceof between DateTimeImmutable and DateTime will always evaluate to false.
-Instanceof between DateTimeImmutable and string will always evaluate to false.
+Instanceof between DateTimeImmutable and DateTime will always evaluate to false.Reactions are currently unavailable