Skip to content

Conversation

@sreichel
Copy link
Contributor

@sreichel sreichel added the chore label Oct 27, 2025
Copilot AI review requested due to automatic review settings October 27, 2025 05:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR applies the Rector rule ReduceAlwaysFalseIfOrRector to simplify conditional logic by removing dead code that always evaluates to false. The changes eliminate unnecessary null checks and redundant array type checks that static analysis has proven to be always false based on type declarations.

Key changes:

  • Removed impossible null checks from Mage_Core_Model_File_Storage::_synchronizeHasErrors()
  • Simplified redundant array check in Mage_Adminhtml_Block_Widget_Grid_Column::_applyDecorators()
  • Updated PHPStan baseline to remove now-resolved false-positive warnings

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
app/code/core/Mage/Core/Model/File/Storage.php Removed dead code checking for null parameters that cannot be null per type hints
app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php Simplified conditional by removing redundant !is_array() check
.rector.php Enabled ReduceAlwaysFalseIfOrRector rule by removing it from skip list
.phpstan.dist.baseline.neon Removed PHPStan baseline entries for issues now fixed

@github-actions github-actions bot added Component: Core Relates to Mage_Core Component: Adminhtml Relates to Mage_Adminhtml phpstan rector labels Oct 27, 2025
@sonarqubecloud
Copy link

@sreichel sreichel merged commit 34388fb into OpenMage:main Oct 27, 2025
21 checks passed
@sreichel sreichel deleted the rector/dc/ReduceAlwaysFalseIfOrRector branch October 27, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Component: Adminhtml Relates to Mage_Adminhtml Component: Core Relates to Mage_Core phpstan rector

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant