Skip to content

Fix ClassConstFetch use on InvokableCommandInputAttributeRector #778

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
May 14, 2025

Conversation

samsonasik
Copy link
Member

@@ -55,7 +55,7 @@ class NameFromConstant
protected function __invoke(#[\Symfony\Component\Console\Attribute\Argument(name: self::ARGUMENT_NAME, description: 'The name of the person to greet.')]
?string $name, OutputInterface $output): int
{
$name = self::ARGUMENT_NAME;
$name = $name;
Copy link
Member Author

Choose a reason for hiding this comment

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

@mickverm this $name = $name equal is OK, it can be removed via Rector\DeadCode\Rector\Expression\SimplifyMirrorAssignRector with activate deadCode set

https://getrector.com/demo/29ca0dfe-2bf8-4ff9-ac6f-8f1b5e5161b3

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba I am merging it ;)

@samsonasik samsonasik merged commit 13a3990 into main May 14, 2025
5 checks passed
@samsonasik samsonasik deleted the fix-non-string branch May 14, 2025 10:19
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.

1 participant