-
-
Notifications
You must be signed in to change notification settings - Fork 449
chore: docs blocks update #5147
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
Conversation
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.
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 voidand@throwsannotations 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 |
Copilot
AI
Dec 10, 2025
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.
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.
| * 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 |
| * | ||
| * @param int $storeId |
Copilot
AI
Dec 10, 2025
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.
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.
| * | |
| * @param int $storeId | |
| * | |
| * @param Mage_Catalog_Model_Product[] $products | |
| * @param int $storeId | |
| * @return void |
| * | ||
| * @param int $storeId |
Copilot
AI
Dec 10, 2025
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.
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.
| * | |
| * @param int $storeId | |
| * | |
| * @param Mage_Catalog_Model_Product[] $parentProducts | |
| * @param int $storeId | |
| * @return void |
| * @param Mage_Catalog_Model_Product[] $parentProducts | ||
| * @param int $storeId | ||
| * @param bool $onlyListAttributes | ||
| * @throws Mage_Core_Exception |
Copilot
AI
Dec 10, 2025
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.
The docblock should include @return void annotation for consistency with other methods in this file. The method doesn't return any value.
| * @throws Mage_Core_Exception | |
| * @throws Mage_Core_Exception | |
| * @return void |
| * @param int $storeId | ||
| * @throws Mage_Core_Exception | ||
| * @throws Zend_Cache_Exception |
Copilot
AI
Dec 10, 2025
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.
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.
| * @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 |
| * @param int $storeId | ||
| * @throws Mage_Core_Model_Store_Exception |
Copilot
AI
Dec 10, 2025
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.
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.
| * @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 |
|



No description provided.