Skip to content

Conversation

@fballiano
Copy link
Contributor

This PR applies the ChangeNestedIfsToEarlyReturnRector rule to convert nested if statements to early returns for better code readability.

Changes

  • Added ChangeNestedIfsToEarlyReturnRector to .rector.php
  • Applied the rule across 12 core files in various modules (Adminhtml, Bundle, Catalog, Core, Customer, Index, Rss)

Credits

Thanks to @sreichel for finding this rector rule.
See: OpenMage/magento-lts#5210

Converts nested if statements to early returns for better code readability.

Thanks to @sreichel for finding this rector rule.
See: OpenMage/magento-lts#5210
@fballiano fballiano changed the title Applied ChangeNestedIfsToEarlyReturnRector Applied ChangeNestedIfsToEarlyReturnRector Jan 3, 2026
@fballiano fballiano merged commit 22a0d88 into main Jan 3, 2026
23 of 24 checks passed
@fballiano fballiano deleted the nested-ifs-to-early-return branch January 3, 2026 14:17
@fballiano fballiano added this to the 26.1.0 milestone Jan 11, 2026
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