-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Rector: CQ - UnusedForeachValueToArrayKeysRector #4111
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector
See fix at rector: rectorphp/rector-src#6164
github-actions
bot
added
Component: PayPal
Relates to Mage_Paypal
Component: Core
Relates to Mage_Core
Component: Catalog
Relates to Mage_Catalog
Component: Reports
Relates to Mage_Reports
Component: Checkout
Relates to Mage_Checkout
Component: lib/Varien
Relates to lib/Varien
Component: Sales
Relates to Mage_Sales
Component: Customer
Relates to Mage_Customer
Component: Eav
Relates to Mage_Eav
Component: Adminhtml
Relates to Mage_Adminhtml
Component: Page
Relates to Mage_Page
Component: Tag
Relates to Mage_Tag
Component: Weee
Relates to Mage_Weee
Component: Shipping
Relates to Mage_Shipping
Component: Rule
Relates to Mage_Rule
Component: Payment
Relates to Mage_Payment
Component: Index
Relates to Mage_Index
Component: Api2
Relates to Mage_Api2
Component: ImportExport
Relates to Mage_ImportExport
Component: ConfigurableSwatches
Relates to Mage_ConfigurableSwatches
Component: Dataflow
Relates to Mage_Dataflow
Component: Install
Relates to Mage_Install
Component: Paygate
Relates to Mage_Paygate
Component: lib/*
Relates to lib/*
phpstan
labels
Jul 22, 2024
addison74
approved these changes
Jul 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked visually all the changes and they are fine.
empiricompany
approved these changes
Jul 26, 2024
kiatng
reviewed
Aug 7, 2024
kiatng
reviewed
Aug 7, 2024
app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php
Outdated
Show resolved
Hide resolved
sreichel
added a commit
to sreichel/magento-lts
that referenced
this pull request
Aug 7, 2024
kiatng
previously approved these changes
Aug 9, 2024
addison74
previously approved these changes
Aug 9, 2024
# Conflicts: # dev/tests/functional/tests/app/Mage/Adminhtml/Test/Block/Catalog/Product/Attribute/Edit/AttributeForm.php # dev/tests/functional/tests/app/Mage/Adminhtml/Test/Block/Catalog/Product/Edit/Tab/Prices.php # dev/tests/functional/tests/app/Mage/Adminhtml/Test/Block/Catalog/Product/ProductForm.php # dev/tests/functional/tests/app/Mage/Adminhtml/Test/Block/Widget/FormTabs.php # dev/tests/functional/tests/app/Mage/Bundle/Test/Handler/Curl.php # dev/tests/functional/tests/app/Mage/Catalog/Test/TestStep/UpdateConfigurableProductStep/DeleteOptionsSubStep.php # dev/tests/functional/tests/app/Mage/Customer/Test/Handler/Customer/Curl.php # dev/tests/functional/tests/app/Mage/Weee/Test/Constraint/AssertFptApplied.php
kiatng
previously approved these changes
Sep 6, 2024
addison74
approved these changes
Sep 6, 2024
kiatng
approved these changes
Sep 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component: Adminhtml
Relates to Mage_Adminhtml
Component: Api2
Relates to Mage_Api2
Component: Catalog
Relates to Mage_Catalog
Component: Checkout
Relates to Mage_Checkout
Component: ConfigurableSwatches
Relates to Mage_ConfigurableSwatches
Component: Core
Relates to Mage_Core
Component: Customer
Relates to Mage_Customer
Component: Dataflow
Relates to Mage_Dataflow
Component: Eav
Relates to Mage_Eav
Component: ImportExport
Relates to Mage_ImportExport
Component: Index
Relates to Mage_Index
Component: Install
Relates to Mage_Install
Component: lib/Varien
Relates to lib/Varien
Component: lib/*
Relates to lib/*
Component: Page
Relates to Mage_Page
Component: Paygate
Relates to Mage_Paygate
Component: Payment
Relates to Mage_Payment
Component: PayPal
Relates to Mage_Paypal
Component: Reports
Relates to Mage_Reports
Component: Rule
Relates to Mage_Rule
Component: Sales
Relates to Mage_Sales
Component: Shipping
Relates to Mage_Shipping
Component: Tag
Relates to Mage_Tag
Component: Weee
Relates to Mage_Weee
phpstan
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor code step by step using rector ...
See https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#unusedforeachvaluetoarraykeysrector
Edit: there are some comments that state to dislike it - for personal prefs, for readability, for not having used it before ...
Imho ... it makes the code better. PHPMD will not complain about unused local variables. It makes it more readable, b/c i can see we deal only with the array keys. This sniff could be excluded, but isnt it better to make use of quality tools w/o ignore some rules?