Skip to content

Conversation

@sreichel
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings December 10, 2025 00:54
@sreichel sreichel added the chore label Dec 10, 2025
@github-actions github-actions bot added Component: Catalog Relates to Mage_Catalog Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Rss Relates to Mage_Rss labels Dec 10, 2025
@sreichel sreichel changed the title chore docs blocks chore: docs blocks update Dec 10, 2025
@sreichel sreichel merged commit d45530f into OpenMage:main Dec 10, 2025
23 checks passed
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 improves documentation blocks (docblocks) across multiple modules by adding missing annotations and enhancing type hints. The changes focus on RSS controllers and blocks, ConfigurableSwatches helpers and blocks, and the Catalog Product model to provide better IDE support and static analysis capabilities.

  • Added @return void and @throws annotations to controller action methods
  • Enhanced type hints for array properties and parameters (e.g., Mage_Core_Block_Abstract[], array<string, array{block: string, template: string}>)
  • Added magic method annotations for block classes
  • Improved magic method documentation in the Product model (nullability, getter/setter consistency)

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
app/code/core/Mage/Rss/controllers/OrderController.php Added @return void and @throws annotations to newAction, customerAction, and statusAction methods
app/code/core/Mage/Rss/controllers/IndexController.php Added @return void and @throws Mage_Core_Exception annotations to multiple action and helper methods
app/code/core/Mage/Rss/controllers/CatalogController.php Added consistent @return void and @throws annotations to all action methods
app/code/core/Mage/Rss/Block/Catalog/Abstract.php Improved array type hints with specific types, added missing docblock for $_priceBlockDefaultType, and added @return void to addPriceBlockType
app/code/core/Mage/Rss/Block/Abstract.php Updated _getStoreId return type to null|int and added exception annotations
app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php Added @param and @throws annotations, removed redundant inline type comments that duplicated docblock information
app/code/core/Mage/ConfigurableSwatches/Helper/List/Price.php Added @throws Mage_Core_Model_Store_Exception annotation
app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Product/View/Type/Configurable/Swatches.php Added comprehensive magic method getter annotations for better IDE support
app/code/core/Mage/Catalog/Model/Product.php Enhanced magic method documentation with nullability for getChildrenProducts(), fixed return type for hasMsrpEnabled(), and added missing getter/setter methods

}

/**
* Groups media gallery images by local images and child images
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The docblock should include both @param Mage_Catalog_Model_Product $product for the method parameter and @return void annotation for consistency with other methods in this file.

Suggested change
* Groups media gallery images by local images and child images
* Groups media gallery images by local images and child images
*
* @param Mage_Catalog_Model_Product $product
* @return void

Copilot uses AI. Check for mistakes.
Comment on lines 331 to 332
*
* @param int $storeId
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The docblock is missing @param Mage_Catalog_Model_Product[] $products annotation for the first parameter and should include @return void for consistency with other methods in this file.

Suggested change
*
* @param int $storeId
*
* @param Mage_Catalog_Model_Product[] $products
* @param int $storeId
* @return void

Copilot uses AI. Check for mistakes.
Comment on lines 25 to 26
*
* @param int $storeId
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The docblock is missing @param Mage_Catalog_Model_Product[] $parentProducts annotation for the first parameter and should include @return void for consistency with other methods in this file.

Suggested change
*
* @param int $storeId
*
* @param Mage_Catalog_Model_Product[] $parentProducts
* @param int $storeId
* @return void

Copilot uses AI. Check for mistakes.
* @param Mage_Catalog_Model_Product[] $parentProducts
* @param int $storeId
* @param bool $onlyListAttributes
* @throws Mage_Core_Exception
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The docblock should include @return void annotation for consistency with other methods in this file. The method doesn't return any value.

Suggested change
* @throws Mage_Core_Exception
* @throws Mage_Core_Exception
* @return void

Copilot uses AI. Check for mistakes.
Comment on lines 422 to +424
* @param int $storeId
* @throws Mage_Core_Exception
* @throws Zend_Cache_Exception
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The docblock is missing @param Mage_Catalog_Model_Product[] $products annotation for the first parameter and should include @return void for consistency with other methods in this file.

Suggested change
* @param int $storeId
* @throws Mage_Core_Exception
* @throws Zend_Cache_Exception
* @param Mage_Catalog_Model_Product[] $products Array of parent products
* @param int $storeId Store ID
* @throws Mage_Core_Exception
* @throws Zend_Cache_Exception
* @return void

Copilot uses AI. Check for mistakes.
Comment on lines 29 to +30
* @param int $storeId
* @throws Mage_Core_Model_Store_Exception
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

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

The docblock is missing @param Mage_Catalog_Model_Product[] $products annotation for the first parameter and should include @return void for consistency with other similar methods in the codebase.

Suggested change
* @param int $storeId
* @throws Mage_Core_Model_Store_Exception
* @param Mage_Catalog_Model_Product[] $products Array of products to process
* @param int|null $storeId Store ID (optional)
* @throws Mage_Core_Model_Store_Exception
* @return void

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Component: Catalog Relates to Mage_Catalog Component: ConfigurableSwatches Relates to Mage_ConfigurableSwatches Component: Rss Relates to Mage_Rss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant