phpstan
phpstan copied to clipboard
Readonly property can be not set in if-else condition, and PHPStan yields no error
Bug report
Readonly property can be not set in if-else condition, and PHPStan yields no error.
Code snippet that reproduces the problem
https://phpstan.org/r/9d088cab-7c46-4d83-a75b-739900979c5b
Expected output
This snippet should yield a "Readonly property not set in the constructor" issue.
duplicate of https://github.com/phpstan/phpstan/issues/6402, this seems to be trickier unfortunately
Oh thanks. I removed the duplicated part of the issue.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.