phpstan icon indicating copy to clipboard operation
phpstan copied to clipboard

Readonly property can be not set in if-else condition, and PHPStan yields no error

Open fluffycondor opened this issue 3 years ago • 2 comments

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.

fluffycondor avatar Jul 18 '22 14:07 fluffycondor

duplicate of https://github.com/phpstan/phpstan/issues/6402, this seems to be trickier unfortunately

herndlm avatar Jul 18 '22 14:07 herndlm

Oh thanks. I removed the duplicated part of the issue.

fluffycondor avatar Jul 18 '22 14:07 fluffycondor

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.

github-actions[bot] avatar Aug 06 '23 00:08 github-actions[bot]