-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
- When using
uopz_get_propertyanduopz_set_property, PHPStan expects the first argument to be astringand throws an error when anobjectis used - When using
uopz_get_property, PHPStan throws an error saying that the result of that function isvoidand therefore should not be used
There may be other issues with uopz, these are the only ones I have come across so far
Code snippet that reproduces the problem
https://phpstan.org/r/f4c6578c-47ac-4f86-b1b8-326a99b787ed
Expected output
uopz_get_propertyanduopz_set_propertyallow both astringwhen setting a static class property and anobjectwhen setting an instance propertyuopz_get_propertyshould returnmixed
Did PHPStan help you today? Did it make you happy in any way?
As someone who first learned programming with strongly typed languages, I appreciate how PHPStan can force PHP to become a pseudo-strongishly typed language when you turn the level high enough
Reactions are currently unavailable