Skip to content

Conversation

@TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba TomasVotruba changed the title [code-quaity] Skip complex new instance with args assigns in InlineArrayReturnAssignRector [code-quality] Skip complex new instance with args assigns in InlineArrayReturnAssignRector Mar 2, 2025
@TomasVotruba TomasVotruba merged commit 5a833e0 into main Mar 2, 2025
44 checks passed
@TomasVotruba TomasVotruba deleted the tv-skip-array-dim-assign branch March 2, 2025 15:24
$assign = $stmt->expr;

// skip new X instance with args to keep complex assign readable
if ($assign->expr instanceof New_ && $assign->expr->getArgs() !== []) {
Copy link
Member

Choose a reason for hiding this comment

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

isFirstClassCallable() need to be checked, or just use direct count($assign->expr->args) > 0 since getArgs() use assert

Copy link
Member

Choose a reason for hiding this comment

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 7, 2025

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 Dec 7, 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.

3 participants