diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index 6c7b0497575..47328549377 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -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() @@ -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() @@ -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() @@ -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() @@ -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) @@ -177,6 +180,8 @@ * @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) @@ -184,6 +189,7 @@ * @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) @@ -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) diff --git a/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Product/View/Type/Configurable/Swatches.php b/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Product/View/Type/Configurable/Swatches.php index 2eeaa8cc3f4..8da3fb0a10c 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Product/View/Type/Configurable/Swatches.php +++ b/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Product/View/Type/Configurable/Swatches.php @@ -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) diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/List/Price.php b/app/code/core/Mage/ConfigurableSwatches/Helper/List/Price.php index 3fcba7dd7c1..9ae47158933 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Helper/List/Price.php +++ b/app/code/core/Mage/ConfigurableSwatches/Helper/List/Price.php @@ -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 */ public function attachConfigurableProductChildrenPricesMapping(array $products, $storeId = null) { diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php b/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php index 7c1e11326fc..acda04049dd 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php +++ b/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php @@ -24,6 +24,7 @@ class Mage_ConfigurableSwatches_Helper_Mediafallback extends Mage_Core_Helper_Ab * - product must have children products attached * * @param int $storeId + * @throws Mage_Core_Exception * @deprecated use $this->attachProductChildrenAttributeMapping() instead */ public function attachConfigurableProductChildrenAttributeMapping(array $parentProducts, $storeId) @@ -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 */ public function attachProductChildrenAttributeMapping(array $parentProducts, $storeId, $onlyListAttributes = false) { @@ -57,7 +60,6 @@ public function attachProductChildrenAttributeMapping(array $parentProducts, $st } $parentProductIds = []; - /** @var Mage_Catalog_Model_Product $parentProduct */ foreach ($parentProducts as $parentProduct) { $parentProductIds[] = $parentProduct->getId(); } @@ -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; } @@ -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, @@ -296,6 +298,7 @@ protected function _resizeProductImage($product, $type, $keepFrame, $image = nul /** * Groups media gallery images by local images and child images + * @throws Mage_Core_Exception */ public function groupMediaGalleryImages(Mage_Catalog_Model_Product $product) { @@ -327,6 +330,7 @@ public function groupMediaGalleryImages(Mage_Catalog_Model_Product $product) * For given product set, attach media_gallery attribute values. * * @param int $storeId + * @throws Mage_Core_Exception */ public function attachGallerySetToCollection(array $products, $storeId) { @@ -416,6 +420,8 @@ protected function _getChildrenProductsAttributes() * ->setChildrenProducts() * * @param int $storeId + * @throws Mage_Core_Exception + * @throws Zend_Cache_Exception */ public function attachChildrenProducts(array $products, $storeId) { diff --git a/app/code/core/Mage/Rss/Block/Abstract.php b/app/code/core/Mage/Rss/Block/Abstract.php index 7abed848663..e1f88544d02 100644 --- a/app/code/core/Mage/Rss/Block/Abstract.php +++ b/app/code/core/Mage/Rss/Block/Abstract.php @@ -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() diff --git a/app/code/core/Mage/Rss/Block/Catalog/Abstract.php b/app/code/core/Mage/Rss/Block/Catalog/Abstract.php index f25393a4ad5..552987939fa 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Abstract.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Abstract.php @@ -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 */ protected $_priceBlockTypes = []; @@ -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'; /** @@ -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 = '') { diff --git a/app/code/core/Mage/Rss/controllers/CatalogController.php b/app/code/core/Mage/Rss/controllers/CatalogController.php index e073bbf3bca..a3917b27857 100644 --- a/app/code/core/Mage/Rss/controllers/CatalogController.php +++ b/app/code/core/Mage/Rss/controllers/CatalogController.php @@ -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')) { @@ -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')) { @@ -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')) { @@ -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')) { @@ -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')) { @@ -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')) { @@ -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')) { diff --git a/app/code/core/Mage/Rss/controllers/IndexController.php b/app/code/core/Mage/Rss/controllers/IndexController.php index ded8f9130f7..294abb38cb6 100644 --- a/app/code/core/Mage/Rss/controllers/IndexController.php +++ b/app/code/core/Mage/Rss/controllers/IndexController.php @@ -30,6 +30,9 @@ class Mage_Rss_IndexController extends Mage_Rss_Controller_Abstract /** * Index action + * + * @return void + * @throws Mage_Core_Exception */ public function indexAction() { @@ -47,6 +50,9 @@ public function indexAction() /** * Display feed not found message + * + * @return void + * @throws Mage_Core_Exception */ public function nofeedAction() { @@ -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() { @@ -91,6 +98,9 @@ public function wishlistAction() /** * Show wishlist rss + * + * @return void + * @throws Mage_Core_Exception */ protected function _showWishlistRss() { @@ -103,6 +113,7 @@ protected function _showWishlistRss() * Retrieve Wishlist model * * @return null|Mage_Wishlist_Model_Wishlist + * @throws Mage_Core_Exception */ protected function _getWishlist() { @@ -123,6 +134,7 @@ protected function _getWishlist() * Retrieve Customer instance * * @return Mage_Customer_Model_Customer + * @throws Mage_Core_Exception */ protected function _getCustomer() { diff --git a/app/code/core/Mage/Rss/controllers/OrderController.php b/app/code/core/Mage/Rss/controllers/OrderController.php index 9fbdb9540c5..ec8825b62f1 100644 --- a/app/code/core/Mage/Rss/controllers/OrderController.php +++ b/app/code/core/Mage/Rss/controllers/OrderController.php @@ -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')) { @@ -24,6 +29,7 @@ public function newAction() /** * @return $this|void + * @throws Mage_Core_Exception * @throws Mage_Core_Model_Store_Exception */ public function customerAction() @@ -40,6 +46,9 @@ public function customerAction() /** * Order status action + * + * @return void + * @throws Mage_Core_Exception */ public function statusAction() {