Skip to content

[DeadCode] Add RemoveArgumentFromDefaultParentCallRector#6949

Merged
TomasVotruba merged 3 commits intomainfrom
remo-de
Jun 1, 2025
Merged

[DeadCode] Add RemoveArgumentFromDefaultParentCallRector#6949
TomasVotruba merged 3 commits intomainfrom
remo-de

Conversation

@samsonasik
Copy link
Copy Markdown
Member

This to remove argument from parent:: call when argument value is equal with parent default value on exactly same position.

-parent::__construct([]);
+parent::__construct();

when parent method is exactly have same value with default:

class SomeParent
{
    public function __construct(array $params = [])
    {
    }
}

@samsonasik samsonasik marked this pull request as draft June 1, 2025 13:59
@samsonasik samsonasik marked this pull request as ready for review June 1, 2025 14:06
@samsonasik
Copy link
Copy Markdown
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit c106ed8 into main Jun 1, 2025
45 checks passed
@TomasVotruba TomasVotruba deleted the remo-de branch June 1, 2025 21:16
@TomasVotruba
Copy link
Copy Markdown
Member

Looks good 💯

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants