Skip to content

Conversation

zonuexe
Copy link
Contributor

@zonuexe zonuexe commented Jan 12, 2023

@@ -534,6 +534,7 @@ private function processStmtNode(
false,
$scope->isInTrait(),
$scope->getClassReflection()->isReadOnly(),
false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that there is no processing to get the PHPDoc of the parameter of the constructor promotion, so I ignored it with false.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is: https://phpstan.org/r/f22ccc98-94c2-4b7e-9d0f-152bdc575803

But beware - it doesn't mean there's a default value because the code isn't desugared like that.

That's why one is allowed and the other isn't: https://phpstan.org/r/c9757b83-4b83-4ee5-b517-e92e89b44126

@ondrejmirtes ondrejmirtes merged commit e39bbec into phpstan:1.10.x Jan 16, 2023
@ondrejmirtes
Copy link
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default value of allow-private-mutation property warns
2 participants