Skip to content

Remove useless assign $parentNode = $parentNode #3938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2025

Conversation

samsonasik
Copy link
Contributor

No description provided.

@samsonasik
Copy link
Contributor Author

Ready to merge 👍

@ondrejmirtes
Copy link
Member

It's there so that it's obvious it's for the /** @var Node\Stmt\Function_|Node\Stmt\ClassMethod|PropertyHookStatementNode|Expr\Closure $parentNode */.

I'd only find it beneficial if we were able to get rid of the @var completely as well.

@samsonasik
Copy link
Contributor Author

it seems @var doesn't require assign for definition, ref https://phpstan.org/r/c3ba8ad1-4c11-4615-884a-6f960ee594ec

@samsonasik samsonasik force-pushed the remove-useless-assign branch from f8fc7fd to 18e1d27 Compare April 28, 2025 05:44
@samsonasik
Copy link
Contributor Author

@ondrejmirtes I removed the useless @var definition too 👍 18e1d27

and it seems working ok

@samsonasik
Copy link
Contributor Author

Compile phar notice seems unrelated, which e2e tried load very old rector 0.*

@ondrejmirtes ondrejmirtes merged commit adf032e into phpstan:2.1.x Apr 28, 2025
415 of 417 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@samsonasik samsonasik deleted the remove-useless-assign branch April 28, 2025 12:46
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.

2 participants