Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions app/code/core/Mage/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @method bool getCanShowPrice()
* @method bool getCategoriesReadonly()
* @method array getChildAttributeLabelMapping()
* @method Mage_Catalog_Model_Product[] getChildrenProducts()
* @method null|Mage_Catalog_Model_Product[] getChildrenProducts()
* @method Mage_Catalog_Model_Resource_Product_Collection getCollection()
* @method bool getCompositeReadonly()
* @method array getConfigurableAttributesData()
Expand Down Expand Up @@ -61,6 +61,7 @@
* @method bool getIsRecurring()
* @method bool getIsRelationsChanged()
* @method bool getLinksPurchasedSeparately()
* @method array getListSwatchAttrStockValues()
* @method array getListSwatchAttrValues()
* @method array getMatchedRules()
* @method array getMediaGallery()
Expand All @@ -76,6 +77,7 @@
* @method int getOriginalId()
* @method string getPageLayout()
* @method bool getParentId()
* @method array getParentIds()
* @method int getParentProductId()
* @method array getParentProductIds()
* @method int getPopularity()
Expand Down Expand Up @@ -126,7 +128,7 @@
* @method bool hasCustomerGroupId()
* @method bool hasIsRecurring()
* @method bool hasMediaAttributes()
* @method $this hasMsrpEnabled()
* @method bool hasMsrpEnabled()
* @method bool hasOptionsValidationFail()
* @method bool hasPreconfiguredValues()
* @method bool hasRelatedProductIds()
Expand All @@ -149,6 +151,7 @@
* @method $this setCanSaveCustomOptions(bool $value)
* @method $this setCartQty(float $value)
* @method $this setCategory(Mage_Catalog_Model_Category $value)
* @method $this setChildAttributeLabelMapping(array $value)
* @method $this setChildrenProducts(Mage_Catalog_Model_Product[] $value)
* @method $this setConfigurableImagesFallbackArray(array $value)
* @method $this setConfigurablePrice(float $value)
Expand Down Expand Up @@ -177,13 +180,16 @@
* @method $this setIsSuperMode(bool $value)
* @method $this setLinksExist(bool $value)
* @method $this setLinksPurchasedSeparately(bool $value)
* @method $this setListSwatchAttrStockValues(array $value)
* @method $this setListSwatchAttrValues(array $value)
* @method $this setMediaAttributes(array $value)
* @method $this setMediaGallery(array $value)
* @method $this setNeedStoreForReindex(bool $value)
* @method $this setOption(Mage_Bundle_Model_Option $value)
* @method $this setOptionsValidationFail(bool $value)
* @method $this setOriginalId(int $value)
* @method $this setParentId(bool $value)
* @method $this setParentIds(array $value)
* @method $this setParentProductIds(array $value)
* @method $this setPrice(float $value)
* @method $this setProductOptions(array $value)
Expand All @@ -209,6 +215,7 @@
* @method $this setStore(int $store)
* @method $this setStoreId(int $store)
* @method $this setStoreIds(array $storeIds)
* @method $this setSwatchPrices(array $value)
* @method $this setTaxPercent(null|float $value)
* @method $this setTypeHasOptions(bool $value)
* @method $this setTypeHasRequiredOptions(bool $value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
*
* @package Mage_ConfigurableSwatches
*
* @method Mage_Catalog_Model_Product_Type_Configurable_Attribute getAttributeObj()
* @method string getJsonConfig()
* @method Mage_Catalog_Model_Product getProduct()
* @method int getSwatchInnerHeight()
* @method int getSwatchInnerWidth()
* @method int getSwatchOuterHeight()
* @method int getSwatchOuterWidth()
* @method $this setJsonConfig(string $value)
* @method $this setSwatchInnerHeight(int $value)
* @method $this setSwatchInnerWidth(int $value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Mage_ConfigurableSwatches_Helper_List_Price extends Mage_Core_Helper_Abstr
* - product must have children products attached and be configurable by type
*
* @param int $storeId
* @throws Mage_Core_Model_Store_Exception
Comment on lines 29 to +30
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.
*/
public function attachConfigurableProductChildrenPricesMapping(array $products, $storeId = null)
{
Expand Down
10 changes: 8 additions & 2 deletions app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Mage_ConfigurableSwatches_Helper_Mediafallback extends Mage_Core_Helper_Ab
* - product must have children products attached
*
* @param int $storeId
Comment on lines 25 to 26
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.
* @throws Mage_Core_Exception
* @deprecated use $this->attachProductChildrenAttributeMapping() instead
*/
public function attachConfigurableProductChildrenAttributeMapping(array $parentProducts, $storeId)
Expand All @@ -36,8 +37,10 @@ public function attachConfigurableProductChildrenAttributeMapping(array $parentP
* Depends on following product data:
* - product must have children products attached
*
* @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.
*/
public function attachProductChildrenAttributeMapping(array $parentProducts, $storeId, $onlyListAttributes = false)
{
Expand All @@ -57,7 +60,6 @@ public function attachProductChildrenAttributeMapping(array $parentProducts, $st
}

$parentProductIds = [];
/** @var Mage_Catalog_Model_Product $parentProduct */
foreach ($parentProducts as $parentProduct) {
$parentProductIds[] = $parentProduct->getId();
}
Expand Down Expand Up @@ -86,7 +88,6 @@ public function attachProductChildrenAttributeMapping(array $parentProducts, $st

/** @var Mage_Catalog_Model_Product_Type_Configurable_Attribute $attribute */
foreach ($configAttributes as $attribute) {
/** @var Mage_Catalog_Model_Product $childProduct */
if (!is_array($parentProduct->getChildrenProducts())) {
continue;
}
Expand Down Expand Up @@ -158,6 +159,7 @@ public function attachProductChildrenAttributeMapping(array $parentProducts, $st
* @param array $imageTypes - image types to select for child products
* @param bool $keepFrame
* @return array
* @throws Mage_Core_Exception
*/
public function getConfigurableImagesFallbackArray(
Mage_Catalog_Model_Product $product,
Expand Down Expand Up @@ -296,6 +298,7 @@ protected function _resizeProductImage($product, $type, $keepFrame, $image = nul

/**
* 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.
* @throws Mage_Core_Exception
*/
public function groupMediaGalleryImages(Mage_Catalog_Model_Product $product)
{
Expand Down Expand Up @@ -327,6 +330,7 @@ public function groupMediaGalleryImages(Mage_Catalog_Model_Product $product)
* For given product set, attach media_gallery attribute values.
*
* @param int $storeId
Comment on lines 331 to 332
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.
* @throws Mage_Core_Exception
*/
public function attachGallerySetToCollection(array $products, $storeId)
{
Expand Down Expand Up @@ -416,6 +420,8 @@ protected function _getChildrenProductsAttributes()
* ->setChildrenProducts()
*
* @param int $storeId
* @throws Mage_Core_Exception
* @throws Zend_Cache_Exception
Comment on lines 422 to +424
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.
*/
public function attachChildrenProducts(array $products, $storeId)
{
Expand Down
4 changes: 3 additions & 1 deletion app/code/core/Mage/Rss/Block/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
class Mage_Rss_Block_Abstract extends Mage_Core_Block_Template
{
/**
* @return int
* @return null|int
* @throws Exception
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
protected function _getStoreId()
Expand Down
9 changes: 7 additions & 2 deletions app/code/core/Mage/Rss/Block/Catalog/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class Mage_Rss_Block_Catalog_Abstract extends Mage_Rss_Block_Abstract
{
/**
* Stored price block instances
* @var array
* @var Mage_Core_Block_Abstract[]
*/
protected $_priceBlock = [];

/**
* Stored price blocks info
* @var array
* @var array<string, array{block: string, template: string}>
*/
protected $_priceBlockTypes = [];

Expand All @@ -30,6 +30,10 @@ class Mage_Rss_Block_Catalog_Abstract extends Mage_Rss_Block_Abstract
*/
protected $_priceBlockDefaultTemplate = 'catalog/rss/product/price.phtml';

/**
* Default price block type
* @var string
*/
protected $_priceBlockDefaultType = 'catalog/product_price';

/**
Expand Down Expand Up @@ -114,6 +118,7 @@ public function getPriceHtml($product, $displayMinimalPrice = false, $idSuffix =
* @param string $type Catalog Product Type
* @param string $block Block Type
* @param string $template Template
* @return void
*/
public function addPriceBlockType($type, $block = '', $template = '')
{
Expand Down
35 changes: 35 additions & 0 deletions app/code/core/Mage/Rss/controllers/CatalogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
*/
class Mage_Rss_CatalogController extends Mage_Rss_Controller_Abstract
{
/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function newAction()
{
if ($this->checkFeedEnable('catalog/new')) {
Expand All @@ -22,6 +27,11 @@ public function newAction()
}
}

/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function specialAction()
{
if ($this->checkFeedEnable('catalog/special')) {
Expand All @@ -30,6 +40,11 @@ public function specialAction()
}
}

/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function salesruleAction()
{
if ($this->checkFeedEnable('catalog/salesrule')) {
Expand All @@ -38,6 +53,11 @@ public function salesruleAction()
}
}

/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function tagAction()
{
if ($this->isFeedEnable('catalog/tag')) {
Expand All @@ -56,6 +76,11 @@ public function tagAction()
$this->_forward('nofeed', 'index', 'rss');
}

/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function notifystockAction()
{
if ($this->checkFeedEnable('catalog/notifystock')) {
Expand All @@ -64,6 +89,11 @@ public function notifystockAction()
}
}

/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function reviewAction()
{
if ($this->checkFeedEnable('catalog/review')) {
Expand All @@ -72,6 +102,11 @@ public function reviewAction()
}
}

/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function categoryAction()
{
if ($this->checkFeedEnable('catalog/category')) {
Expand Down
12 changes: 12 additions & 0 deletions app/code/core/Mage/Rss/controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class Mage_Rss_IndexController extends Mage_Rss_Controller_Abstract

/**
* Index action
*
* @return void
* @throws Mage_Core_Exception
*/
public function indexAction()
{
Expand All @@ -47,6 +50,9 @@ public function indexAction()

/**
* Display feed not found message
*
* @return void
* @throws Mage_Core_Exception
*/
public function nofeedAction()
{
Expand All @@ -61,6 +67,7 @@ public function nofeedAction()
* Show all public wishlists and private wishlists that belong to current user
*
* @return void
* @throws Mage_Core_Exception
*/
public function wishlistAction()
{
Expand Down Expand Up @@ -91,6 +98,9 @@ public function wishlistAction()

/**
* Show wishlist rss
*
* @return void
* @throws Mage_Core_Exception
*/
protected function _showWishlistRss()
{
Expand All @@ -103,6 +113,7 @@ protected function _showWishlistRss()
* Retrieve Wishlist model
*
* @return null|Mage_Wishlist_Model_Wishlist
* @throws Mage_Core_Exception
*/
protected function _getWishlist()
{
Expand All @@ -123,6 +134,7 @@ protected function _getWishlist()
* Retrieve Customer instance
*
* @return Mage_Customer_Model_Customer
* @throws Mage_Core_Exception
*/
protected function _getCustomer()
{
Expand Down
9 changes: 9 additions & 0 deletions app/code/core/Mage/Rss/controllers/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
*/
class Mage_Rss_OrderController extends Mage_Rss_Controller_Abstract
{
/**
* @return void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function newAction()
{
if ($this->checkFeedEnable('order/new')) {
Expand All @@ -24,6 +29,7 @@ public function newAction()

/**
* @return $this|void
* @throws Mage_Core_Exception
* @throws Mage_Core_Model_Store_Exception
*/
public function customerAction()
Expand All @@ -40,6 +46,9 @@ public function customerAction()

/**
* Order status action
*
* @return void
* @throws Mage_Core_Exception
*/
public function statusAction()
{
Expand Down
Loading