From ec41613ed6ea263bbdcf613c69c812c910dc97e4 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Tue, 13 Sep 2022 10:57:52 +0200 Subject: [PATCH 1/3] Updated phpdocs --- .github/phpstan-baseline.neon | 30 ------------------- .../core/Mage/Admin/Model/Resource/User.php | 2 +- app/code/core/Mage/Admin/Model/User.php | 2 +- .../Mage/Adminhtml/Block/Catalog/Product.php | 4 +-- .../Adminhtml/Block/Newsletter/Queue/Edit.php | 2 +- .../Block/Newsletter/Template/Edit.php | 4 +-- .../core/Mage/Adminhtml/Block/Page/Head.php | 2 +- .../Block/Permissions/Tab/Rolesedit.php | 2 +- .../Block/Sales/Order/Address/Form.php | 2 +- .../Block/Sales/Order/Comments/View.php | 4 +-- .../Block/Sales/Order/Create/Items/Grid.php | 2 +- .../Sales/Order/Create/Sidebar/Reorder.php | 2 +- .../Sales/Order/Create/Totals/Shipping.php | 4 +-- .../Sales/Order/Creditmemo/Create/Form.php | 2 +- .../Sales/Order/Shipment/Create/Form.php | 2 +- .../Sales/Order/Shipment/Create/Items.php | 2 +- .../Order/View/Items/Renderer/Default.php | 2 +- .../Block/Shipping/Carrier/Tablerate/Grid.php | 4 +-- .../Adminhtml/Block/System/Config/Form.php | 2 +- .../Adminhtml/Block/System/Variable/Edit.php | 5 +--- .../Mage/Adminhtml/Block/Tag/Tag/Edit.php | 2 +- .../Mage/Adminhtml/Block/Urlrewrite/Edit.php | 5 +--- .../core/Mage/Adminhtml/Block/Widget/Grid.php | 4 +-- .../core/Mage/Adminhtml/Block/Widget/Tabs.php | 1 - .../Adminhtml/Controller/Sales/Creditmemo.php | 2 +- .../Config/Backend/Admin/Custompath.php | 2 +- .../Mage/Adminhtml/Model/System/Store.php | 6 ++-- app/code/core/Mage/Adminhtml/Model/Url.php | 2 -- .../controllers/System/StoreController.php | 2 +- .../Mage/Api/Model/Server/Wsi/Handler.php | 6 +--- .../Mage/Authorizenet/Model/Directpost.php | 3 +- app/code/core/Mage/Backup/Model/Observer.php | 2 +- .../Adminhtml/Catalog/Product/Edit/Tabs.php | 2 +- .../Block/Product/Widget/Html/Pager.php | 2 +- .../Catalog/Block/Seo/Sitemap/Tree/Pager.php | 2 +- app/code/core/Mage/Catalog/Model/Category.php | 2 +- .../Mage/Catalog/Model/Layer/Filter/Price.php | 2 +- .../Mage/Catalog/Model/Product/Type/Price.php | 2 +- .../Catalog/Model/Resource/Helper/Mysql4.php | 2 +- .../Model/Resource/Layer/Filter/Price.php | 2 +- .../Mage/CatalogIndex/Model/Data/Grouped.php | 10 +++---- .../Mage/CatalogIndex/Model/Indexer/Eav.php | 4 +-- .../Mage/CatalogIndex/Model/Indexer/Price.php | 4 +-- .../CatalogSearch/Model/Resource/Advanced.php | 2 +- .../CatalogSearch/Model/Resource/Fulltext.php | 4 +-- app/code/core/Mage/Centinel/Model/Api.php | 2 +- .../Checkout/Block/Multishipping/Billing.php | 2 +- .../Checkout/Block/Multishipping/Success.php | 3 +- .../Block/Onepage/Payment/Methods.php | 2 +- .../Contacts/controllers/IndexController.php | 2 +- .../Controller/Varien/Router/Standard.php | 2 +- app/code/core/Mage/Core/Helper/String.php | 2 +- .../Core/Model/Email/Template/Abstract.php | 2 +- .../core/Mage/Core/Model/Input/Filter.php | 2 +- app/code/core/Mage/Core/Model/Locale.php | 2 +- app/code/core/Mage/Core/Model/Store.php | 2 +- .../Block/Adminhtml/System/Currencysymbol.php | 2 +- .../controllers/AccountController.php | 2 +- .../core/Mage/Dataflow/Model/Batch/Io.php | 2 +- .../core/Mage/Directory/Model/Currency.php | 2 +- .../Directory/Model/Resource/Currency.php | 2 +- .../Mage/Eav/Model/Resource/Helper/Mysql4.php | 2 +- .../Mage/GoogleCheckout/Model/Payment.php | 2 +- .../Block/Adminhtml/Export/Filter.php | 2 +- .../Model/Import/Adapter/Abstract.php | 2 +- app/code/core/Mage/Media/Model/File/Image.php | 2 +- .../Model/Resource/Subscriber/Collection.php | 5 +--- .../Adminhtml/Oauth/AuthorizedTokens/Grid.php | 2 +- app/code/core/Mage/Payment/Block/Form.php | 2 +- .../core/Mage/Payment/Model/Method/Cc.php | 2 +- .../Paypal/Block/Express/Review/Details.php | 2 +- .../core/Mage/Paypal/Model/Api/Abstract.php | 2 +- .../Mage/Paypal/Model/Express/Checkout.php | 2 +- app/code/core/Mage/Paypal/Model/Observer.php | 1 - .../core/Mage/Paypal/Model/Payflowlink.php | 2 +- .../Payment/Transaction/Collection.php | 2 +- .../controllers/HostedproController.php | 2 +- .../Paypal/controllers/PayflowController.php | 2 +- .../controllers/AddController.php | 2 +- .../Model/Resource/Coupons/Collection.php | 2 +- .../Model/Resource/Customer/Collection.php | 2 +- .../Model/Resource/Invoiced/Collection.php | 2 +- .../Model/Resource/Refunded/Collection.php | 2 +- .../Model/Resource/Report/Collection.php | 2 +- .../Model/Resource/Review/Collection.php | 2 +- .../Resource/Review/Customer/Collection.php | 2 +- .../Resource/Tag/Customer/Collection.php | 2 +- .../Reports/Model/Resource/Tax/Collection.php | 2 +- .../Resource/Wishlist/Product/Collection.php | 2 +- .../Resource/Review/Product/Collection.php | 2 +- .../core/Mage/Rss/Block/Catalog/Special.php | 6 ++-- .../Mage/Rss/controllers/IndexController.php | 2 +- .../Block/Payment/Info/Billing/Agreement.php | 2 +- app/code/core/Mage/Sales/Model/Order.php | 2 +- .../core/Mage/SalesRule/Helper/Coupon.php | 2 +- .../Model/Rule/Condition/Address.php | 2 +- .../core/Mage/SalesRule/Model/Validator.php | 4 ++- .../Tag/Model/Resource/Product/Collection.php | 2 +- .../Tag/Model/Resource/Tag/Collection.php | 2 +- .../core/Mage/Tax/Block/Checkout/Shipping.php | 4 +-- .../core/Mage/Tax/Block/Sales/Order/Tax.php | 2 +- app/code/core/Mage/Tax/Model/Calculation.php | 6 ++-- .../Usa/Model/Shipping/Carrier/Abstract.php | 2 +- .../Mage/Usa/Model/Shipping/Carrier/Dhl.php | 4 +-- .../Shipping/Carrier/Dhl/International.php | 6 ++-- .../Carrier/Dhl/Label/Pdf/PageBuilder.php | 8 ++--- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 4 +-- .../Mage/Usa/Model/Shipping/Carrier/Ups.php | 12 ++++---- .../Mage/Usa/Model/Shipping/Carrier/Usps.php | 4 +-- app/code/core/Mage/Weee/Model/Tax.php | 2 +- .../Wishlist/controllers/IndexController.php | 4 +-- 111 files changed, 141 insertions(+), 192 deletions(-) diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon index b65a24157ed..e519f590e95 100644 --- a/.github/phpstan-baseline.neon +++ b/.github/phpstan-baseline.neon @@ -445,11 +445,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - - message: "#^Method Mage_Adminhtml_Block_Widget_Tabs\\:\\:addTabAfter\\(\\) should return Mage_Adminhtml_Block_Widget_Tabs but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$tabNId$#" count: 1 @@ -510,11 +505,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Adminhtml/Model/System/Store.php - - - message: "#^Method Mage_Adminhtml_Model_Url\\:\\:renewSecretUrls\\(\\) should return \\$this\\(Mage_Adminhtml_Model_Url\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Url.php - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Type_Abstract\\:\\:getConfigurableAttributes\\(\\)\\.$#" count: 1 @@ -770,11 +760,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - message: "#^Call to an undefined method Mage_Payment_Model_Info\\:\\:authorize\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - message: "#^Call to an undefined method Varien_Object\\:\\:decrypt\\(\\)\\.$#" count: 1 @@ -785,11 +770,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - - message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:authorize\\(\\) should return Mage_Paygate_Model_Authorizenet but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:initialize\\(\\) should return \\$this\\(Mage_Authorizenet_Model_Directpost\\) but return statement is missing\\.$#" count: 1 @@ -2035,11 +2015,6 @@ parameters: count: 2 path: ../app/code/core/Mage/Dataflow/Model/Profile.php - - - message: "#^Binary operation \"\\*\" between float and non-falsy-string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Model/Currency.php - - message: "#^Variable \\$response might not be defined\\.$#" count: 1 @@ -2705,11 +2680,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Paypal/Model/Ipn.php - - - message: "#^Method Mage_Paypal_Model_Observer\\:\\:fetchReports\\(\\) should return \\$this\\(Mage_Paypal_Model_Observer\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Observer.php - - message: "#^Variable \\$order in empty\\(\\) always exists and is not falsy\\.$#" count: 1 diff --git a/app/code/core/Mage/Admin/Model/Resource/User.php b/app/code/core/Mage/Admin/Model/Resource/User.php index 4c19fba24ad..e981dd051bf 100644 --- a/app/code/core/Mage/Admin/Model/Resource/User.php +++ b/app/code/core/Mage/Admin/Model/Resource/User.php @@ -378,7 +378,7 @@ public function deleteFromRole(Mage_Core_Model_Abstract $user) * Check if role user exists * * @param Mage_Core_Model_Abstract|Mage_Admin_Model_User $user - * @return array|false + * @return array */ public function roleUserExists(Mage_Core_Model_Abstract $user) { diff --git a/app/code/core/Mage/Admin/Model/User.php b/app/code/core/Mage/Admin/Model/User.php index d4c0cee05f5..cddb7ccf51d 100644 --- a/app/code/core/Mage/Admin/Model/User.php +++ b/app/code/core/Mage/Admin/Model/User.php @@ -471,7 +471,7 @@ public function loadByUsername($username) * Check if user is assigned to any role * * @param int|Mage_Admin_Model_User $user - * @return null|bool|array + * @return array|null */ public function hasAssigned2Role($user) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php index 0680a3b4928..3ad7482418c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php @@ -37,9 +37,7 @@ public function __construct() } /** - * Prepare button and grid - * - * @return $this + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php index 496644faa31..80fa75cbe7f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php @@ -223,7 +223,7 @@ protected function isSingleStoreMode() /** * Getter for id of current store (the only one in single-store mode and current in multi-stores mode) * - * @return bool + * @return int */ protected function getStoreId() { diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php index 8ad60636190..f17d04f31d7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php @@ -314,7 +314,7 @@ public function getDeleteUrl() /** * Retrieve Save As Flag * - * @return int + * @return string */ public function getSaveAsFlag() { @@ -334,7 +334,7 @@ protected function isSingleStoreMode() /** * Getter for id of current store (the only one in single-store mode and current in multi-stores mode) * - * @return bool + * @return int */ protected function getStoreId() { diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Head.php b/app/code/core/Mage/Adminhtml/Block/Page/Head.php index ad06fbb5f40..bc789534dc9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Head.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Head.php @@ -48,7 +48,7 @@ public function getFormKey() /** * Retrieve Timeout Delay from Config * - * @return string + * @return int */ public function getLoadingTimeout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php index 29d412411dc..6aa21e79205 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php @@ -154,7 +154,7 @@ public function getResTreeJson() * * @param array $a * @param array $b - * @return bool + * @return int */ protected function _sortTree($a, $b) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php index b860eef6c0e..1ba7c449925 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php @@ -47,7 +47,7 @@ protected function _getAddress() /** * Define form attributes (id, method, action) * - * @return Mage_Adminhtml_Block_Sales_Order_Create_Billing_Address + * @return $this */ protected function _prepareForm() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php index 1902d618cb0..9dc1aa0751f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php @@ -40,9 +40,7 @@ protected function _beforeToHtml() } /** - * Prepare child blocks - * - * @return Mage_Adminhtml_Block_Sales_Order_Invoice_Create_Items + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php index 508490318df..4f89181c2b5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php @@ -304,7 +304,7 @@ public function getTierHtml($item) * Get Custom Options of item * * @param Mage_Sales_Model_Quote_Item $item - * @return array + * @return string */ public function getCustomOptions(Mage_Sales_Model_Quote_Item $item) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php index 89cdc5ed8e4..904e1523839 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php @@ -69,7 +69,7 @@ public function getLastOrder() /** * Retrieve item collection * - * @return mixed + * @return array|false */ public function getItemCollection() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php index d077bc26262..bd43c21d06e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php @@ -74,7 +74,7 @@ public function getShippingExcludeTax() /** * Get label for shipping include tax * - * @return float + * @return string */ public function getIncludeTaxLabel() { @@ -84,7 +84,7 @@ public function getIncludeTaxLabel() /** * Get label for shipping exclude tax * - * @return float + * @return string */ public function getExcludeTaxLabel() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php index c9bf774eb4b..1ab8c5927a3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php @@ -40,7 +40,7 @@ public function getOrder() /** * Retrieve source * - * @return Mage_Sales_Model_Order_Invoice + * @return Mage_Sales_Model_Order_Creditmemo */ public function getSource() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php index 4dbedffb7b2..adc7e360b72 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php @@ -40,7 +40,7 @@ public function getOrder() /** * Retrieve source * - * @return Mage_Sales_Model_Order_Invoice + * @return Mage_Sales_Model_Order_Shipment */ public function getSource() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php index 6d9d8688544..dca2132a170 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php @@ -40,7 +40,7 @@ public function getOrder() /** * Retrieve source * - * @return Mage_Sales_Model_Order_Invoice + * @return Mage_Sales_Model_Order_Shipment */ public function getSource() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php index 2b135c998a7..c77a2ad0fda 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php @@ -179,8 +179,8 @@ public function getMessage() /** * Retrieve save url * + * @return string * @deprecated after 1.4.2.0 - * @return array */ public function getSaveUrl() { diff --git a/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php b/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php index b888114072a..18337b1156c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php @@ -90,9 +90,7 @@ public function setConditionName($name) } /** - * Retrieve current website id - * - * @return int + * @return string */ public function getConditionName() { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php index ef5ff7419ef..67f5bbd46e3 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php @@ -544,7 +544,7 @@ protected function _afterToHtml($html) /** * @param Varien_Simplexml_Element $a * @param Varien_Simplexml_Element $b - * @return bool + * @return int */ protected function _sortForm($a, $b) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php index c75dfe94289..83cf9de75fc 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php @@ -43,10 +43,7 @@ public function getVariable() } /** - * Prepare layout. - * Adding save_and_continue button - * - * @return $this + * @inheritDoc */ protected function _preparelayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php index bfecdee8ddb..0d40b8723d5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php @@ -66,7 +66,7 @@ public function __construct() /** * Add to layout accordion block * - * @return Mage_Adminhtml_Block_Tag_Edit + * @return $this */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php index d25996f7565..0bfb044aa69 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php @@ -42,10 +42,7 @@ class Mage_Adminhtml_Block_Urlrewrite_Edit extends Mage_Adminhtml_Block_Widget_C protected $_buttonsHtml; /** - * Prepare page layout, basing on different registry and request variables - * - * Generates layout of: creation modes selector, products grid, categories tree, urlrewrite edit form - * @return $this + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index 3e32c410471..a58d7f931c5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -446,7 +446,7 @@ public function getLastColumnId() } /** - * @return int|void + * @return int */ public function getColumnCount() { @@ -1301,7 +1301,7 @@ protected function _exportExcelItem(Varien_Object $item, Varien_Io_File $adapter * Return array with keys type and value * * @param string $sheetName - * @return string + * @return array * @throws Exception */ public function getExcelFile($sheetName = '') diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php index 13b71831a0b..47a067d3cfe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php @@ -92,7 +92,6 @@ public function setDestElementId($elementId) * @param string $tabId new tab Id * @param string|array|Varien_Object $tab * @param string $afterTabId - * @return Mage_Adminhtml_Block_Widget_Tabs */ public function addTabAfter($tabId, $tab, $afterTabId) { diff --git a/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php b/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php index 77727f4e257..757e95e1b38 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php +++ b/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php @@ -45,7 +45,7 @@ protected function _construct() /** * Init layout, menu and breadcrumb * - * @return Mage_Adminhtml_Sales_CreditmemoController + * @return $this */ protected function _initAction() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php index 69f207b83fa..126ccf26c60 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php @@ -30,7 +30,7 @@ class Mage_Adminhtml_Model_System_Config_Backend_Admin_Custompath extends Mage_C /** * Check whether redirect should be set * - * @return Mage_Adminhtml_Model_System_Config_Backend_Admin_Custom + * @return $this */ protected function _beforeSave() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Store.php b/app/code/core/Mage/Adminhtml/Model/System/Store.php index d78d5c63d08..02f3b05cf68 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Store.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Store.php @@ -318,7 +318,7 @@ public function getStoreGroupOptionHash($attribute = 'name') * Retrieve Website name by Id * * @param int $websiteId - * @return string + * @return string|null */ public function getWebsiteName($websiteId) { @@ -334,7 +334,7 @@ public function getWebsiteName($websiteId) * Retrieve Group name by Id * * @param int $groupId - * @return string + * @return string|null */ public function getGroupName($groupId) { @@ -350,7 +350,7 @@ public function getGroupName($groupId) * Retrieve Store name by Id * * @param int $storeId - * @return string + * @return string|null */ public function getStoreName($storeId) { diff --git a/app/code/core/Mage/Adminhtml/Model/Url.php b/app/code/core/Mage/Adminhtml/Model/Url.php index 56ce4958145..f144e9043b0 100644 --- a/app/code/core/Mage/Adminhtml/Model/Url.php +++ b/app/code/core/Mage/Adminhtml/Model/Url.php @@ -159,8 +159,6 @@ public function turnOffSecretKey() /** * Refresh admin menu cache etc. - * - * @return $this */ public function renewSecretUrls() { diff --git a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php index 0e743d6d5c6..b918fcaaf47 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php @@ -47,7 +47,7 @@ public function preDispatch() /** * Init actions * - * @return Mage_Adminhtml_Cms_PageController + * @return $this */ protected function _initAction() { diff --git a/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php b/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php index d08b2912700..1e9205b5b96 100644 --- a/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php +++ b/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php @@ -101,11 +101,10 @@ public function login($username, $apiKey = null) * Return called class and method names * * @param String $apiPath - * @return array|void + * @return array */ protected function _getResourceName($apiPath) { - list($resourceName, $methodName) = explode('.', $apiPath); if (empty($resourceName) || empty($methodName)) { @@ -119,11 +118,8 @@ protected function _getResourceName($apiPath) } $methodInfo = $resources->$resourceName->methods->$methodName; - $modelName = $this->_prepareResourceModelName((string) $resources->$resourceName->model); - $modelClass = Mage::getConfig()->getModelClassName($modelName); - $method = (isset($methodInfo->method) ? (string) $methodInfo->method : $methodName); return [$modelClass, $method]; diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost.php b/app/code/core/Mage/Authorizenet/Model/Directpost.php index d81f6cb479a..c2bca4e3ad2 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost.php @@ -62,7 +62,7 @@ public function validate() * * @param Varien_Object $payment * @param float $amount - * @return Mage_Paygate_Model_Authorizenet + * @return void * @throws Mage_Core_Exception */ public function authorize(Varien_Object $payment, $amount) @@ -328,6 +328,7 @@ public function initialize($paymentAction, $stateObject) switch ($paymentAction) { case self::ACTION_AUTHORIZE: case self::ACTION_AUTHORIZE_CAPTURE: + /** @var Mage_Authorizenet_Model_Directpost $payment */ $payment = $this->getInfoInstance(); $order = $payment->getOrder(); $order->setCanSendNewEmailFlag(false); diff --git a/app/code/core/Mage/Backup/Model/Observer.php b/app/code/core/Mage/Backup/Model/Observer.php index d81a181956c..17d3702abaf 100644 --- a/app/code/core/Mage/Backup/Model/Observer.php +++ b/app/code/core/Mage/Backup/Model/Observer.php @@ -41,7 +41,7 @@ class Mage_Backup_Model_Observer /** * Create Backup * - * @return Mage_Log_Model_Cron + * @return $this */ public function scheduledBackup() { diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php index ec5b9e0c2e0..5ff8d386216 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php @@ -30,7 +30,7 @@ class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tabs extends Mage_Adminht protected $_attributeTabBlock = 'bundle/adminhtml_catalog_product_edit_tab_attributes'; /** - * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs|void + * @return void * @throws Exception */ protected function _prepareLayout() diff --git a/app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php b/app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php index c2620ef4730..0028d890616 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php +++ b/app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php @@ -168,7 +168,7 @@ public function getTotalNum() /** * Return number of last page * - * @return bool + * @return float|int */ public function getLastPageNum() { diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php index f06747bf2db..83f9a19a350 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php @@ -36,7 +36,7 @@ class Mage_Catalog_Block_Seo_Sitemap_Tree_Pager extends Mage_Page_Block_Html_Pag /** * @param int $displacement - * @return int|mixed + * @return int * @throws Exception */ public function getCurrentPage($displacement = 0) diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php index 5236ec5697b..9bd162bcc82 100644 --- a/app/code/core/Mage/Catalog/Model/Category.php +++ b/app/code/core/Mage/Catalog/Model/Category.php @@ -841,7 +841,7 @@ public function getProductCount() * @param bool $sorted * @param bool $asCollection * @param bool $toLoad - * @return mixed + * @return array|Mage_Catalog_Model_Resource_Category_Collection|Varien_Data_Collection|Varien_Data_Tree_Node_Collection */ public function getCategories($parent, $recursionLevel = 0, $sorted = false, $asCollection = false, $toLoad = true) { diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php index 19d994cc9c4..ba3aa78f4c2 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php @@ -540,7 +540,7 @@ public function getClearLinkText() * @param null|int $offset * @param null|int $lowerPrice * @param null|int $upperPrice - * @return array|false + * @return array */ public function loadPrices($limit, $offset = null, $lowerPrice = null, $upperPrice = null) { diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php index c9e544237f4..a1f36731913 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php @@ -325,7 +325,7 @@ public function getFormatedTierPrice($qty, $product) * Get formatted by currency product price * * @param Mage_Catalog_Model_Product $product - * @return string | float + * @return string|float * @throws Mage_Core_Model_Store_Exception */ public function getFormatedPrice($product) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php b/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php index af0f3af023a..1410ac452c6 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php @@ -32,7 +32,7 @@ class Mage_Catalog_Model_Resource_Helper_Mysql4 extends Mage_Eav_Model_Resource_ * * @param string $tableAlias * @param string $eavType - * @return string|array + * @return string */ public function attributeSelectFields($tableAlias, $eavType) { diff --git a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php index 977e28b52b3..03ee382d54f 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php @@ -213,7 +213,7 @@ protected function _getPriceExpression($filter, $select, $replaceAlias = true) * @param float $price * @param Mage_Catalog_Model_Layer_Filter_Price $filter * @param bool $decrease - * @return float + * @return string */ protected function _getComparingValue($price, $filter, $decrease = true) { diff --git a/app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php b/app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php index 685827d046b..5a1282cdc28 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php +++ b/app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php @@ -65,15 +65,15 @@ public function getTypeCode() /** * Get child link table and field settings * - * @return mixed + * @return array */ protected function _getLinkSettings() { return [ - 'table'=>'catalog/product_link', - 'parent_field'=>'product_id', - 'child_field'=>'linked_product_id', - 'additional'=> ['link_type_id'=>Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED] + 'table'=>'catalog/product_link', + 'parent_field'=>'product_id', + 'child_field'=>'linked_product_id', + 'additional'=> ['link_type_id' => Mage_Catalog_Model_Product_Link::LINK_TYPE_GROUPED] ]; } } diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer/Eav.php b/app/code/core/Mage/CatalogIndex/Model/Indexer/Eav.php index 7d3853ecc45..b8c39a2e78a 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer/Eav.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer/Eav.php @@ -46,7 +46,7 @@ protected function _construct() /** * @param Mage_Catalog_Model_Product $object * @param Mage_Eav_Model_Entity_Attribute_Abstract|null $attribute - * @return array|mixed + * @return array */ public function createIndexData(Mage_Catalog_Model_Product $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute = null) { @@ -90,7 +90,7 @@ protected function _isAttributeIndexable(Mage_Eav_Model_Entity_Attribute_Abstrac } /** - * @return array|string + * @return string */ protected function _getIndexableAttributeConditions() { diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer/Price.php b/app/code/core/Mage/CatalogIndex/Model/Indexer/Price.php index 00bfccda64b..b495860abcd 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer/Price.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer/Price.php @@ -59,7 +59,7 @@ protected function _construct() /** * @param Mage_Catalog_Model_Product $object * @param Mage_Eav_Model_Entity_Attribute_Abstract|null $attribute - * @return array|mixed + * @return array */ public function createIndexData(Mage_Catalog_Model_Product $object, Mage_Eav_Model_Entity_Attribute_Abstract $attribute = null) { @@ -106,7 +106,7 @@ protected function _isAttributeIndexable(Mage_Eav_Model_Entity_Attribute_Abstrac } /** - * @return array|string + * @return string */ protected function _getIndexableAttributeConditions() { diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php index 072b177d245..9d1e4fcf72b 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php @@ -64,7 +64,7 @@ protected function _dispatchPreparePriceEvent($select) * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute * @param string|array $value * @param Mage_CatalogSearch_Model_Resource_Advanced_Collection $collection - * @return mixed + * @return array|false|string|string[] */ public function prepareCondition($attribute, $value, $collection) { diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php index 10140c2cee7..019e751470e 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php @@ -487,7 +487,7 @@ protected function _getSearchableAttribute($attribute) * * @param string $field * @param string $backendType - * @return Zend_Db_Expr + * @return string */ protected function _unifyField($field, $backendType = 'varchar') { @@ -811,7 +811,7 @@ protected function _saveProductIndexes($storeId, $productIndexes) * * @param int $storeId * @param string $date - * @return string + * @return string|null */ protected function _getStoreDate($storeId, $date = null) { diff --git a/app/code/core/Mage/Centinel/Model/Api.php b/app/code/core/Mage/Centinel/Model/Api.php index 6acca510ebd..680b15951ac 100644 --- a/app/code/core/Mage/Centinel/Model/Api.php +++ b/app/code/core/Mage/Centinel/Model/Api.php @@ -221,7 +221,7 @@ public function callLookup($data) /** * Call centinel api authentication method * - * @return $this + * @return Varien_Object */ public function callAuthentication($data) { diff --git a/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php b/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php index 10f09a2ee76..75c71a9ca73 100644 --- a/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php +++ b/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php @@ -55,7 +55,7 @@ protected function _canUseMethod($method) /** * Retrieve code of current payment method * - * @return mixed + * @return false|string */ public function getSelectedMethodCode() { diff --git a/app/code/core/Mage/Checkout/Block/Multishipping/Success.php b/app/code/core/Mage/Checkout/Block/Multishipping/Success.php index d11dae28806..c29e894fd24 100644 --- a/app/code/core/Mage/Checkout/Block/Multishipping/Success.php +++ b/app/code/core/Mage/Checkout/Block/Multishipping/Success.php @@ -28,14 +28,13 @@ class Mage_Checkout_Block_Multishipping_Success extends Mage_Checkout_Block_Multishipping_Abstract { /** - * @return bool|string + * @return array|false */ public function getOrderIds() { $ids = Mage::getSingleton('core/session')->getOrderIds(true); if ($ids && is_array($ids)) { return $ids; - return implode(', ', $ids); } return false; } diff --git a/app/code/core/Mage/Checkout/Block/Onepage/Payment/Methods.php b/app/code/core/Mage/Checkout/Block/Onepage/Payment/Methods.php index 99755fb83be..25f8ccdbec1 100644 --- a/app/code/core/Mage/Checkout/Block/Onepage/Payment/Methods.php +++ b/app/code/core/Mage/Checkout/Block/Onepage/Payment/Methods.php @@ -49,7 +49,7 @@ protected function _canUseMethod($method) /** * Retrieve code of current payment method * - * @return mixed + * @return false|string */ public function getSelectedMethodCode() { diff --git a/app/code/core/Mage/Contacts/controllers/IndexController.php b/app/code/core/Mage/Contacts/controllers/IndexController.php index 88dd6bf468b..cf5966d7b1a 100644 --- a/app/code/core/Mage/Contacts/controllers/IndexController.php +++ b/app/code/core/Mage/Contacts/controllers/IndexController.php @@ -33,7 +33,7 @@ class Mage_Contacts_IndexController extends Mage_Core_Controller_Front_Action const XML_PATH_ENABLED = 'contacts/contacts/enabled'; /** - * @return Mage_Core_Controller_Front_Action|void + * @return void */ public function preDispatch() { diff --git a/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php b/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php index c2fb0e7331b..76926a85a46 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php +++ b/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php @@ -299,7 +299,7 @@ protected function _validateControllerInstance($controllerInstance) * * @param string $realModule * @param string $controller - * @return mixed + * @return false|string * @throws Mage_Core_Exception */ protected function _validateControllerClassName($realModule, $controller) diff --git a/app/code/core/Mage/Core/Helper/String.php b/app/code/core/Mage/Core/Helper/String.php index 1504a54d03e..a586906615e 100644 --- a/app/code/core/Mage/Core/Helper/String.php +++ b/app/code/core/Mage/Core/Helper/String.php @@ -285,7 +285,7 @@ public function cleanString($string) * @param string $haystack * @param string $needle * @param int $offset - * @return int|false + * @return int */ public function strpos($haystack, $needle, $offset = null) { diff --git a/app/code/core/Mage/Core/Model/Email/Template/Abstract.php b/app/code/core/Mage/Core/Model/Email/Template/Abstract.php index 064b05d60d2..71752fe271b 100644 --- a/app/code/core/Mage/Core/Model/Email/Template/Abstract.php +++ b/app/code/core/Mage/Core/Model/Email/Template/Abstract.php @@ -146,7 +146,7 @@ protected function _getLogoAlt($store) * * @param array $variables * @param int $storeId - * @return mixed + * @return array */ protected function _addEmailVariables($variables, $storeId) { diff --git a/app/code/core/Mage/Core/Model/Input/Filter.php b/app/code/core/Mage/Core/Model/Input/Filter.php index 5c15088d26f..91391a3c229 100644 --- a/app/code/core/Mage/Core/Model/Input/Filter.php +++ b/app/code/core/Mage/Core/Model/Input/Filter.php @@ -270,7 +270,7 @@ protected function _applyFiltrationWithHelper($value, Mage_Core_Helper_Abstract * Try to create Magento helper for filtration based on $filterData. Return false on failure * * @param array $filterData - * @return bool|Mage_Core_Helper_Abstract + * @return Mage_Core_Helper_Abstract * @throws Exception */ protected function _getFiltrationHelper($filterData) diff --git a/app/code/core/Mage/Core/Model/Locale.php b/app/code/core/Mage/Core/Model/Locale.php index fd2ed7090d3..4cfe08788cd 100644 --- a/app/code/core/Mage/Core/Model/Locale.php +++ b/app/code/core/Mage/Core/Model/Locale.php @@ -794,7 +794,7 @@ public function getTranslation($value = null, $path = null) * Replace all yy date format to yyyy * * @param string $currentFormat - * @return mixed + * @return string|string[]|null */ protected function _convertYearTwoDigitTo4($currentFormat) { diff --git a/app/code/core/Mage/Core/Model/Store.php b/app/code/core/Mage/Core/Model/Store.php index d0e5b299424..aefb12d9554 100644 --- a/app/code/core/Mage/Core/Model/Store.php +++ b/app/code/core/Mage/Core/Model/Store.php @@ -876,7 +876,7 @@ public function getDefaultCurrency() * Set current store currency code * * @param string $code - * @return string + * @return $this */ public function setCurrentCurrencyCode($code) { diff --git a/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php index 3e73f07a3af..f90d09ffb55 100644 --- a/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php +++ b/app/code/core/Mage/CurrencySymbol/Block/Adminhtml/System/Currencysymbol.php @@ -61,7 +61,7 @@ protected function _prepareLayout() /** * Returns page header * - * @return bool|string + * @return string */ public function getHeader() { diff --git a/app/code/core/Mage/Customer/controllers/AccountController.php b/app/code/core/Mage/Customer/controllers/AccountController.php index 4920e7d6735..9ca990737de 100644 --- a/app/code/core/Mage/Customer/controllers/AccountController.php +++ b/app/code/core/Mage/Customer/controllers/AccountController.php @@ -411,7 +411,7 @@ protected function _escapeHtml($text) * Validate customer data and return errors if they are * * @param Mage_Customer_Model_Customer $customer - * @return array|string + * @return array */ protected function _getCustomerErrors($customer) { diff --git a/app/code/core/Mage/Dataflow/Model/Batch/Io.php b/app/code/core/Mage/Dataflow/Model/Batch/Io.php index 4504518dd49..36af696c3c4 100644 --- a/app/code/core/Mage/Dataflow/Model/Batch/Io.php +++ b/app/code/core/Mage/Dataflow/Model/Batch/Io.php @@ -158,7 +158,7 @@ public function write($string) * # length bytes have been read * # EOF (end of file) is reached * - * @return string|array + * @return false|string */ public function read($csv = false, $delimiter = ',', $enclosure = '"') { diff --git a/app/code/core/Mage/Directory/Model/Currency.php b/app/code/core/Mage/Directory/Model/Currency.php index 2ef5325223f..6405d168714 100644 --- a/app/code/core/Mage/Directory/Model/Currency.php +++ b/app/code/core/Mage/Directory/Model/Currency.php @@ -123,7 +123,7 @@ public function load($id, $field = null) * Get currency rate (only base=>allowed) * * @param string|Mage_Directory_Model_Currency $toCurrency - * @return string + * @return float|int * @throws Mage_Core_Exception */ public function getRate($toCurrency) diff --git a/app/code/core/Mage/Directory/Model/Resource/Currency.php b/app/code/core/Mage/Directory/Model/Resource/Currency.php index 3f7468d31ac..189d10c5293 100644 --- a/app/code/core/Mage/Directory/Model/Resource/Currency.php +++ b/app/code/core/Mage/Directory/Model/Resource/Currency.php @@ -56,7 +56,7 @@ protected function _construct() * * @param Mage_Directory_Model_Currency|string $currencyFrom * @param Mage_Directory_Model_Currency|string $currencyTo - * @return float + * @return float|int */ public function getRate($currencyFrom, $currencyTo) { diff --git a/app/code/core/Mage/Eav/Model/Resource/Helper/Mysql4.php b/app/code/core/Mage/Eav/Model/Resource/Helper/Mysql4.php index 3321bd11925..b94fa359d1f 100644 --- a/app/code/core/Mage/Eav/Model/Resource/Helper/Mysql4.php +++ b/app/code/core/Mage/Eav/Model/Resource/Helper/Mysql4.php @@ -53,7 +53,7 @@ class Mage_Eav_Model_Resource_Helper_Mysql4 extends Mage_Core_Model_Resource_Hel * * @param string $tableAlias * @param string $eavType - * @return string|array + * @return string */ public function attributeSelectFields($tableAlias, $eavType) { diff --git a/app/code/core/Mage/GoogleCheckout/Model/Payment.php b/app/code/core/Mage/GoogleCheckout/Model/Payment.php index 398fef9be8d..06686a40844 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Payment.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Payment.php @@ -56,7 +56,7 @@ public function getOrderPlaceRedirectUrl() * * @param Varien_Object $payment * @param float $amount - * @return $this + * @return void */ public function authorize(Varien_Object $payment, $amount) { diff --git a/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php b/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php index bb4ed4cd8f9..b02584c5365 100644 --- a/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php +++ b/app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php @@ -440,7 +440,7 @@ public function getFilterElementName($attributeCode) * Get row edit URL. * * @param Mage_Catalog_Model_Resource_Eav_Attribute $row - * @return string + * @return false */ public function getRowUrl($row) { diff --git a/app/code/core/Mage/ImportExport/Model/Import/Adapter/Abstract.php b/app/code/core/Mage/ImportExport/Model/Import/Adapter/Abstract.php index 834f6908fbd..0d325e8c46f 100644 --- a/app/code/core/Mage/ImportExport/Model/Import/Adapter/Abstract.php +++ b/app/code/core/Mage/ImportExport/Model/Import/Adapter/Abstract.php @@ -114,7 +114,7 @@ protected function _init() /** * Return the current element. * - * @return mixed + * @return array */ #[\ReturnTypeWillChange] public function current() diff --git a/app/code/core/Mage/Media/Model/File/Image.php b/app/code/core/Mage/Media/Model/File/Image.php index 923426c7779..d2d31a16c33 100644 --- a/app/code/core/Mage/Media/Model/File/Image.php +++ b/app/code/core/Mage/Media/Model/File/Image.php @@ -109,7 +109,7 @@ public function getImage(Mage_Media_Model_Image $object) * Create tmp image resource for operations * * @param Mage_Media_Model_Image $object - * @return false|resource + * @return resource */ public function getTmpImage(Mage_Media_Model_Image $object) { diff --git a/app/code/core/Mage/Newsletter/Model/Resource/Subscriber/Collection.php b/app/code/core/Mage/Newsletter/Model/Resource/Subscriber/Collection.php index eac109f03c0..14b2233523d 100644 --- a/app/code/core/Mage/Newsletter/Model/Resource/Subscriber/Collection.php +++ b/app/code/core/Mage/Newsletter/Model/Resource/Subscriber/Collection.php @@ -201,16 +201,13 @@ public function _getFieldTableAlias($field) /** * Returns select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { - $select = parent::getSelectCountSql(); $countSelect = clone $this->getSelect(); - $countSelect->reset(Zend_Db_Select::HAVING); - return $select; } diff --git a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php index ca28b7290ce..3fb05dd54d0 100644 --- a/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php +++ b/app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php @@ -197,7 +197,7 @@ public function decorateUserType($value, $row, $column, $isExport) */ public function decorateUserId($value, $row, $column, $isExport) { - $value = ($row->getCustomerId()) ?$row->getCustomerId() :$row->getAdminId(); + $value = $row->getCustomerId() ? $row->getCustomerId() : $row->getAdminId(); return $value; } diff --git a/app/code/core/Mage/Payment/Block/Form.php b/app/code/core/Mage/Payment/Block/Form.php index 5c8d4b728a7..55ec2363ecc 100644 --- a/app/code/core/Mage/Payment/Block/Form.php +++ b/app/code/core/Mage/Payment/Block/Form.php @@ -56,7 +56,7 @@ public function getMethodCode() * Retrieve field value data from payment info object * * @param string $field - * @return mixed + * @return string */ public function getInfoData($field) { diff --git a/app/code/core/Mage/Payment/Model/Method/Cc.php b/app/code/core/Mage/Payment/Model/Method/Cc.php index 44c01ff3d25..f5bbf7743f3 100644 --- a/app/code/core/Mage/Payment/Model/Method/Cc.php +++ b/app/code/core/Mage/Payment/Model/Method/Cc.php @@ -358,7 +358,7 @@ private function _getOrderId() /** * Grand total getter * - * @return string + * @return float */ private function _getAmount() { diff --git a/app/code/core/Mage/Paypal/Block/Express/Review/Details.php b/app/code/core/Mage/Paypal/Block/Express/Review/Details.php index a30906c6912..79c2183e32e 100644 --- a/app/code/core/Mage/Paypal/Block/Express/Review/Details.php +++ b/app/code/core/Mage/Paypal/Block/Express/Review/Details.php @@ -32,7 +32,7 @@ class Mage_Paypal_Block_Express_Review_Details extends Mage_Checkout_Block_Cart_ /** * Return review shipping address * - * @return Mage_Sales_Model_Order_Address + * @return Mage_Sales_Model_Quote_Address */ public function getAddress() { diff --git a/app/code/core/Mage/Paypal/Model/Api/Abstract.php b/app/code/core/Mage/Paypal/Model/Api/Abstract.php index a015ce7d66c..88efbc9eb54 100644 --- a/app/code/core/Mage/Paypal/Model/Api/Abstract.php +++ b/app/code/core/Mage/Paypal/Model/Api/Abstract.php @@ -558,7 +558,7 @@ protected function _buildQuery($request) * Paypal note: The value for quantity must be a positive integer. Null, zero, or negative numbers are not allowed. * * @param float|string|int $value - * @return string + * @return int */ protected function _filterQty($value) { diff --git a/app/code/core/Mage/Paypal/Model/Express/Checkout.php b/app/code/core/Mage/Paypal/Model/Express/Checkout.php index 31e2642eb40..7cb435074c1 100644 --- a/app/code/core/Mage/Paypal/Model/Express/Checkout.php +++ b/app/code/core/Mage/Paypal/Model/Express/Checkout.php @@ -792,7 +792,7 @@ protected function _getApi() * * @param Mage_Sales_Model_Quote_Address $address * @param bool $mayReturnEmpty - * @return array|false + * @return array */ protected function _prepareShippingOptions( Mage_Sales_Model_Quote_Address $address, diff --git a/app/code/core/Mage/Paypal/Model/Observer.php b/app/code/core/Mage/Paypal/Model/Observer.php index 1ebfca9d437..e6a0d65cbd8 100644 --- a/app/code/core/Mage/Paypal/Model/Observer.php +++ b/app/code/core/Mage/Paypal/Model/Observer.php @@ -29,7 +29,6 @@ class Mage_Paypal_Model_Observer { /** * Goes to reports.paypal.com and fetches Settlement reports. - * @return $this */ public function fetchReports() { diff --git a/app/code/core/Mage/Paypal/Model/Payflowlink.php b/app/code/core/Mage/Paypal/Model/Payflowlink.php index 614aba5b227..07680e34c8a 100644 --- a/app/code/core/Mage/Paypal/Model/Payflowlink.php +++ b/app/code/core/Mage/Paypal/Model/Payflowlink.php @@ -507,7 +507,7 @@ protected function _generateSecureTokenId() * * @param mixed $format * @param mixed $string - * @return mixed + * @return string */ protected function _formatStr($format, $string) { diff --git a/app/code/core/Mage/Paypal/Model/Resource/Payment/Transaction/Collection.php b/app/code/core/Mage/Paypal/Model/Resource/Payment/Transaction/Collection.php index 776cdd399cf..1413c08f4d5 100644 --- a/app/code/core/Mage/Paypal/Model/Resource/Payment/Transaction/Collection.php +++ b/app/code/core/Mage/Paypal/Model/Resource/Payment/Transaction/Collection.php @@ -48,7 +48,7 @@ protected function _construct() * CreatedAt filter setter * * @param string $date - * @return Mage_Sales_Model_Resource_Order_Payment_Transaction_Collection + * @return $this */ public function addCreatedBeforeFilter($date) { diff --git a/app/code/core/Mage/Paypal/controllers/HostedproController.php b/app/code/core/Mage/Paypal/controllers/HostedproController.php index f1fdd2a1d11..ee2f356b64a 100644 --- a/app/code/core/Mage/Paypal/controllers/HostedproController.php +++ b/app/code/core/Mage/Paypal/controllers/HostedproController.php @@ -56,7 +56,7 @@ public function cancelAction() * Cancel order, return quote to customer * * @param string $errorMsg - * @return mixed + * @return false|string */ protected function _cancelPayment($errorMsg = '') { diff --git a/app/code/core/Mage/Paypal/controllers/PayflowController.php b/app/code/core/Mage/Paypal/controllers/PayflowController.php index c35327bf1fd..84b8690e9d2 100644 --- a/app/code/core/Mage/Paypal/controllers/PayflowController.php +++ b/app/code/core/Mage/Paypal/controllers/PayflowController.php @@ -106,7 +106,7 @@ public function silentPostAction() * Cancel order, return quote to customer * * @param string $errorMsg - * @return mixed + * @return false|string */ protected function _cancelPayment($errorMsg = '') { diff --git a/app/code/core/Mage/ProductAlert/controllers/AddController.php b/app/code/core/Mage/ProductAlert/controllers/AddController.php index fcf1ec2d98a..ca666fdb1bc 100644 --- a/app/code/core/Mage/ProductAlert/controllers/AddController.php +++ b/app/code/core/Mage/ProductAlert/controllers/AddController.php @@ -28,7 +28,7 @@ class Mage_ProductAlert_AddController extends Mage_Core_Controller_Front_Action { /** - * @return Mage_Core_Controller_Front_Action|void + * @return void */ public function preDispatch() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Coupons/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Coupons/Collection.php index 8cc5d7b56eb..8baaea7cc7f 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Coupons/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Coupons/Collection.php @@ -124,7 +124,7 @@ public function joinFields($from, $to, $storeIds = []) /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php index 0abfdb8970f..d8284bee056 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php @@ -266,7 +266,7 @@ public function orderByCustomerRegistration($dir = self::SORT_ORDER_DESC) /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Invoiced/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Invoiced/Collection.php index 256d2711272..859cbb81ada 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Invoiced/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Invoiced/Collection.php @@ -111,7 +111,7 @@ public function setStoreIds($storeIds) /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Refunded/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Refunded/Collection.php index b7c49bb4fca..31cf2e75ab0 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Refunded/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Refunded/Collection.php @@ -98,7 +98,7 @@ public function setStoreIds($storeIds) /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Report/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Report/Collection.php index d66d3456381..663535e2bd9 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Report/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Report/Collection.php @@ -110,7 +110,7 @@ public function setInterval($from, $to) /** * Get intervals * - * @return array|int + * @return array * @throws Zend_Date_Exception */ public function getIntervals() diff --git a/app/code/core/Mage/Reports/Model/Resource/Review/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Review/Collection.php index d0ea7ba64ad..fc43b2b67a5 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Review/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Review/Collection.php @@ -58,7 +58,7 @@ public function resetSelect() /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php index 9e2dbf5b76a..7c705d44365 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php @@ -121,7 +121,7 @@ public function joinCustomers() /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Tag/Customer/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Tag/Customer/Collection.php index 5d1e3c2aec1..cb401b2d002 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Tag/Customer/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Tag/Customer/Collection.php @@ -47,7 +47,7 @@ public function addTagedCount() /** * get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Tax/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Tax/Collection.php index 7b10e808b50..123fba0e870 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Tax/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Tax/Collection.php @@ -91,7 +91,7 @@ public function setStoreIds($storeIds) /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Reports/Model/Resource/Wishlist/Product/Collection.php b/app/code/core/Mage/Reports/Model/Resource/Wishlist/Product/Collection.php index 6412c85926f..db05f381d51 100644 --- a/app/code/core/Mage/Reports/Model/Resource/Wishlist/Product/Collection.php +++ b/app/code/core/Mage/Reports/Model/Resource/Wishlist/Product/Collection.php @@ -79,7 +79,7 @@ public function getCustomerCount() /** * Get select count sql * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php b/app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php index 543db41f0c5..84d2e74ea3b 100644 --- a/app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php +++ b/app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php @@ -311,7 +311,7 @@ public function getAllIds($limit = null, $offset = null) /** * Render SQL for retrieve product count * - * @return string + * @return Varien_Db_Select|null */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Rss/Block/Catalog/Special.php b/app/code/core/Mage/Rss/Block/Catalog/Special.php index de1f854491d..9848c1b8e62 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Special.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Special.php @@ -195,9 +195,9 @@ public function addSpecialXmlCallback($args) /** * Function for comparing two items in collection * - * @param Varien_Object $a - * @param Varien_Object $b - * @return bool + * @param Varien_Object $a + * @param Varien_Object $b + * @return int */ public function sortByStartDate($a, $b) { diff --git a/app/code/core/Mage/Rss/controllers/IndexController.php b/app/code/core/Mage/Rss/controllers/IndexController.php index 217e687ce30..b6361326df0 100644 --- a/app/code/core/Mage/Rss/controllers/IndexController.php +++ b/app/code/core/Mage/Rss/controllers/IndexController.php @@ -73,7 +73,7 @@ public function nofeedAction() * Wishlist rss feed action * Show all public wishlists and private wishlists that belong to current user * - * @return mixed + * @return void */ public function wishlistAction() { diff --git a/app/code/core/Mage/Sales/Block/Payment/Info/Billing/Agreement.php b/app/code/core/Mage/Sales/Block/Payment/Info/Billing/Agreement.php index dc3e21a874d..87445249271 100644 --- a/app/code/core/Mage/Sales/Block/Payment/Info/Billing/Agreement.php +++ b/app/code/core/Mage/Sales/Block/Payment/Info/Billing/Agreement.php @@ -31,7 +31,7 @@ class Mage_Sales_Block_Payment_Info_Billing_Agreement extends Mage_Payment_Block * Add reference id to payment method information * * @param Varien_Object|array $transport - * @return array|Varien_Object|null + * @return Varien_Object|null */ protected function _prepareSpecificInformation($transport = null) { diff --git a/app/code/core/Mage/Sales/Model/Order.php b/app/code/core/Mage/Sales/Model/Order.php index a4d900de41a..4862a0ca6ac 100644 --- a/app/code/core/Mage/Sales/Model/Order.php +++ b/app/code/core/Mage/Sales/Model/Order.php @@ -2187,7 +2187,7 @@ public function getTracksCollection() /** * Check order invoices availability * - * @return bool + * @return int */ public function hasInvoices() { diff --git a/app/code/core/Mage/SalesRule/Helper/Coupon.php b/app/code/core/Mage/SalesRule/Helper/Coupon.php index e992518e4b0..295094e90af 100644 --- a/app/code/core/Mage/SalesRule/Helper/Coupon.php +++ b/app/code/core/Mage/SalesRule/Helper/Coupon.php @@ -122,7 +122,7 @@ public function getDefaultDashInterval() * Get Coupon's alphabet as array of chars * * @param string $format - * @return array|bool + * @return array */ public function getCharset($format) { diff --git a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php index a7007ba921d..ed6ebb53db3 100644 --- a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php +++ b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php @@ -52,7 +52,7 @@ public function loadAttributeOptions() } /** - * @return mixed + * @return Varien_Data_Form_Element_Abstract */ public function getAttributeElement() { diff --git a/app/code/core/Mage/SalesRule/Model/Validator.php b/app/code/core/Mage/SalesRule/Model/Validator.php index 4eac4d97ac4..61483aaabe6 100644 --- a/app/code/core/Mage/SalesRule/Model/Validator.php +++ b/app/code/core/Mage/SalesRule/Model/Validator.php @@ -544,7 +544,9 @@ public function processWeeeAmount(Mage_Sales_Model_Quote_Address $address, $item /** * for calculating weee tax discount */ + /** @var Mage_Tax_Model_Config $config */ $config = $this->_getSingleton('tax/config'); + /** @var Mage_Tax_Model_Calculation $calculator */ $calculator = $this->_getSingleton('tax/calculation'); $request = $calculator->getRateRequest( $address, @@ -1059,7 +1061,7 @@ public function prepareDescription($address, $separator = ', ') * wrap Mage::getSingleton * * @param string $name - * @return mixed + * @return Mage_Core_Model_Abstract */ protected function _getSingleton($name) { diff --git a/app/code/core/Mage/Tag/Model/Resource/Product/Collection.php b/app/code/core/Mage/Tag/Model/Resource/Product/Collection.php index 4755627e99a..e0105ffc5c7 100644 --- a/app/code/core/Mage/Tag/Model/Resource/Product/Collection.php +++ b/app/code/core/Mage/Tag/Model/Resource/Product/Collection.php @@ -420,7 +420,7 @@ protected function _afterLoad() /** * Render SQL for retrieve product count * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Tag/Model/Resource/Tag/Collection.php b/app/code/core/Mage/Tag/Model/Resource/Tag/Collection.php index 3abe71fa52d..8dfe661174c 100644 --- a/app/code/core/Mage/Tag/Model/Resource/Tag/Collection.php +++ b/app/code/core/Mage/Tag/Model/Resource/Tag/Collection.php @@ -278,7 +278,7 @@ public function addFieldToFilter($field, $condition = null) /** * Get sql for get record count * - * @return string + * @return Varien_Db_Select */ public function getSelectCountSql() { diff --git a/app/code/core/Mage/Tax/Block/Checkout/Shipping.php b/app/code/core/Mage/Tax/Block/Checkout/Shipping.php index 32dbdd9ab53..9b393143ae0 100644 --- a/app/code/core/Mage/Tax/Block/Checkout/Shipping.php +++ b/app/code/core/Mage/Tax/Block/Checkout/Shipping.php @@ -72,7 +72,7 @@ public function getShippingExcludeTax() /** * Get label for shipping include tax * - * @return float + * @return string */ public function getIncludeTaxLabel() { @@ -82,7 +82,7 @@ public function getIncludeTaxLabel() /** * Get label for shipping exclude tax * - * @return float + * @return string */ public function getExcludeTaxLabel() { diff --git a/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php b/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php index 8213a490b05..617f55ac86f 100644 --- a/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php +++ b/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php @@ -298,7 +298,7 @@ protected function _initGrandTotal() } /** - * @return mixed + * @return Mage_Sales_Model_Order */ public function getOrder() { diff --git a/app/code/core/Mage/Tax/Model/Calculation.php b/app/code/core/Mage/Tax/Model/Calculation.php index f4b976aaa48..12ca58e11f2 100644 --- a/app/code/core/Mage/Tax/Model/Calculation.php +++ b/app/code/core/Mage/Tax/Model/Calculation.php @@ -613,7 +613,7 @@ public function getApplicableRateIds($request) * Get the calculation process * * @param array $rates - * @return mixed + * @return array */ public function reproduceProcess($rates) { @@ -624,7 +624,7 @@ public function reproduceProcess($rates) * Get rates by customer tax class * * @param int $customerTaxClass - * @return mixed + * @return array */ public function getRatesByCustomerTaxClass($customerTaxClass) { @@ -636,7 +636,7 @@ public function getRatesByCustomerTaxClass($customerTaxClass) * * @param int $customerTaxClass * @param int $productTaxClass - * @return mixed + * @return array */ public function getRatesByCustomerAndProductTaxClasses($customerTaxClass, $productTaxClass) { diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php index 7e04ea16fe2..a83dc6e99c2 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php @@ -222,7 +222,7 @@ public function proccessAdditionalValidation(Mage_Shipping_Model_Rate_Request $r * Returns cache key for some request to carrier quotes service * * @param string|array $requestParams - * @return string + * @return int */ protected function _getQuotesCacheKey($requestParams) { diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php index 9cf0db9a8d7..2c719c7e123 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php @@ -381,7 +381,7 @@ public function setRequest(Varien_Object $request) /** * Get result of request * - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getResult() { @@ -948,7 +948,7 @@ protected function _addRate($shipXml) * Get tracking * * @param mixed $trackings - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getTracking($trackings) { diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php index b3a765f97d3..ea6db6bb3a2 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php @@ -271,7 +271,7 @@ protected function _addParams($requestObject) * Prepare and set request in property of current instance * * @param Varien_Object $request - * @return Mage_Usa_Model_Shipping_Carrier_Dhl + * @return $this */ public function setRequest(Varien_Object $request) { @@ -769,7 +769,7 @@ protected function _addDimension($nodePiece) /** * Get shipping quotes * - * @return Mage_Core_Model_Abstract|Mage_Shipping_Model_Rate_Result + * @return Mage_Shipping_Model_Rate_Result */ protected function _getQuotes() { @@ -1528,7 +1528,7 @@ protected function _shipmentDetails($xml, $rawRequest, $originRegion = '') * Get tracking * * @param mixed $trackings - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getTracking($trackings) { diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php index 29c5dce8ec4..4eed00c736f 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php @@ -101,7 +101,7 @@ protected function _y($pt) /** * Add Border * - * @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page + * @return $this */ public function addBorder() { @@ -212,7 +212,7 @@ public function addProductContentCode($code) * Add Unit Id * * @param int $id - * @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page + * @return $this */ public function addUnitId($id) { @@ -228,7 +228,7 @@ public function addUnitId($id) * Add Reference Data * * @param $data - * @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page + * @return $this */ public function addReferenceData($data) { @@ -439,7 +439,7 @@ public function addDeliveryDateCode() * Add Shipment Information * * @param Mage_Sales_Model_Order_Shipment $data - * @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page + * @return $this * @throws InvalidArgumentException */ public function addShipmentInformation($data) diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php index 6ca26348c15..ea2df3e1d9f 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php @@ -277,7 +277,7 @@ public function setRequest(Mage_Shipping_Model_Rate_Request $request) /** * Get result of request * - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getResult() { @@ -959,7 +959,7 @@ public function getCurrencyCode () * Get tracking * * @param mixed $trackings - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getTracking($trackings) { diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php index 77543cbd0c7..bd8d4c026ee 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php @@ -299,7 +299,7 @@ protected function _getCorrectWeight($weight) /** * Get result of request * - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getResult() { @@ -1056,7 +1056,7 @@ protected function _parseXmlResponse($xmlResponse) * Get tracking * * @param mixed $trackings - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getTracking($trackings) { @@ -1101,7 +1101,7 @@ protected function setXMLAccessRequest() * Get cgi tracking * * @param mixed $trackings - * @return mixed + * @return false|Mage_Core_Model_Abstract|Mage_Shipping_Model_Tracking_Result */ protected function _getCgiTracking($trackings) { @@ -1130,7 +1130,7 @@ protected function _getCgiTracking($trackings) * Get xml tracking * * @param mixed $trackings - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ protected function _getXmlTracking($trackings) { @@ -1717,7 +1717,7 @@ public function getContainerTypes(Varien_Object $params = null) /** * Return all container types of carrier * - * @return array|bool + * @return array */ public function getContainerTypesAll() { @@ -1745,7 +1745,7 @@ public function getContainerTypesFilter() * Return delivery confirmation types of carrier * * @param Varien_Object|null $params - * @return array|bool + * @return array */ public function getDeliveryConfirmationTypes(Varien_Object $params = null) { diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php index b39b882a5cd..cc630237168 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php @@ -263,7 +263,7 @@ public function setRequest(Mage_Shipping_Model_Rate_Request $request) /** * Get result of request * - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getResult() { @@ -897,7 +897,7 @@ public function getCode($type, $code = '') * Get tracking * * @param mixed $trackingData - * @return mixed + * @return Mage_Shipping_Model_Rate_Result|null */ public function getTracking($trackingData) { diff --git a/app/code/core/Mage/Weee/Model/Tax.php b/app/code/core/Mage/Weee/Model/Tax.php index 81469e82adf..3024a2c8ccf 100644 --- a/app/code/core/Mage/Weee/Model/Tax.php +++ b/app/code/core/Mage/Weee/Model/Tax.php @@ -159,7 +159,7 @@ public function getWeeeTaxAttributeCodes($forceEnabled = false) * @param int $website * @param bool $calculateTax * @param bool $ignoreDiscount - * @return array|\Varien_Object + * @return array */ public function getProductWeeeAttributes( $product, diff --git a/app/code/core/Mage/Wishlist/controllers/IndexController.php b/app/code/core/Mage/Wishlist/controllers/IndexController.php index 749a738cdc2..bc082046953 100644 --- a/app/code/core/Mage/Wishlist/controllers/IndexController.php +++ b/app/code/core/Mage/Wishlist/controllers/IndexController.php @@ -47,7 +47,7 @@ class Mage_Wishlist_IndexController extends Mage_Wishlist_Controller_Abstract /** * Extend preDispatch * - * @return Mage_Core_Controller_Front_Action|void + * @return void */ public function preDispatch() { @@ -175,7 +175,7 @@ public function addAction() /** * Add the item to wish list * - * @return Mage_Core_Controller_Varien_Action|void + * @return void */ protected function _addItemToWishList() { From c487fd78a72388091fad88f8c2797e2177326a7b Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Tue, 13 Sep 2022 11:50:25 +0200 Subject: [PATCH 2/3] phpstan: fixed beforeSave() --- .github/phpstan-baseline.neon | 10 ---------- app/code/core/Mage/Bundle/Model/Product/Type.php | 2 ++ app/code/core/Mage/Downloadable/Model/Product/Type.php | 2 ++ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon index e519f590e95..c066fa831c5 100644 --- a/.github/phpstan-baseline.neon +++ b/.github/phpstan-baseline.neon @@ -920,11 +920,6 @@ parameters: count: 2 path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - - message: "#^Method Mage_Bundle_Model_Product_Type\\:\\:beforeSave\\(\\) should return Mage_Catalog_Model_Product_Type_Abstract but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - message: "#^Variable \\$selections in empty\\(\\) always exists and is not falsy\\.$#" count: 1 @@ -2110,11 +2105,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Downloadable/Model/Product/Price.php - - - message: "#^Method Mage_Downloadable_Model_Product_Type\\:\\:beforeSave\\(\\) should return Mage_Catalog_Model_Product_Type_Abstract but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Model/Product/Type.php - - message: "#^Method Mage_Customer_Model_Session\\:\\:setBeforeAuthUrl\\(\\) invoked with 2 parameters, 1 required\\.$#" count: 1 diff --git a/app/code/core/Mage/Bundle/Model/Product/Type.php b/app/code/core/Mage/Bundle/Model/Product/Type.php index 984e8b0eb5b..3891998e989 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Type.php +++ b/app/code/core/Mage/Bundle/Model/Product/Type.php @@ -215,6 +215,7 @@ public function isVirtual($product = null) * Before save type related data * * @param Mage_Catalog_Model_Product $product + * @return $this */ public function beforeSave($product = null) { @@ -257,6 +258,7 @@ public function beforeSave($product = null) } } } + return $this; } /** diff --git a/app/code/core/Mage/Downloadable/Model/Product/Type.php b/app/code/core/Mage/Downloadable/Model/Product/Type.php index f6bd2e9bc77..36933916f8e 100644 --- a/app/code/core/Mage/Downloadable/Model/Product/Type.php +++ b/app/code/core/Mage/Downloadable/Model/Product/Type.php @@ -383,6 +383,7 @@ public function getOrderOptions($product = null) * based on link can be purchased separately or not * * @param Mage_Catalog_Model_Product $product + * @return $this */ public function beforeSave($product = null) { @@ -408,6 +409,7 @@ public function beforeSave($product = null) $this->getProduct($product)->setTypeHasOptions($linksExist); $this->getProduct($product)->setLinksExist($linksExist); + return $this; } /** From 79b8dc3818c1eb5a796ac4bc79f640767a410350 Mon Sep 17 00:00:00 2001 From: Sven Reichel Date: Wed, 21 Sep 2022 03:06:41 +0200 Subject: [PATCH 3/3] Update phpstan-baseline.neon --- .github/phpstan-baseline.neon | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon index 68e8d768d86..5c732bc4da1 100644 --- a/.github/phpstan-baseline.neon +++ b/.github/phpstan-baseline.neon @@ -385,11 +385,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - - message: "#^Method Mage_Adminhtml_Block_Widget_Tabs\\:\\:addTabAfter\\(\\) should return Mage_Adminhtml_Block_Widget_Tabs but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$tabNId$#" count: 1 @@ -450,11 +445,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Adminhtml/Model/System/Store.php - - - message: "#^Method Mage_Adminhtml_Model_Url\\:\\:renewSecretUrls\\(\\) should return \\$this\\(Mage_Adminhtml_Model_Url\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Url.php - - message: "#^Method Mage_Adminhtml_Controller_Action\\:\\:_setForcedFormKeyActions\\(\\) invoked with 2 parameters, 1 required\\.$#" count: 1 @@ -700,11 +690,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - message: "#^Call to an undefined method Mage_Payment_Model_Info\\:\\:authorize\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - message: "#^Call to an undefined method Varien_Object\\:\\:decrypt\\(\\)\\.$#" count: 1 @@ -715,11 +700,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - - message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:authorize\\(\\) should return Mage_Paygate_Model_Authorizenet but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - message: "#^Method Mage_Authorizenet_Model_Directpost\\:\\:initialize\\(\\) should return \\$this\\(Mage_Authorizenet_Model_Directpost\\) but return statement is missing\\.$#" count: 1 @@ -1820,11 +1800,6 @@ parameters: count: 2 path: ../app/code/core/Mage/Dataflow/Model/Profile.php - - - message: "#^Binary operation \"\\*\" between float and non\\-falsy\\-string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Model/Currency.php - - message: "#^Variable \\$response might not be defined\\.$#" count: 1 @@ -2370,11 +2345,6 @@ parameters: count: 1 path: ../app/code/core/Mage/Paypal/Model/Ipn.php - - - message: "#^Method Mage_Paypal_Model_Observer\\:\\:fetchReports\\(\\) should return \\$this\\(Mage_Paypal_Model_Observer\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Observer.php - - message: "#^Variable \\$order in empty\\(\\) always exists and is not falsy\\.$#" count: 1