diff --git a/.all-contributorsrc b/.all-contributorsrc index eabd644b004..7c37ab29281 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1332,7 +1332,10 @@ "login": "cebe", "name": "Carsten Brandt", "avatar_url": "https://avatars.githubusercontent.com/u/189796?v=4", - "profile": "http://cebe.cc/" + "profile": "http://cebe.cc/", + "contributions": [ + "code" + ] }, { "login": "eneiasramos", @@ -1351,6 +1354,15 @@ "contributions": [ "code" ] + }, + { + "login": "rfeese", + "name": "Roger Feese", + "avatar_url": "https://avatars.githubusercontent.com/u/7074181?v=4", + "profile": "https://github.com/rfeese", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7 diff --git a/.ddev/commands/web/php-cs-fixer b/.ddev/commands/web/php-cs-fixer new file mode 100755 index 00000000000..b891a13dd54 --- /dev/null +++ b/.ddev/commands/web/php-cs-fixer @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHP-CS-Fixer +## Usage: php-cs-fixer +## Example: ddev php-cs-fixer + +php vendor/bin/php-cs-fixer fix "$@" diff --git a/.ddev/commands/web/phpcbf b/.ddev/commands/web/phpcbf new file mode 100755 index 00000000000..7a34ea1dec0 --- /dev/null +++ b/.ddev/commands/web/phpcbf @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPCodeBeautifier +## Usage: phpcbf +## Example: ddev phpcbf + +php vendor/bin/phpcbf -s -p --report=full,source,summary "$@" diff --git a/.ddev/commands/web/phpcs b/.ddev/commands/web/phpcs new file mode 100755 index 00000000000..95cbaa9e02f --- /dev/null +++ b/.ddev/commands/web/phpcs @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPCodeSniffer +## Usage: phpcs +## Example: ddev phpcs + +php vendor/bin/phpcs -s -p --report=full,summary "$@" diff --git a/.ddev/commands/web/phpmd b/.ddev/commands/web/phpmd new file mode 100755 index 00000000000..88bdd914ea0 --- /dev/null +++ b/.ddev/commands/web/phpmd @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPMD +## Usage: phpmd +## Example: ddev phpmd + +php vendor/bin/phpmd "$@" text .phpmd.dist.xml diff --git a/.ddev/commands/web/phpstan b/.ddev/commands/web/phpstan new file mode 100755 index 00000000000..b365b081c83 --- /dev/null +++ b/.ddev/commands/web/phpstan @@ -0,0 +1,7 @@ +#!/bin/bash + +## Description: run PHPStan +## Usage: phpstan +## Example: ddev phpstan + +XDEBUG_MODE=off php vendor/bin/phpstan analyze "$@" diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml new file mode 100644 index 00000000000..91051af581b --- /dev/null +++ b/.github/codeql-config.yml @@ -0,0 +1,22 @@ + +paths-ignore: + - 'js/prototype/prototype.js' + - 'skin/frontend/rwd/default/js/lib/selectivizr.js' + - 'js/mage/adminhtml/flexuploader.js' + - 'js/mage/adminhtml/sales/packaging.js' + - 'js/mage/adminhtml/uploader/instance.js' + - 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js' + - 'js/prototype/validation.js' + - 'js/tiny_mce/tiny_mce_dev.js' + - 'js/tiny_mce/tiny_mce.js' + - 'js/tiny_mce/tiny_mce_src.js' + - 'js/tiny_mce/tiny_mce_jquery.js' + - 'js/tiny_mce/tiny_mce_jquery_src.js' + - 'js/tiny_mce/tiny_mce_prototype.js' + - 'js/tiny_mce/tiny_mce_prototype_src.js' + - 'js/tiny_mce/classes/**/*.js' + - 'js/tiny_mce/utils/**/*.js' + - 'js/tiny_mce/plugins/**/*.js' + - 'js/lib/jquery/jquery-1.12.4.js' + - 'js/extjs/ext-tree.js' + - '**/*.test.js' diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..2eff6b978a5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/labeler.yml b/.github/labeler.yml index b7001409496..bad2405eba0 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,19 +1,13 @@ 'Environment': - .github/* - .github/**/* - - .phpstorm.meta.php/* - - .travis.yml - -'phpstan': - - .github/phpstan.neon - - .github/phpstan-baseline.neon - - .github/phpstan_experimental_level.neon 'htaccess': - .htaccess 'composer': - composer.json + - composer.lock 'downloader': - downloader/* @@ -32,6 +26,10 @@ - lib/Mage/* - lib/Mage/**/* +'Component: lib/Magento': + - lib/Magento/* + - lib/Magento/**/* + 'Component: lib/Varien': - lib/Varien/* - lib/Varien/**/* @@ -603,3 +601,29 @@ # Add Documentation Label 'Documentation': - '*.md' + +'PHPStorm': + - .phpstorm.meta.php/* + +'phpcs': + - .phpcs* + - .github/workflows/phpcs.yml + +'php-cs-fixer': + - .php-cs-fixer* + - .github/workflows/php-cs-fixer.yml + +'phpstan': + - phpstan* + - .github/workflows/phpstan.yml + +'phpunit': + - dev/test/* + - dev/phpunit* + - dev/sonar* + - .github/workflows/phpunit.yml + - .github/workflows/sonar.yml + +'ddev': + - .ddev/* + - .ddev/**/* diff --git a/.github/phpcs-ruleset.xml b/.github/phpcs-ruleset.xml deleted file mode 100644 index 5e21176d041..00000000000 --- a/.github/phpcs-ruleset.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon deleted file mode 100644 index c3b9114d512..00000000000 --- a/.github/phpstan-baseline.neon +++ /dev/null @@ -1,5756 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Comparison operation \"\\=\\=\" between \\(Varien_Simplexml_Element\\|null\\) and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Admin/Model/Config.php - - - - message: "#^Cannot call method getClassName\\(\\) on SimpleXMLElement\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Admin/Model/Resource/Acl.php - - - - message: "#^Call to an undefined method Mage_Admin_Model_Resource_Roles\\:\\:update\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Admin/Model/Roles.php - - - - message: "#^Comparison operation \"\\=\\=\" between \\(Varien_Simplexml_Element\\|null\\) and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Admin/Model/Roles.php - - - - message: "#^Call to an undefined method Mage_Admin_Model_Resource_Rules\\:\\:update\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Admin/Model/Rules.php - - - - message: "#^Call to an undefined method Zend_Controller_Response_Abstract\\:\\:sendHeadersAndExit\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Admin/Model/Session.php - - - - message: "#^Call to an undefined method Mage_Api_Model_Resource_Roles_User_Collection\\:\\:setUserFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php - - - - message: "#^Return type \\(false\\) of method Mage_Adminhtml_Block_Cache_Grid\\:\\:getRowUrl\\(\\) should be compatible with return type \\(string\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:getRowUrl\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Cache/Grid.php - - - - message: "#^Method Mage_Adminhtml_Block_Catalog_Category_Checkboxes_Tree\\:\\:_getNodeJson\\(\\) should return string but returns array\\\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php - - - - message: "#^Method Mage_Adminhtml_Block_Catalog_Category_Tree\\:\\:_getNodeJson\\(\\) should return string but returns array\\\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php - - - - message: "#^Cannot assign offset 'checked' to string\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php - - - - message: "#^Cannot call method addAttributeToSelect\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php - - - - message: "#^Method Mage_Adminhtml_Block_Catalog_Category_Widget_Chooser\\:\\:_getNodeJson\\(\\) should return string but returns array\\\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php - - - - message: "#^Method Mage_Adminhtml_Block_Widget_Grid\\:\\:addColumn\\(\\) invoked with 3 parameters, 2 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid\\:\\:_prepareColumns\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:_prepareColumns\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php - - - - message: "#^Method Mage_Adminhtml_Block_Catalog_Product_Edit_Action_Attribute\\:\\:_getHelper\\(\\) should return Mage_Adminhtml_Helper_Catalog_Product_Edit_Action_Attribute but returns Mage_Core_Helper_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes\\:\\:_prepareForm\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Form\\)\\) of method Mage_Adminhtml_Block_Widget_Form\\:\\:_prepareForm\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php - - - - message: "#^Cannot assign offset 'expanded' to string\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php - - - - message: "#^Return type \\(array\\) of method Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Categories\\:\\:_getNodeJson\\(\\) should be compatible with return type \\(string\\) of method Mage_Adminhtml_Block_Catalog_Category_Tree\\:\\:_getNodeJson\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 2 parameters, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php - - - - message: "#^Method Mage_Catalog_Model_Product_Type_Configurable\\:\\:canUseAttribute\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute\\:\\:isScopeGlobal\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute\\:\\:isScopeStore\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute\\:\\:isScopeWebsite\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php - - - - message: "#^PHPDoc type Mage_Core_Model_Abstract of property Mage_Adminhtml_Block_Customer_Edit_Renderer_Region\\:\\:\\$_factory is not covariant with PHPDoc type Mage_Core_Model_Factory of overridden property Mage_Core_Block_Abstract\\:\\:\\$_factory\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php - - - - message: "#^Property Mage_Adminhtml_Block_Customer_Edit_Tab_View_Sales\\:\\:\\$_collection \\(Mage_Sales_Model_Entity_Sale_Collection\\) does not accept Varien_Data_Collection_Db\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php - - - - message: "#^Method Mage_Wishlist_Model_Resource_Item_Collection\\:\\:addDaysInWishlist\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php - - - - message: "#^Method Mage_Adminhtml_Block_Customer_Sales_Order_Address_Form_Renderer_Vat\\:\\:getValidateButton\\(\\) should return Mage_Adminhtml_Block_Widget_Button but returns Mage_Core_Block_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php - - - - message: "#^Property Mage_Adminhtml_Block_Customer_Sales_Order_Address_Form_Renderer_Vat\\:\\:\\$_validateButton \\(Mage_Adminhtml_Block_Widget_Button\\|null\\) does not accept Mage_Core_Block_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php - - - - message: "#^Variable \\$d might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php - - - - message: "#^Variable \\$localmaxlength might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php - - - - message: "#^Variable \\$localmaxvalue might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php - - - - message: "#^Variable \\$localminvalue might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php - - - - message: "#^Variable \\$class might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php - - - - message: "#^Variable \\$value might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php - - - - message: "#^Access to an undefined property Mage_Adminhtml_Block_Notification_Window\\:\\:\\$_aclResourcePath\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Notification/Window.php - - - - message: "#^Comparison operation \"\\=\\=\" between \\(Varien_Simplexml_Element\\|null\\) and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Page/Menu.php - - - - message: "#^Call to method getCollection\\(\\) on an unknown class Mage_Permissions_Model_Users\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php - - - - message: "#^Call to an undefined method Varien_Data_Collection\\:\\:addFieldToFilter\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php - - - - message: "#^Call to an undefined method Mage_Admin_Model_Resource_Roles_User_Collection\\:\\:setUserFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Userroles.php - - - - message: "#^Call to an undefined method Varien_Data_Collection\\:\\:addFieldToFilter\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php - - - - message: "#^Call to method getCollection\\(\\) on an unknown class Mage_Permissions_Model_Roles\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Permissions/Usernroles.php - - - - message: "#^Call to method getCollection\\(\\) on an unknown class Mage_Permissions_Model_Users\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Permissions/Usernroles.php - - - - message: "#^Variable \\$answerData might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Report_Grid\\:\\:_prepareCollection\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:_prepareCollection\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Grid.php - - - - message: "#^Call to an undefined method Mage_Reports_Model_Resource_Report_Collection_Abstract\\:\\:addOrderStatusFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php - - - - message: "#^Cannot call method setPeriod\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 4 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php - - - - message: "#^Method Mage_Adminhtml_Block_Report_Grid_Abstract\\:\\:addColumn\\(\\) should return Mage_Adminhtml_Block_Report_Grid_Abstract but returns Mage_Adminhtml_Block_Widget_Grid\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php - - - - message: "#^Method Mage_Adminhtml_Block_Report_Grid_Abstract\\:\\:getCollection\\(\\) should return Mage_Reports_Model_Grouped_Collection but returns Varien_Data_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:setStore\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php - - - - message: "#^Method Mage_Reports_Model_Totals\\:\\:countTotals\\(\\) invoked with 1 parameter, 3 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Report_Product_Grid\\:\\:_afterLoadCollection\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:_afterLoadCollection\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php - - - - message: "#^Call to an undefined method Mage_Reports_Model_Resource_Report_Collection_Abstract\\:\\:addRuleFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Report_Shopcart_Customer_Grid\\:\\:_afterLoadCollection\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:_afterLoadCollection\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Review_Grid\\:\\:_prepareMassaction\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:_prepareMassaction\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Review/Grid.php - - - - message: "#^Return type \\(int\\) of method Mage_Adminhtml_Block_Review_Grid_Filter_Type\\:\\:getCondition\\(\\) should be compatible with return type \\(array\\|null\\) of method Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select\\:\\:getCondition\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php - - - - message: "#^Return type \\(void\\) of method Mage_Adminhtml_Block_Review_Product_Grid\\:\\:_prepareColumns\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Catalog_Product_Grid\\:\\:_prepareColumns\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php - - - - message: "#^Method Mage_Adminhtml_Block_Sales_Order_Create_Billing_Address\\:\\:getAddress\\(\\) should return Mage_Customer_Model_Address but returns Mage_Sales_Model_Quote_Address\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php - - - - message: "#^Property Mage_Adminhtml_Block_Sales_Order_Create_Form_Address\\:\\:\\$_addressForm \\(Mage_Customer_Model_Form\\) does not accept Mage_Eav_Model_Form\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php - - - - message: "#^Method Mage_Adminhtml_Block_Sales_Order_Create_Giftmessage_Form\\:\\:getEntity\\(\\) should return Varien_Object but returns Mage_Eav_Model_Entity_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php - - - - message: "#^Property Mage_Adminhtml_Block_Sales_Order_Create_Giftmessage_Form\\:\\:\\$_entity \\(Mage_Eav_Model_Entity_Abstract\\) does not accept Varien_Object\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php - - - - message: "#^Argument of an invalid type float supplied for foreach, only iterables are supported\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php - - - - message: "#^Undefined variable\\: \\$info$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php - - - - message: "#^Call to method getIsOldCustomer\\(\\) on an unknown class Mage_Adminhtml_Model_Quote\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php - - - - message: "#^Method Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Address\\:\\:getAddress\\(\\) should return Mage_Customer_Model_Address but returns Mage_Sales_Model_Quote_Address\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php - - - - message: "#^Variable \\$button might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Compare_Item_Collection\\:\\:useProductItem\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Compare_Item_Collection\\:\\:useProductItem\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php - - - - message: "#^Call to an undefined method Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Adjustments\\:\\:addTotal\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php - - - - message: "#^Call to an undefined method Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Adjustments\\:\\:removeTotal\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php - - - - message: "#^Return type \\(Mage_Sales_Model_Order_Creditmemo\\) of method Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Items\\:\\:getSource\\(\\) should be compatible with return type \\(Mage_Sales_Model_Order_Invoice\\) of method Mage_Adminhtml_Block_Sales_Items_Abstract\\:\\:getSource\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php - - - - message: "#^Return type \\(Mage_Sales_Model_Order_Creditmemo\\) of method Mage_Adminhtml_Block_Sales_Order_Creditmemo_View_Items\\:\\:getSource\\(\\) should be compatible with return type \\(Mage_Sales_Model_Order_Invoice\\) of method Mage_Adminhtml_Block_Sales_Items_Abstract\\:\\:getSource\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php - - - - message: "#^Return type \\(Mage_Sales_Model_Order_Shipment\\) of method Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Items\\:\\:getSource\\(\\) should be compatible with return type \\(Mage_Sales_Model_Order_Invoice\\) of method Mage_Adminhtml_Block_Sales_Items_Abstract\\:\\:getSource\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php - - - - message: "#^Call to an undefined method Mage_Shipping_Model_Carrier_Abstract\\:\\:isGirthAllowed\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php - - - - message: "#^Method Mage_Adminhtml_Block_Sales_Order_Shipment_Packaging\\:\\:getQtyOrderedItem\\(\\) should return int\\|null but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php - - - - message: "#^Variable \\$createLabelUrl might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php - - - - message: "#^Variable \\$itemsGridUrl might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php - - - - message: "#^Variable \\$itemsOrderItemId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php - - - - message: "#^Return type \\(Mage_Sales_Model_Order_Shipment\\) of method Mage_Adminhtml_Block_Sales_Order_Shipment_View_Items\\:\\:getSource\\(\\) should be compatible with return type \\(Mage_Sales_Model_Order_Invoice\\) of method Mage_Adminhtml_Block_Sales_Items_Abstract\\:\\:getSource\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php - - - - message: "#^Property Mage_Adminhtml_Block_Sales_Order_View_Items_Renderer_Default\\:\\:\\$_giftMessage \\(Mage_GiftMessage_Model_Message\\) does not accept default value of type array\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:setOrderFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:setOrderFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:setOrderFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php - - - - message: "#^Property Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid\\:\\:\\$_conditionName \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php - - - - message: "#^Property Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset\\:\\:\\$_element \\(Varien_Data_Form_Element_Fieldset\\) does not accept Varien_Data_Form_Element_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php - - - - message: "#^Property Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset_Element\\:\\:\\$_element \\(Varien_Data_Form_Element_Fieldset\\) does not accept Varien_Data_Form_Element_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php - - - - message: "#^Cannot call method initForm\\(\\) on Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Abstract\\:\\:toOptionArray\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Config/Form.php - - - - message: "#^Comparison operation \"\\=\\=\" between \\(Mage_Core_Model_Config_Element\\|null\\) and 1 results in an error\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/System/Config/Form.php - - - - message: "#^Variable \\$attributes might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php - - - - message: "#^Variable \\$img might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php - - - - message: "#^Variable \\$liStyle might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php - - - - message: "#^Method Mage_Adminhtml_Block_System_Email_Template_Edit\\:\\:getUsedCurrentlyForPaths\\(\\) should return string but returns array\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php - - - - message: "#^Method Mage_Adminhtml_Block_System_Email_Template_Edit\\:\\:getUsedDefaultForPaths\\(\\) should return string but returns array\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php - - - - message: "#^Method Mage_Core_Model_Email_Template\\:\\:getProcessedTemplate\\(\\) invoked with 2 parameters, 0\\-1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php - - - - message: "#^Variable \\$addLabel might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php - - - - message: "#^Variable \\$deleteLabel might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php - - - - message: "#^Variable \\$deleteUrl might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php - - - - message: "#^Variable \\$editLabel might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php - - - - message: "#^Variable \\$saveLabel might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php - - - - message: "#^Variable \\$groupModel might not be defined\\.$#" - count: 18 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php - - - - message: "#^Variable \\$showGroupFieldset might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php - - - - message: "#^Variable \\$showStoreFieldset might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php - - - - message: "#^Variable \\$showWebsiteFieldset might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php - - - - message: "#^Variable \\$storeModel might not be defined\\.$#" - count: 21 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php - - - - message: "#^Variable \\$websiteModel might not be defined\\.$#" - count: 15 - path: ../app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php - - - - message: "#^Call to an undefined method Mage_Tag_Model_Resource_Tag_Collection\\:\\:addAttributeToFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php - - - - message: "#^Binary operation \"\\*\" between string and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php - - - - message: "#^Variable \\$category in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php - - - - message: "#^Method Mage_Adminhtml_Block_Widget_Container\\:\\:_addButtonChildBlock\\(\\) should return Mage_Adminhtml_Block_Widget_Button but returns Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Container.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 2 parameters, 0 required\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Form.php - - - - message: "#^Call to an undefined method Varien_Data_Collection\\:\\:addFieldToFilter\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid.php - - - - message: "#^Call to an undefined method Varien_Data_Collection\\:\\:getSelect\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid.php - - - - message: "#^Method Mage_Adminhtml_Block_Widget_Grid\\:\\:getSubTotalItem\\(\\) should return Varien_Object but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid.php - - - - message: "#^Property Mage_Adminhtml_Block_Widget_Grid\\:\\:\\$defaultColumnSettings \\(array\\\\>\\) does not accept default value of type array\\\\>\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid.php - - - - message: "#^Method Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Date\\:\\:_convertDate\\(\\) should return Zend_Date but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php - - - - message: "#^Method Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Datetime\\:\\:_convertDate\\(\\) should return Zend_Date but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php - - - - message: "#^Binary operation \"\\*\" between string and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php - - - - message: "#^Call to an undefined method Mage_Adminhtml_Block_Widget_Tab_Interface\\:\\:getSkipGenerateContent\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - - - message: "#^Call to an undefined method Mage_Adminhtml_Block_Widget_Tab_Interface\\:\\:getTabId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - - - message: "#^Call to an undefined method Mage_Adminhtml_Block_Widget_Tab_Interface\\:\\:toHtml\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - - - message: "#^PHPDoc tag @param references unknown parameter\\: \\$tabNId$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php - - - - message: "#^Return type \\(Mage_Admin_Model_Session\\) of method Mage_Adminhtml_Controller_Report_Abstract\\:\\:_getSession\\(\\) should be compatible with return type \\(Mage_Adminhtml_Model_Session\\) of method Mage_Adminhtml_Controller_Action\\:\\:_getSession\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php - - - - message: "#^Method Mage_Adminhtml_Model_Config\\:\\:getSection\\(\\) should return Varien_Simplexml_Element but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Config.php - - - - message: "#^Property Mage_Adminhtml_Model_Config\\:\\:\\$_config \\(Mage_Core_Model_Config_Base\\) does not accept Varien_Simplexml_Config\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Config.php - - - - message: "#^Call to an undefined method Mage_Adminhtml_Model_Config_Data\\:\\:__\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Config/Data.php - - - - message: "#^Property Mage_Adminhtml_Model_Config_Data\\:\\:\\$_configRoot \\(Mage_Core_Model_Config_Element\\) does not accept Varien_Simplexml_Element\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Config/Data.php - - - - message: "#^Method Mage_Eav_Model_Entity_Abstract\\:\\:load\\(\\) invoked with 1 parameter, 2\\-3 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php - - - - message: "#^Method Mage_Adminhtml_Model_Sales_Order_Create\\:\\:initFromOrderItem\\(\\) should return Mage_Sales_Model_Quote_Item\\|string but returns \\$this\\(Mage_Adminhtml_Model_Sales_Order_Create\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php - - - - message: "#^Property Mage_Adminhtml_Model_Sales_Order_Create\\:\\:\\$_customerAddressForm \\(Mage_Customer_Model_Form\\) does not accept bool\\|Mage_Eav_Model_Form\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php - - - - message: "#^Property Mage_Adminhtml_Model_Sales_Order_Create\\:\\:\\$_customerForm \\(Mage_Customer_Model_Form\\) does not accept bool\\|Mage_Eav_Model_Form\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php - - - - message: "#^Property Mage_Adminhtml_Model_Sales_Order_Create\\:\\:\\$_wishlist \\(Mage_Wishlist_Model_Wishlist\\) does not accept false\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php - - - - message: "#^Variable \\$billingAddress might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php - - - - message: "#^Variable \\$shippingAddress might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Order\\:\\:createFromQuoteAddress\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Order\\:\\:validate\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Quote\\:\\:addCatalogProduct\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php - - - - message: "#^Cannot access offset 'file' on bool\\|void\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php - - - - message: "#^Comparison operation \"\\=\\=\" between \\(Varien_Simplexml_Element\\|null\\) and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php - - - - message: "#^Method Varien_Data_Collection\\:\\:toOptionArray\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php - - - - message: "#^Method Mage_Adminhtml_Model_System_Store\\:\\:__construct\\(\\) with return type void returns \\$this\\(Mage_Adminhtml_Model_System_Store\\) but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/System/Store.php - - - - message: "#^Variable \\$values might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/Model/System/Store.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php - - - - message: "#^Return type \\(Mage_Adminhtml_Helper_Catalog_Product_Edit_Action_Attribute\\) of method Mage_Adminhtml_Catalog_Product_Action_AttributeController\\:\\:_getHelper\\(\\) should be compatible with return type \\(Mage_Adminhtml_Helper_Data\\) of method Mage_Adminhtml_Controller_Action\\:\\:_getHelper\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php - - - - message: "#^Cannot access offset 'tmp_name' on bool\\|void\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php - - - - message: "#^Offset 'file' does not exist on array\\{path\\: \\(array\\|string\\), url\\: string\\}\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php - - - - message: "#^Offset 'file' does not exist on array\\{path\\: \\(array\\|string\\)\\}\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php - - - - message: "#^Method Mage_Adminhtml_Controller_Action\\:\\:_setForcedFormKeyActions\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php - - - - message: "#^Property Mage_Adminhtml_Customer_Wishlist_Product_Composite_WishlistController\\:\\:\\$_wishlistItem \\(Mage_Wishlist_Model_Wishlist\\) does not accept Mage_Wishlist_Model_Item\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:getClassName\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/IndexController.php - - - - message: "#^Variable \\$id in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php - - - - message: "#^Variable \\$id in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php - - - - message: "#^Cannot call method aggregate\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php - - - - message: "#^Return type \\(Mage_Admin_Model_Session\\) of method Mage_Adminhtml_Report_StatisticsController\\:\\:_getSession\\(\\) should be compatible with return type \\(Mage_Adminhtml_Model_Session\\) of method Mage_Adminhtml_Controller_Action\\:\\:_getSession\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php - - - - message: "#^Method Mage_Adminhtml_Model_Sales_Order_Create\\:\\:moveQuoteItem\\(\\) invoked with 2 parameters, 3 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php - - - - message: "#^Method Mage_Adminhtml_Model_Sales_Order_Create\\:\\:resetShippingMethod\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php - - - - message: "#^Return type \\(Mage_Adminhtml_Model_Session_Quote\\) of method Mage_Adminhtml_Sales_Order_CreateController\\:\\:_getSession\\(\\) should be compatible with return type \\(Mage_Adminhtml_Model_Session\\) of method Mage_Adminhtml_Controller_Action\\:\\:_getSession\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Order_Creditmemo\\:\\:void\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php - - - - message: "#^Undefined variable\\: \\$shippingResponse$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php - - - - message: "#^Variable \\$shippingResponse in isset\\(\\) is never defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php - - - - message: "#^Method Mage_Adminhtml_Sales_Order_ShipmentController\\:\\:getShippingItemsGridAction\\(\\) should return Mage_Core_Controller_Response_Http but returns Zend_Controller_Response_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php - - - - message: "#^Method Mage_Adminhtml_Controller_Action\\:\\:_setForcedFormKeyActions\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php - - - - message: "#^Variable \\$pdf might not be defined\\.$#" - count: 4 - path: ../app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php - - - - message: "#^Variable \\$data in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php - - - - message: "#^Cannot call method fetchRates\\(\\) on Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php - - - - message: "#^Method Mage_Adminhtml_System_StoreController\\:\\:_backupDatabase\\(\\) should return \\$this\\(Mage_Adminhtml_System_StoreController\\) but empty return statement found\\.$#" - count: 2 - path: ../app/code/core/Mage/Adminhtml/controllers/System/StoreController.php - - - - message: "#^Variable \\$codeBase might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/System/StoreController.php - - - - message: "#^Variable \\$itemId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/System/StoreController.php - - - - message: "#^Variable \\$model might not be defined\\.$#" - count: 5 - path: ../app/code/core/Mage/Adminhtml/controllers/System/StoreController.php - - - - message: "#^Variable \\$notExists might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/System/StoreController.php - - - - message: "#^Variable \\$title might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/System/StoreController.php - - - - message: "#^Method Mage_Directory_Model_Country\\:\\:loadByCode\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php - - - - message: "#^Method Mage_Adminhtml_Tax_RuleController\\:\\:saveAction\\(\\) should return Mage_Core_Controller_Response_Http\\|Mage_Core_Controller_Varien_Action but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php - - - - message: "#^Method Mage_Adminhtml_Tax_RuleController\\:\\:saveAction\\(\\) should return Mage_Core_Controller_Response_Http\\|Mage_Core_Controller_Varien_Action but returns Zend_Controller_Response_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php - - - - message: "#^Method Mage_Api_Model_Acl\\:\\:_getRoleRegistry\\(\\) should return Mage_Api_Model_Acl_Role_Registry but returns Zend_Acl_Role_Registry\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Acl.php - - - - message: "#^Return type \\(Zend_Cache_Core\\) of method Mage_Api_Model_Config\\:\\:getCache\\(\\) should be compatible with return type \\(Varien_Simplexml_Config_Cache_Abstract\\) of method Varien_Simplexml_Config\\:\\:getCache\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Config.php - - - - message: "#^Cannot call method getClassName\\(\\) on bool\\|SimpleXMLElement\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Resource/Acl.php - - - - message: "#^Method Mage_Core_Model_Resource_Db_Abstract\\:\\:load\\(\\) invoked with 1 parameter, 2\\-3 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Resource/Roles.php - - - - message: "#^Call to an undefined method Mage_Api_Model_Resource_Roles\\:\\:update\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Roles.php - - - - message: "#^Call to an undefined method Mage_Api_Model_Resource_Rules\\:\\:update\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Rules.php - - - - message: "#^Call to an undefined method SoapServer\\:\\:setReturnResponse\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Adapter/Soap.php - - - - message: "#^Property Mage_Api_Model_Server_Adapter_Soap\\:\\:\\$_soap \\(SoapServer\\) does not accept Zend_Soap_Server\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Adapter/Soap.php - - - - message: "#^Result of method SoapServer\\:\\:handle\\(\\) \\(void\\) is used\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Adapter/Soap.php - - - - message: "#^Return type \\(Varien_Object\\) of method Mage_Api_Model_Server_Adapter_Soap\\:\\:getController\\(\\) should be compatible with return type \\(Mage_Api_Controller_Action\\) of method Mage_Api_Model_Server_Adapter_Interface\\:\\:getController\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Adapter/Soap.php - - - - message: "#^Access to an undefined property object\\:\\:\\$model\\.$#" - count: 2 - path: ../app/code/core/Mage/Api/Model/Server/Handler/Abstract.php - - - - message: "#^Method Mage_Api_Model_Session\\:\\:isSessionExpired\\(\\) invoked with 0 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Handler/Abstract.php - - - - message: "#^Result of method SoapServer\\:\\:handle\\(\\) \\(void\\) is used\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php - - - - message: "#^Return type \\(Mage_Api_Model_Wsdl_Config\\) of method Mage_Api_Model_Server_V2_Adapter_Soap\\:\\:_getWsdlConfig\\(\\) should be compatible with return type \\(Varien_Object\\) of method Mage_Api_Model_Server_Adapter_Soap\\:\\:_getWsdlConfig\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php - - - - message: "#^Result of method SoapServer\\:\\:handle\\(\\) \\(void\\) is used\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php - - - - message: "#^Return type \\(Mage_Api_Model_Wsdl_Config\\) of method Mage_Api_Model_Server_Wsi_Adapter_Soap\\:\\:_getWsdlConfig\\(\\) should be compatible with return type \\(Varien_Object\\) of method Mage_Api_Model_Server_Adapter_Soap\\:\\:_getWsdlConfig\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php - - - - message: "#^Parameter \\#1 \\$request \\(stdClass\\) of method Mage_Api_Model_Server_Wsi_Handler\\:\\:endSession\\(\\) should be compatible with parameter \\$sessionId \\(string\\) of method Mage_Api_Model_Server_Handler_Abstract\\:\\:endSession\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Wsi/Handler.php - - - - message: "#^Return type \\(stdClass\\) of method Mage_Api_Model_Server_Wsi_Handler\\:\\:endSession\\(\\) should be compatible with return type \\(true\\) of method Mage_Api_Model_Server_Handler_Abstract\\:\\:endSession\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Wsi/Handler.php - - - - message: "#^Return type \\(stdClass\\) of method Mage_Api_Model_Server_Wsi_Handler\\:\\:login\\(\\) should be compatible with return type \\(string\\) of method Mage_Api_Model_Server_Handler_Abstract\\:\\:login\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Server/Wsi/Handler.php - - - - message: "#^Return type \\(bool\\) of method Mage_Api_Model_Session\\:\\:clear\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Model_Session_Abstract_Varien\\)\\) of method Mage_Core_Model_Session_Abstract_Varien\\:\\:clear\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Session.php - - - - message: "#^Return type \\(void\\) of method Mage_Api_Model_Session\\:\\:revalidateCookie\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Model_Session_Abstract_Varien\\)\\) of method Mage_Core_Model_Session_Abstract_Varien\\:\\:revalidateCookie\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Session.php - - - - message: "#^Invalid array key type array\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Wsdl/Config.php - - - - message: "#^Call to an undefined method SimpleXMLElement\\:\\:extendChild\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Wsdl/Config/Element.php - - - - message: "#^Return type \\(array\\) of method Mage_Api_Model_Wsdl_Config_Element\\:\\:getChildren\\(\\) should be compatible with return type \\(RecursiveIterator\\|null\\) of method RecursiveIterator\\\\:\\:getChildren\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api/Model/Wsdl/Config/Element.php - - - - message: "#^Return type \\(void\\) of method Mage_Api2_Block_Adminhtml_Attribute_Grid\\:\\:_prepareCollection\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Block_Widget_Grid\\)\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:_prepareCollection\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php - - - - message: "#^Property Mage_Api2_Block_Adminhtml_Attribute_Tab_Resource\\:\\:\\$_treeModel \\(Mage_Api2_Model_Acl_Global_Rule_Tree\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Tab/Resource.php - - - - message: "#^Call to an undefined method Varien_Data_Collection\\:\\:addFieldToFilter\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Api2/Block/Adminhtml/Permissions/User/Edit/Tab/Roles.php - - - - message: "#^Property Mage_Api2_Block_Adminhtml_Roles_Tab_Resources\\:\\:\\$_treeModel \\(Mage_Api2_Model_Acl_Global_Rule_Tree\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tab/Resources.php - - - - message: "#^Cannot access offset 'order' on int\\.$#" - count: 4 - path: ../app/code/core/Mage/Api2/Helper/Data.php - - - - message: "#^Variable \\$adapters might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Helper/Data.php - - - - message: "#^Parameter \\#1 \\$roleId \\(int\\) of method Mage_Api2_Model_Acl\\:\\:addRole\\(\\) should be compatible with parameter \\$role \\(string\\|Zend_Acl_Role_Interface\\) of method Zend_Acl\\:\\:addRole\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Acl.php - - - - message: "#^Method Mage_Api2_Model_Acl_Global_Rule_ResourcePermission\\:\\:setFilterValue\\(\\) should return Mage_Api2_Model_Acl_PermissionInterface but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php - - - - message: "#^Variable \\$operationName might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php - - - - message: "#^Method Mage_Api2_Model_Config\\:\\:getResourceGroup\\(\\) should return bool\\|Mage_Core_Model_Config_Element but returns Varien_Simplexml_Element\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Config.php - - - - message: "#^Call to an undefined method Mage_Api2_Model_Config\\:\\:getMainRoute\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Multicall.php - - - - message: "#^Property Mage_Api2_Model_Request\\:\\:\\$_interpreter \\(Mage_Api2_Model_Request_Interpreter_Interface\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Request.php - - - - message: "#^Call to an undefined method Mage_Api2_Model_Resource\\:\\:_multiDelete\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource.php - - - - message: "#^Method Mage_Api2_Model_Resource\\:\\:_create\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource.php - - - - message: "#^Method Mage_Api2_Model_Resource\\:\\:_getSubModel\\(\\) should return \\$this\\(Mage_Api2_Model_Resource\\) but returns Mage_Api2_Model_Resource\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource.php - - - - message: "#^Method Mage_Api2_Model_Resource\\:\\:_multiCreate\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource.php - - - - message: "#^Method Mage_Api2_Model_Resource\\:\\:_multiUpdate\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource.php - - - - message: "#^Method Mage_Api2_Model_Resource\\:\\:_update\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource/Validator/Eav.php - - - - message: "#^Property Mage_Api2_Model_Resource_Validator_Eav\\:\\:\\$_eavForm \\(Mage_Eav_Model_Form\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource/Validator/Eav.php - - - - message: "#^Call to an undefined method Zend_Validate_Interface\\:\\:setMessage\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Resource/Validator/Fields.php - - - - message: "#^Method Mage_Api2_Model_Response\\:\\:setMimeType\\(\\) should return \\$this\\(Mage_Api2_Model_Response\\) but returns Zend_Controller_Response_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Response.php - - - - message: "#^Parameter \\#1 \\$request \\(Mage_Api2_Model_Request\\) of method Mage_Api2_Model_Route_Abstract\\:\\:match\\(\\) should be compatible with parameter \\$path \\(string\\) of method Zend_Controller_Router_Route\\:\\:match\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Route/Abstract.php - - - - message: "#^Constructor of class Mage_Api2_Model_Route_ApiType has an unused parameter \\$defaults\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - - message: "#^Constructor of class Mage_Api2_Model_Route_ApiType has an unused parameter \\$locale\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - - message: "#^Constructor of class Mage_Api2_Model_Route_ApiType has an unused parameter \\$reqs\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - - message: "#^Constructor of class Mage_Api2_Model_Route_ApiType has an unused parameter \\$route\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - - message: "#^Constructor of class Mage_Api2_Model_Route_ApiType has an unused parameter \\$translator\\.$#" - count: 1 - path: ../app/code/core/Mage/Api2/Model/Route/ApiType.php - - - - message: "#^Call to an undefined method Varien_Object\\:\\:decrypt\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - - - message: "#^Call to an undefined method Varien_Object\\:\\:encrypt\\(\\)\\.$#" - 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 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - - - message: "#^Return type \\(bool\\) of method Mage_Authorizenet_Model_Directpost\\:\\:validate\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Cc\\)\\) of method Mage_Payment_Model_Method_Cc\\:\\:validate\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - - - message: "#^Return type \\(void\\) of method Mage_Authorizenet_Model_Directpost\\:\\:authorize\\(\\) should be compatible with return type \\(\\$this\\(Mage_Paygate_Model_Authorizenet\\)\\) of method Mage_Paygate_Model_Authorizenet\\:\\:authorize\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:generateRequestFromOrder\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:generateRequestFromOrder\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php - - - - message: "#^Method Mage_Authorizenet_Directpost_PaymentController\\:\\:_getIframeBlock\\(\\) should return Mage_Authorizenet_Block_Directpost_Iframe but returns Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php - - - - message: "#^Variable \\$params might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php - - - - message: "#^Method Mage_Backup_Helper_Data\\:\\:getCreateSuccessMessageByType\\(\\) should return string but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Backup/Helper/Data.php - - - - message: "#^Property Mage_Backup_Model_Backup\\:\\:\\$_handler \\(resource\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Backup/Model/Backup.php - - - - message: "#^Variable \\$filePath might not be defined\\.$#" - count: 4 - path: ../app/code/core/Mage/Backup/Model/Backup.php - - - - message: "#^Call to an undefined method Mage_Backup_Interface\\:\\:setRootDir\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Backup/Model/Observer.php - - - - message: "#^Property Mage_Backup_Model_Resource_Db\\:\\:\\$_write \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Backup/Model/Resource/Db.php - - - - message: "#^Parameter \\#1 \\$elementId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Checkbox\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$elementId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php - - - - message: "#^Parameter \\#2 \\$containerId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Checkbox\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$containerId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php - - - - message: "#^Parameter \\#1 \\$elementId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Multi\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$elementId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php - - - - message: "#^Parameter \\#2 \\$containerId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Multi\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$containerId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php - - - - message: "#^Parameter \\#1 \\$elementId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Radio\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$elementId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php - - - - message: "#^Parameter \\#2 \\$containerId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Radio\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$containerId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php - - - - message: "#^Parameter \\#1 \\$elementId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Select\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$elementId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php - - - - message: "#^Parameter \\#2 \\$containerId \\(string\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Composite_Fieldset_Options_Type_Select\\:\\:setValidationContainer\\(\\) should be compatible with parameter \\$containerId \\(int\\) of method Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option\\:\\:setValidationContainer\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php - - - - message: "#^Method Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Bundle_Option_Selection\\:\\:isUsedWebsitePrice\\(\\) should return string but returns bool\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php - - - - message: "#^Return type \\(void\\) of method Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tabs\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php - - - - message: "#^Variable \\$_items might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Type_Price\\:\\:getIsPricesCalculatedByIndex\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Type_Price\\:\\:getSelectionPreFinalPrice\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php - - - - message: "#^Variable \\$_items might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Configuration_Item_Interface\\:\\:getQty\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Type_Price\\:\\:getSelectionFinalTotalPrice\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php - - - - message: "#^Call to an undefined method Mage_Bundle_Model_CatalogIndex_Data_Bundle\\:\\:_addAttributeFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/CatalogIndex/Data/Bundle.php - - - - message: "#^Call to an undefined method Mage_Bundle_Model_CatalogIndex_Data_Bundle\\:\\:_getLinkSelect\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/CatalogIndex/Data/Bundle.php - - - - message: "#^PHPDoc type bool of property Mage_Bundle_Model_CatalogIndex_Data_Bundle\\:\\:\\$_haveChildren is not covariant with PHPDoc type array\\ of overridden property Mage_CatalogIndex_Model_Data_Simple\\:\\:\\$_haveChildren\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/CatalogIndex/Data/Bundle.php - - - - message: "#^Property Mage_Bundle_Model_CatalogIndex_Data_Bundle\\:\\:\\$_haveChildren \\(bool\\) does not accept default value of type array\\\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/CatalogIndex/Data/Bundle.php - - - - message: "#^Call to an undefined method Mage_Bundle_Model_Resource_Price_Index\\:\\:reindexProduct\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Price/Index.php - - - - message: "#^Call to an undefined method Mage_Bundle_Model_Product_Price\\:\\:getPricesTierPrice\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Bundle/Model/Product/Price.php - - - - message: "#^Method Mage_Bundle_Model_Product_Price\\:\\:getOptions\\(\\) should return Mage_Bundle_Model_Resource_Option_Collection but returns array\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Price.php - - - - message: "#^Method Mage_Bundle_Model_Product_Price\\:\\:getPrice\\(\\) should return string but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Price.php - - - - message: "#^Offset 'option_id' does not exist on array\\{final_price\\: mixed\\}\\.$#" - count: 4 - path: ../app/code/core/Mage/Bundle/Model/Product/Price.php - - - - message: "#^Return type \\(string\\) of method Mage_Bundle_Model_Product_Price\\:\\:getPrice\\(\\) should be compatible with return type \\(float\\) of method Mage_Catalog_Model_Product_Type_Price\\:\\:getPrice\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Price.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Type_Price\\:\\:getSelectionFinalTotalPrice\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - - - message: "#^Parameter \\#1 \\$product \\(Mage_Catalog_Model_Product\\) of method Mage_Bundle_Model_Product_Type\\:\\:getForceChildItemQtyChanges\\(\\) should be compatible with parameter \\$product \\(null\\) of method Mage_Catalog_Model_Product_Type_Abstract\\:\\:getForceChildItemQtyChanges\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - - - message: "#^Parameter \\#2 \\$product \\(Mage_Catalog_Model_Product\\) of method Mage_Bundle_Model_Product_Type\\:\\:prepareQuoteItemQty\\(\\) should be compatible with parameter \\$product \\(null\\) of method Mage_Catalog_Model_Product_Type_Abstract\\:\\:prepareQuoteItemQty\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - - - message: "#^Parameter \\#4 \\$product \\(Mage_Catalog_Model_Product\\) of method Mage_Bundle_Model_Product_Type\\:\\:updateQtyOption\\(\\) should be compatible with parameter \\$product \\(null\\) of method Mage_Catalog_Model_Product_Type_Abstract\\:\\:updateQtyOption\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - - - message: "#^Return type \\(int\\) of method Mage_Bundle_Model_Product_Type\\:\\:prepareQuoteItemQty\\(\\) should be compatible with return type \\(float\\) of method Mage_Catalog_Model_Product_Type_Abstract\\:\\:prepareQuoteItemQty\\(\\)$#" - 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 - path: ../app/code/core/Mage/Bundle/Model/Product/Type.php - - - - message: "#^Property Mage_Bundle_Model_Resource_Option_Collection\\:\\:\\$_itemIds \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php - - - - message: "#^Variable \\$basePrice might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Bundle/Model/Resource/Price/Index.php - - - - message: "#^Variable \\$customOptions might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Resource/Price/Index.php - - - - message: "#^Variable \\$priceCond might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Resource/Price/Index.php - - - - message: "#^Variable \\$priceTypeCond might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Resource/Price/Index.php - - - - message: "#^Variable \\$valueIdCond might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Resource/Price/Index.php - - - - message: "#^Method Mage_Bundle_Model_Resource_Selection_Collection\\:\\:_initSelect\\(\\) should return \\$this\\(Mage_Bundle_Model_Resource_Selection_Collection\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php - - - - message: "#^Variable \\$_items might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php - - - - message: "#^Call to an undefined method Mage_Captcha_Model_Interface\\:\\:isRequired\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Captcha/Block/Captcha/Zend.php - - - - message: "#^Call to an undefined method Mage_Captcha_Model_Interface\\:\\:isRequired\\(\\)\\.$#" - count: 9 - path: ../app/code/core/Mage/Captcha/Model/Observer.php - - - - message: "#^Call to an undefined method Mage_Captcha_Model_Interface\\:\\:logAttempt\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/Captcha/Model/Observer.php - - - - message: "#^Result of method Mage_Captcha_Model_Interface\\:\\:isCorrect\\(\\) \\(void\\) is used\\.$#" - count: 9 - path: ../app/code/core/Mage/Captcha/Model/Observer.php - - - - message: "#^Property Zend_Captcha_Word\\:\\:\\$_word \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Captcha/Model/Zend.php - - - - message: "#^Return type \\(Mage_Customer_Model_Session\\) of method Mage_Captcha_Model_Zend\\:\\:getSession\\(\\) should be compatible with return type \\(Zend_Session_Namespace\\) of method Zend_Captcha_Word\\:\\:getSession\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Captcha/Model/Zend.php - - - - message: "#^Call to an undefined method Mage_Captcha_Model_Interface\\:\\:getImgSrc\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php - - - - message: "#^Call to an undefined method Mage_Captcha_Model_Interface\\:\\:getImgSrc\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Captcha/controllers/RefreshController.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Breadcrumbs.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Navigation.php - - - - message: "#^Cannot call method count\\(\\) on string\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Block/Navigation.php - - - - message: "#^Property Mage_Catalog_Block_Navigation\\:\\:\\$_currentCategoryKey \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Navigation.php - - - - message: "#^Variable \\$htmlChildren in empty\\(\\) always exists and is always falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Navigation.php - - - - message: "#^Variable \\$productId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product.php - - - - message: "#^Property Mage_Catalog_Block_Product_Abstract\\:\\:\\$_reviewsHelperBlock \\(Mage_Review_Block_Helper\\|null\\) does not accept Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/Abstract.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Compare_Item_Collection\\:\\:useProductItem\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/Compare/List.php - - - - message: "#^Method Mage_Catalog_Block_Product_List\\:\\:_getProductCollection\\(\\) should return Mage_Catalog_Model_Resource_Product_Collection but returns Mage_Eav_Model_Entity_Collection_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/List.php - - - - message: "#^Property Mage_Catalog_Block_Product_List_Crosssell\\:\\:\\$_itemCollection \\(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Link_Product_Collection\\) does not accept Mage_Catalog_Model_Resource_Product_Link_Product_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php - - - - message: "#^Method Mage_Catalog_Block_Product_List_Toolbar\\:\\:getDefaultPerPageValue\\(\\) should return string but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php - - - - message: "#^Property Mage_Catalog_Block_Product_List_Toolbar\\:\\:\\$_availableMode \\(string\\) does not accept array\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php - - - - message: "#^Property Mage_Catalog_Block_Product_List_Toolbar\\:\\:\\$_availableMode \\(string\\) does not accept array\\\\.$#" - count: 4 - path: ../app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php - - - - message: "#^Property Mage_Catalog_Block_Product_List_Toolbar\\:\\:\\$_availableMode \\(string\\) does not accept default value of type array\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php - - - - message: "#^Property Mage_Catalog_Block_Product_List_Toolbar\\:\\:\\$_collection \\(Mage_Core_Model_Resource_Db_Collection_Abstract\\) does not accept Varien_Data_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php - - - - message: "#^Property Mage_Catalog_Block_Product_New\\:\\:\\$_productsCount \\(null\\) does not accept int\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Block/Product/New.php - - - - message: "#^Method Mage_Catalog_Block_Product_View_Options_Type_Date\\:\\:_getValueWithLeadingZeros\\(\\) should return string but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php - - - - message: "#^Invalid array key type array\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php - - - - message: "#^Method Mage_Catalog_Block_Product_View_Type_Configurable\\:\\:_getHelper\\(\\) should return Mage_Catalog_Helper_Product_Type_Composite but returns Mage_Core_Helper_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php - - - - message: "#^Property Mage_Catalog_Block_Product_Widget_Html_Pager\\:\\:\\$_lastPage \\(int\\) does not accept float\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php - - - - message: "#^Variable \\$finish might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php - - - - message: "#^Variable \\$start might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/Widget/Html/Pager.php - - - - message: "#^Property Mage_Catalog_Block_Product_Widget_New\\:\\:\\$_pager \\(Mage_Catalog_Block_Product_Widget_Html_Pager\\) does not accept Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Product/Widget/New.php - - - - message: "#^Parameter \\#1 \\$category \\(Mage_Catalog_Model_Category\\) of method Mage_Catalog_Block_Seo_Sitemap_Category\\:\\:getItemUrl\\(\\) should be compatible with parameter \\$item \\(Mage_Catalog_Block_Seo_Sitemap_Abstract\\) of method Mage_Catalog_Block_Seo_Sitemap_Abstract\\:\\:getItemUrl\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php - - - - message: "#^Parameter \\#1 \\$product \\(Mage_Catalog_Model_Product\\) of method Mage_Catalog_Block_Seo_Sitemap_Product\\:\\:getItemUrl\\(\\) should be compatible with parameter \\$item \\(Mage_Catalog_Block_Seo_Sitemap_Abstract\\) of method Mage_Catalog_Block_Seo_Sitemap_Abstract\\:\\:getItemUrl\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php - - - - message: "#^Variable \\$finish might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php - - - - message: "#^Variable \\$start might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php - - - - message: "#^Variable \\$store might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Block/Widget/Link.php - - - - message: "#^Property Mage_Catalog_Helper_Data\\:\\:\\$_categoryPath \\(string\\) does not accept array\\\\>\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Data.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_angle \\(int\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_imageFile \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_model \\(Mage_Catalog_Model_Product_Image\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_product \\(Mage_Catalog_Model_Product\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_watermark \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_watermarkImageOpacity \\(int\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_watermarkPosition \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Image\\:\\:\\$_watermarkSize \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Image.php - - - - message: "#^Property Mage_Catalog_Helper_Output\\:\\:\\$_templateProcessor \\(Varien_Filter_Template\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Output.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute_Frontend_Abstract\\:\\:getUrl\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/Catalog/Helper/Product.php - - - - message: "#^Method Mage_Catalog_Helper_Product\\:\\:getMinimalQty\\(\\) should return int\\|null but returns float\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Product.php - - - - message: "#^Property Mage_Catalog_Helper_Product_Compare\\:\\:\\$_itemCollection \\(Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Compare_Item_Collection\\) does not accept Mage_Catalog_Model_Resource_Product_Compare_Item_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Product/Compare.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Abstract\\:\\:loadSelf\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Product/Flat.php - - - - message: "#^Argument of an invalid type float supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Helper/Product/Type/Composite.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:setStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Abstract.php - - - - message: "#^Method Mage_Core_Model_Website\\:\\:getStoreIds\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Abstract.php - - - - message: "#^Return type \\(Mage_Catalog_Model_Resource_Collection_Abstract\\) of method Mage_Catalog_Model_Abstract\\:\\:getResourceCollection\\(\\) should be compatible with return type \\(Mage_Core_Model_Resource_Db_Collection_Abstract\\) of method Mage_Core_Model_Abstract\\:\\:getResourceCollection\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Abstract.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Api_Resource\\:\\:_checkAttributeAcl\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api/Resource.php - - - - message: "#^Variable \\$storeId might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Api/Resource.php - - - - message: "#^Argument of an invalid type float supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php - - - - message: "#^Return type \\(int\\) of method Mage_Catalog_Model_Api2_Product_Rest_Customer_V1\\:\\:_getCustomerGroupId\\(\\) should be compatible with return type \\(null\\) of method Mage_Catalog_Model_Api2_Product_Rest\\:\\:_getCustomerGroupId\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Customer/V1.php - - - - message: "#^Return type \\(int\\) of method Mage_Catalog_Model_Api2_Product_Rest_Guest_V1\\:\\:_getCustomerGroupId\\(\\) should be compatible with return type \\(null\\) of method Mage_Catalog_Model_Api2_Product_Rest\\:\\:_getCustomerGroupId\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Guest/V1.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Abstract\\:\\:toOptionArray\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\:\\:formatDate\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php - - - - message: "#^Call to an undefined method Varien_Object\\:\\:formatUrlKey\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Attribute/Backend/Urlkey/Abstract.php - - - - message: "#^Method Mage_Catalog_Model_Category\\:\\:getDefaultAttributeSetId\\(\\) should return int but returns string\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Category.php - - - - message: "#^Method Mage_Catalog_Model_Category\\:\\:getParentDesignCategory\\(\\) should return \\$this\\(Mage_Catalog_Model_Category\\) but returns Mage_Catalog_Model_Category\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Category.php - - - - message: "#^Cannot call method getRootCategoryId\\(\\) on int\\|string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Category/Api.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Category/Attribute/Api.php - - - - message: "#^Cannot access offset 'file' on bool\\|void\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php - - - - message: "#^Property Mage_Catalog_Model_Category_Url\\:\\:\\$_url \\(Mage_Core_Model_Url\\) does not accept bool\\|Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Category/Url.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Config\\:\\:_init\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Config.php - - - - message: "#^Method Mage_Catalog_Model_Config\\:\\:getAttributeSetId\\(\\) invoked with 1 parameter, 2 required\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Config.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Collection\\:\\:setStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - - - message: "#^Property Mage_Catalog_Model_Convert_Adapter_Product\\:\\:\\$_galleryBackendModel \\(Mage_Catalog_Model_Product_Attribute_Backend_Media\\) does not accept Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - - - message: "#^Property Mage_Catalog_Model_Convert_Adapter_Product\\:\\:\\$_productModel \\(Mage_Catalog_Model_Product\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - - - message: "#^Return type \\(Mage_Catalog_Model_Resource_Product_Collection\\) of method Mage_Catalog_Model_Convert_Adapter_Product\\:\\:_getCollectionForLoad\\(\\) should be compatible with return type \\(Mage_Eav_Model_Entity_Collection\\) of method Mage_Eav_Model_Convert_Adapter_Entity\\:\\:_getCollectionForLoad\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:setStore\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php - - - - message: "#^Method Mage_Catalog_Model_Category\\:\\:getParentDesignCategory\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Design.php - - - - message: "#^Method Mage_Catalog_Model_Design\\:\\:applyCustomDesign\\(\\) should return false\\|null but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Design.php - - - - message: "#^Variable \\$_category might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Design.php - - - - message: "#^Property Mage_Catalog_Model_Entity_Product_Attribute_Design_Options_Container\\:\\:\\$_configNodePath \\(Mage_Core_Model_Config_Element\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php - - - - message: "#^Method Mage_Catalog_Model_Factory\\:\\:getCategoryUrlInstance\\(\\) should return Mage_Catalog_Model_Category_Url but returns bool\\|Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Factory.php - - - - message: "#^Method Mage_Catalog_Model_Factory\\:\\:getCategoryUrlRewriteHelper\\(\\) should return Mage_Catalog_Helper_Category_Url_Rewrite_Interface but returns Mage_Core_Helper_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Factory.php - - - - message: "#^Method Mage_Catalog_Model_Factory\\:\\:getProductUrlInstance\\(\\) should return Mage_Catalog_Model_Product_Url but returns bool\\|Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Factory.php - - - - message: "#^Method Mage_Catalog_Model_Factory\\:\\:getProductUrlRewriteHelper\\(\\) should return Mage_Catalog_Helper_Product_Url_Rewrite_Interface but returns Mage_Core_Helper_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Factory.php - - - - message: "#^Comparison operation \"\\=\\=\" between Mage_Catalog_Model_Resource_Eav_Attribute and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php - - - - message: "#^Parameter \\#2 \\$filterBlock \\(Varien_Object\\) of method Mage_Catalog_Model_Layer_Filter_Attribute\\:\\:apply\\(\\) should be compatible with parameter \\$filterBlock \\(null\\) of method Mage_Catalog_Model_Layer_Filter_Abstract\\:\\:apply\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php - - - - message: "#^Argument of an invalid type int supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php - - - - message: "#^Parameter \\#2 \\$filterBlock \\(Mage_Catalog_Block_Layer_Filter_Decimal\\) of method Mage_Catalog_Model_Layer_Filter_Decimal\\:\\:apply\\(\\) should be compatible with parameter \\$filterBlock \\(null\\) of method Mage_Catalog_Model_Layer_Filter_Abstract\\:\\:apply\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php - - - - message: "#^Argument of an invalid type int\\\\|int\\<1, max\\> supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Category_Flat\\:\\:move\\(\\) invoked with 3 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Observer.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\:\\:addImage\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product.php - - - - message: "#^Method Mage_Catalog_Model_Product\\:\\:canBeShowInCategory\\(\\) should return bool but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product.php - - - - message: "#^Method Mage_Catalog_Model_Product\\:\\:duplicate\\(\\) should return \\$this\\(Mage_Catalog_Model_Product\\) but returns Mage_Catalog_Model_Product\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product.php - - - - message: "#^Method Mage_Catalog_Model_Product\\:\\:getDefaultAttributeSetId\\(\\) should return int but returns string\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product.php - - - - message: "#^Property Mage_Catalog_Model_Product\\:\\:\\$_stockItem \\(Mage_CatalogInventory_Model_Stock_Item\\) does not accept Varien_Object\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product.php - - - - message: "#^Property Mage_Catalog_Model_Product\\:\\:\\$_typeInstance \\(Mage_Catalog_Model_Product_Type_Abstract\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product.php - - - - message: "#^Cannot access property \\$additional_attributes on array\\.$#" - count: 5 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Cannot access property \\$categories on array\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Cannot access property \\$stock_data on array\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Cannot access property \\$tier_price on array\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Cannot access property \\$website_ids on array\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Cannot access property \\$websites on array\\.$#" - count: 3 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Parameter \\#3 \\$attributes \\(stdClass\\) of method Mage_Catalog_Model_Product_Api_V2\\:\\:info\\(\\) should be compatible with parameter \\$attributes \\(array\\) of method Mage_Catalog_Model_Product_Api\\:\\:info\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Api/V2.php - - - - message: "#^Cannot call method getBackend\\(\\) on bool\\|Mage_Catalog_Model_Resource_Attribute\\.$#" - count: 11 - path: ../app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php - - - - message: "#^Variable \\$file might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php - - - - message: "#^Parameter \\#1 \\$data \\(stdClass\\) of method Mage_Catalog_Model_Product_Attribute_Media_Api_V2\\:\\:_prepareImageData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Catalog_Model_Product_Attribute_Media_Api\\:\\:_prepareImageData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api/V2.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Compare_Item\\:\\:clean\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Compare/Item.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Resource_Product_Flat_Indexer\\:\\:prepareFlatTables\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php - - - - message: "#^Binary operation \"\\*\" between string and 1024 results in an error\\.$#" - count: 3 - path: ../app/code/core/Mage/Catalog/Model/Product/Image.php - - - - message: "#^Cannot call method isIndexable\\(\\) on Mage_Eav_Model_Entity_Attribute_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php - - - - message: "#^Parameter \\#5 \\$identifierType \\(null\\) of method Mage_Catalog_Model_Product_Link_Api_V2\\:\\:assign\\(\\) should be compatible with parameter \\$identifierType \\(string\\) of method Mage_Catalog_Model_Product_Link_Api\\:\\:assign\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php - - - - message: "#^Parameter \\#5 \\$identifierType \\(null\\) of method Mage_Catalog_Model_Product_Link_Api_V2\\:\\:update\\(\\) should be compatible with parameter \\$identifierType \\(string\\) of method Mage_Catalog_Model_Product_Link_Api\\:\\:update\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php - - - - message: "#^Method Mage_Catalog_Model_Product_Option\\:\\:getValuesCollection\\(\\) should return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Option_Value_Collection but returns Mage_Catalog_Model_Resource_Product_Option_Value_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Option.php - - - - message: "#^Method Mage_Catalog_Model_Product_Option\\:\\:groupFactory\\(\\) should return Mage_Catalog_Model_Product_Option_Type_Default but returns Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Option.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Configuration_Item_Option_Interface\\:\\:getId\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Configuration_Item_Option_Interface\\:\\:setValue\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php - - - - message: "#^Variable \\$value in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Collection_Abstract\\:\\:getStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Status.php - - - - message: "#^Method Mage_Catalog_Model_Product_Type\\:\\:priceFactory\\(\\) should return Mage_Catalog_Model_Product_Type_Price but returns Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Type.php - - - - message: "#^Method Mage_Catalog_Model_Product_Type_Abstract\\:\\:getAttributeById\\(\\) should return Mage_Eav_Model_Entity_Attribute_Abstract but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php - - - - message: "#^Method Mage_Catalog_Model_Product_Type_Configurable\\:\\:getProductByAttributes\\(\\) should return Mage_Catalog_Model_Product\\|null but returns Varien_Object\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php - - - - message: "#^Cannot access offset 'pricing_value' on true\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute_Abstract\\:\\:isScopeStore\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Abstract.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute_Abstract\\:\\:isScopeWebsite\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Abstract.php - - - - message: "#^Cannot call method isScopeStore\\(\\) on Mage_Eav_Model_Entity_Attribute_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Abstract.php - - - - message: "#^Cannot call method isScopeWebsite\\(\\) on Mage_Eav_Model_Entity_Attribute_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Abstract.php - - - - message: "#^Method Mage_Core_Model_Website\\:\\:getStoreIds\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Abstract.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Attribute\\:\\:isUsedBySuperProducts\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Attribute.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Category\\:\\:checkId\\(\\) should return bool but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Category\\:\\:getChildrenAmount\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Category\\:\\:getChildrenCount\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category.php - - - - message: "#^Property Mage_Catalog_Model_Resource_Category\\:\\:\\$_isActiveAttributeId \\(int\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category.php - - - - message: "#^Property Mage_Catalog_Model_Resource_Category\\:\\:\\$_tree \\(Varien_Data_Tree_Db\\) does not accept Varien_Data_Tree_Dbp\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category.php - - - - message: "#^Variable \\$ids in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Resource_Category_Collection\\:\\:addSortedField\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Category_Flat\\:\\:checkId\\(\\) should return bool but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php - - - - message: "#^Variable \\$options might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Abstract\\:\\:getMainStoreTable\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php - - - - message: "#^Variable \\$condition might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php - - - - message: "#^Variable \\$ids in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php - - - - message: "#^Call to an undefined method Zend_Db_Select\\:\\:insertFromSelect\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php - - - - message: "#^Variable \\$anchorProductsTable might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php - - - - message: "#^Variable \\$anchorTable might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php - - - - message: "#^Variable \\$enabledTable might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php - - - - message: "#^Call to an undefined method Zend_Db_Adapter_Abstract\\:\\:getCheckSql\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - - - - message: "#^Call to an undefined method Zend_Db_Adapter_Abstract\\:\\:getConcatSql\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - - - - message: "#^Call to an undefined method Zend_Db_Adapter_Abstract\\:\\:getLengthSql\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Category_Tree\\:\\:_getItemIsActive\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - - - - message: "#^Parameter \\#1 \\$category \\(Mage_Catalog_Model_Category\\) of method Mage_Catalog_Model_Resource_Category_Tree\\:\\:move\\(\\) should be compatible with parameter \\$node \\(Varien_Data_Tree_Node\\) of method Varien_Data_Tree_Dbp\\:\\:move\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - - - - message: "#^Property Mage_Catalog_Model_Resource_Category_Tree\\:\\:\\$_isActiveAttributeId \\(int\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php - - - - message: "#^Binary operation \"\\-\" between int and non\\-falsy\\-string results in an error\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php - - - - message: "#^Binary operation \"\\-\" between non\\-falsy\\-string and 1 results in an error\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Resource_Category\\:\\:refreshProductIndex\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product\\:\\:getIdBySku\\(\\) should return int\\|false but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Attribute_Backend_Media\\:\\:insertGallery\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php - - - - message: "#^Method Mage_Catalog_Model_Url\\:\\:refreshProductRewrites\\(\\) invoked with 3 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getAllTableColumns\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getAttributeForSelect\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getAttributeSortColumn\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getFlatTableName\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:setStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Collection\\:\\:_addUrlRewrite\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Collection\\:\\:getProductCountSelect\\(\\) should return Varien_Db_Select but returns Zend_Db_Select\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Property Mage_Catalog_Model_Resource_Product_Collection\\:\\:\\$_allIdsCache \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Property Mage_Catalog_Model_Resource_Product_Collection\\:\\:\\$_productCountSelect \\(Zend_Db_Select\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Property Mage_Catalog_Model_Resource_Product_Collection\\:\\:\\$_urlRewriteCategory \\(int\\) does not accept default value of type string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Variable \\$websiteId might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Compare_Item\\:\\:getCount\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Flat\\:\\:getTypeId\\(\\) should return int but returns string\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Flat.php - - - - message: "#^Comparison operation \"\\>\" between int\\<0, max\\> and Varien_Simplexml_Element\\|false results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php - - - - message: "#^Method Mage_Catalog_Model_Resource_Product_Indexer_Abstract\\:\\:_getAttribute\\(\\) should return Mage_Catalog_Model_Resource_Eav_Attribute but returns Mage_Eav_Model_Entity_Attribute_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Abstract.php - - - - message: "#^Binary operation \"\\*\" between string and 0\\.3 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php - - - - message: "#^Binary operation \"\\+\" between int\\<0, max\\> and string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Resource_Product_Indexer_Price_Interface\\:\\:getIsComposite\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php - - - - message: "#^Cannot call method setTypeId\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php - - - - message: "#^Variable \\$category might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Url.php - - - - message: "#^Variable \\$rootCategoryPath might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Catalog/Model/Resource/Url.php - - - - message: "#^Variable \\$rootCategoryPathLength might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Resource/Url.php - - - - message: "#^Property Mage_Catalog_Model_Url\\:\\:\\$_rewrite \\(Varien_Object\\) does not accept null\\.$#" - count: 2 - path: ../app/code/core/Mage/Catalog/Model/Url.php - - - - message: "#^Call to an undefined method Mage_CatalogIndex_Model_Resource_Attribute\\:\\:checkCount\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Attribute.php - - - - message: "#^Property Mage_CatalogIndex_Model_Data_Abstract\\:\\:\\$_typeInstance \\(Mage_Catalog_Model_Product_Type_Abstract\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php - - - - message: "#^Variable \\$idField might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php - - - - message: "#^Variable \\$whereField might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php - - - - message: "#^Parameter \\#1 \\$product \\(array\\) of method Mage_CatalogIndex_Model_Data_Grouped\\:\\:getFinalPrice\\(\\) should be compatible with parameter \\$product \\(int\\) of method Mage_CatalogIndex_Model_Data_Abstract\\:\\:getFinalPrice\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php - - - - message: "#^Return type \\(false\\) of method Mage_CatalogIndex_Model_Data_Grouped\\:\\:getFinalPrice\\(\\) should be compatible with return type \\(float\\) of method Mage_CatalogIndex_Model_Data_Abstract\\:\\:getFinalPrice\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Grouped.php - - - - message: "#^Property Mage_CatalogIndex_Model_Data_Simple\\:\\:\\$_haveChildren \\(array\\\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Simple.php - - - - message: "#^Property Mage_CatalogIndex_Model_Data_Virtual\\:\\:\\$_haveChildren \\(array\\\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Data/Virtual.php - - - - message: "#^Variable \\$kill in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Indexer.php - - - - message: "#^Variable \\$storeObject might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/CatalogIndex/Model/Indexer.php - - - - message: "#^Return type \\(string\\) of method Mage_CatalogIndex_Model_Indexer_Eav\\:\\:_getIndexableAttributeConditions\\(\\) should be compatible with return type \\(array\\) of method Mage_CatalogIndex_Model_Indexer_Abstract\\:\\:_getIndexableAttributeConditions\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Indexer/Eav.php - - - - message: "#^Return type \\(string\\) of method Mage_CatalogIndex_Model_Indexer_Price\\:\\:_getIndexableAttributeConditions\\(\\) should be compatible with return type \\(array\\) of method Mage_CatalogIndex_Model_Indexer_Abstract\\:\\:_getIndexableAttributeConditions\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Indexer/Price.php - - - - message: "#^Method Mage_CatalogIndex_Model_Resource_Indexer_Abstract\\:\\:saveIndex\\(\\) with return type void returns mixed but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php - - - - message: "#^Binary operation \"\\*\" between string and float results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Resource/Price.php - - - - message: "#^Method Mage_CatalogIndex_Model_Retreiver\\:\\:getRetreiver\\(\\) should return Mage_CatalogIndex_Model_Data_Abstract but returns Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogIndex/Model/Retreiver.php - - - - message: "#^Property Mage_CatalogInventory_Block_Adminhtml_Form_Field_Minsaleqty\\:\\:\\$_groupRenderer \\(Mage_CatalogInventory_Block_Adminhtml_Form_Field_Customergroup\\) does not accept Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php - - - - message: "#^Method Mage_CatalogInventory_Model_Observer\\:\\:_getQuoteItemQtyForCheck\\(\\) should return int but returns float\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Observer.php - - - - message: "#^Binary operation \"\\*\" between string and 0\\.3 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php - - - - message: "#^Binary operation \"\\+\" between int\\<0, max\\> and string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php - - - - message: "#^Cannot call method setTypeId\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php - - - - message: "#^Property Mage_CatalogInventory_Model_Resource_Stock\\:\\:\\$_isConfigBackorders \\(bool\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php - - - - message: "#^Property Mage_CatalogInventory_Model_Resource_Stock\\:\\:\\$_isConfigManageStock \\(bool\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php - - - - message: "#^Return type \\(Varien_Db_Select\\) of method Mage_CatalogInventory_Model_Resource_Stock_Item_Collection\\:\\:_initSelect\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Model_Resource_Db_Collection_Abstract\\)\\) of method Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:_initSelect\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php - - - - message: "#^Property Mage_CatalogInventory_Model_Stock_Item\\:\\:\\$_productInstance \\(Mage_Catalog_Model_Product\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Stock/Item.php - - - - message: "#^Variable \\$parentItem in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogInventory/Model/Stock/Item.php - - - - message: "#^Return type \\(int\\) of method Mage_CatalogRule_Model_Action_Index_Refresh_Row\\:\\:_getProduct\\(\\) should be compatible with return type \\(null\\) of method Mage_CatalogRule_Model_Action_Index_Refresh\\:\\:_getProduct\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogRule/Model/Action/Index/Refresh/Row.php - - - - message: "#^Variable \\$gId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogRule/Model/Observer.php - - - - message: "#^Variable \\$pId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogRule/Model/Observer.php - - - - message: "#^Variable \\$wId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogRule/Model/Observer.php - - - - message: "#^Variable \\$indexAlias might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price.php - - - - message: "#^Call to an undefined method Mage_Rule_Model_Condition_Combine\\:\\:collectValidatedAttributes\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogRule/Model/Rule.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php - - - - message: "#^Property Mage_CatalogSearch_Block_Result\\:\\:\\$_productCollection \\(Mage_CatalogSearch_Model_Resource_Fulltext_Collection\\) does not accept Mage_Eav_Model_Entity_Collection_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Block/Result.php - - - - message: "#^Variable \\$temp might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Block/Term.php - - - - message: "#^Variable \\$termKeys might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/CatalogSearch/Block/Term.php - - - - message: "#^Method Mage_CatalogSearch_Model_Advanced\\:\\:getProductCollection\\(\\) should return Mage_CatalogSearch_Model_Resource_Advanced_Collection but returns array\\|float\\|int\\|string\\|false\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Model/Advanced.php - - - - message: "#^Return type \\(bool\\) of method Mage_CatalogSearch_Model_Layer_Filter_Attribute\\:\\:_getIsFilterableAttribute\\(\\) should be compatible with return type \\(Mage_Catalog_Model_Resource_Eav_Attribute\\) of method Mage_Catalog_Model_Layer_Filter_Attribute\\:\\:_getIsFilterableAttribute\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Model/Layer/Filter/Attribute.php - - - - message: "#^Variable \\$select might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Model/Resource/Advanced/Collection.php - - - - message: "#^Property Mage_CatalogSearch_Model_Resource_Fulltext_Collection\\:\\:\\$_relevanceSortOrder \\(null\\) does not accept default value of type int\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php - - - - message: "#^Property Mage_CatalogSearch_Model_Resource_Fulltext_Collection\\:\\:\\$_relevanceSortOrder \\(null\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php - - - - message: "#^Cannot call method setItem\\(\\) on array\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Block/Cart/Abstract.php - - - - message: "#^Variable \\$ninProductIds in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Block/Cart/Crosssell.php - - - - message: "#^Property Mage_Checkout_Block_Cart_Shipping\\:\\:\\$_address \\(array\\) does not accept Mage_Sales_Model_Quote_Address\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Block/Cart/Shipping.php - - - - message: "#^Property Mage_Checkout_Block_Onepage_Billing\\:\\:\\$_taxvat \\(Mage_Customer_Block_Widget_Taxvat\\) does not accept Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Block/Onepage/Billing.php - - - - message: "#^Method Mage_Checkout_Block_Onepage_Progress\\:\\:getShippingPriceInclTax\\(\\) should return float but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Block/Onepage/Progress.php - - - - message: "#^Variable \\$storeId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Api/Resource.php - - - - message: "#^Method Mage_Checkout_Model_Cart\\:\\:saveQuote\\(\\) should return Mage_Checkout_Model_Cart_Interface but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart.php - - - - message: "#^Variable \\$product might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart.php - - - - message: "#^Variable \\$productId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart.php - - - - message: "#^Variable \\$order might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Api.php - - - - message: "#^Variable \\$quote might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Api.php - - - - message: "#^Variable \\$customer might not be defined\\.$#" - count: 4 - path: ../app/code/core/Mage/Checkout/Model/Cart/Customer/Api.php - - - - message: "#^Parameter \\#1 \\$data \\(object\\) of method Mage_Checkout_Model_Cart_Customer_Api_V2\\:\\:_prepareCustomerAddressData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Checkout_Model_Cart_Customer_Api\\:\\:_prepareCustomerAddressData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Customer/Api/V2.php - - - - message: "#^Parameter \\#1 \\$data \\(object\\) of method Mage_Checkout_Model_Cart_Customer_Api_V2\\:\\:_prepareCustomerData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Checkout_Model_Cart_Customer_Api\\:\\:_prepareCustomerData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Customer/Api/V2.php - - - - message: "#^Parameter \\#1 \\$data \\(object\\) of method Mage_Checkout_Model_Cart_Payment_Api_V2\\:\\:_preparePaymentData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Checkout_Model_Cart_Payment_Api\\:\\:_preparePaymentData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Payment/Api/V2.php - - - - message: "#^Method Mage_Checkout_Model_Cart_Product_Api_V2\\:\\:_prepareProductsData\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Product/Api/V2.php - - - - message: "#^Variable \\$ratesResult might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Cart/Shipping/Api.php - - - - message: "#^Method Mage_Checkout_Model_Session\\:\\:getQuoteId\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Observer.php - - - - message: "#^Method Mage_Checkout_Model_Session\\:\\:unsetAll\\(\\) should return \\$this\\(Mage_Checkout_Model_Session\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Session.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Order\\:\\:createFromQuoteAddress\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Type/Abstract.php - - - - message: "#^Method Mage_Sales_Model_Quote\\:\\:getBillingAddress\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Type/Multishipping.php - - - - message: "#^Variable \\$paymentMethod in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/Model/Type/Multishipping.php - - - - message: "#^Variable \\$customerRequest might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Checkout/Model/Type/Onepage.php - - - - message: "#^Comparison operation \"\\=\\=\" between 0\\|0\\.0\\|array\\|string\\|false\\|null and 0 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/controllers/CartController.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Service_Order\\:\\:register\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Checkout/controllers/OnepageController.php - - - - message: "#^Cannot access offset 'cookie' on void\\|true\\.$#" - count: 1 - path: ../app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php - - - - message: "#^Method Mage_Cms_Model_Wysiwyg_Images_Storage\\:\\:getConfig\\(\\) should return Mage_Core_Model_Config_Element but returns Varien_Simplexml_Element\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php - - - - message: "#^Property Mage_Cms_Model_Wysiwyg_Images_Storage\\:\\:\\$_config \\(Mage_Core_Model_Config_Element\\) does not accept Varien_Simplexml_Element\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 2 parameters, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php - - - - message: "#^Variable \\$mediaGalleryImages in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/ConfigurableSwatches/Helper/Productimg.php - - - - message: "#^Method Mage_ConfigurableSwatches_Helper_Productlist\\:\\:getSwatchAttribute\\(\\) should return Mage_Eav_Model_Attribute but returns Mage_Catalog_Model_Product_Type_Configurable_Attribute\\.$#" - count: 1 - path: ../app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php - - - - message: "#^Property Mage_ConfigurableSwatches_Helper_Productlist\\:\\:\\$_swatchAttribute \\(Mage_Catalog_Model_Product_Type_Configurable_Attribute\\) does not accept Mage_Eav_Model_Entity_Attribute_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php - - - - message: "#^Property Mage_ConfigurableSwatches_Helper_Productlist\\:\\:\\$_swatchAttributeFilteredValue \\(int\\) does not accept false\\.$#" - count: 1 - path: ../app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php - - - - message: "#^Variable \\$query might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/ConfigurableSwatches/Model/Resource/Catalog/Product/Type/Configurable/Product/Collection.php - - - - message: "#^Method Mage_Core_Block_Abstract\\:\\:_getUrlModel\\(\\) should return Mage_Core_Model_Url but returns Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Block/Abstract.php - - - - message: "#^Method Mage_Core_Block_Abstract\\:\\:getHelper\\(\\) should return \\$this\\(Mage_Core_Block_Abstract\\) but returns Mage_Core_Block_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Block/Abstract.php - - - - message: "#^Method Mage_Core_Block_Abstract\\:\\:getParentBlock\\(\\) should return \\$this\\(Mage_Core_Block_Abstract\\) but returns Mage_Core_Block_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Block/Abstract.php - - - - message: "#^Return type \\(void\\) of method Mage_Core_Block_Template_Zend\\:\\:setScriptPath\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Template\\)\\) of method Mage_Core_Block_Template\\:\\:setScriptPath\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Block/Template/Zend.php - - - - message: "#^Call to an undefined method Zend_Controller_Router_Interface\\:\\:addRoute\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Front/Router.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:is\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Action.php - - - - message: "#^Constructor of class Mage_Core_Controller_Varien_Action has an unused parameter \\$invokeArgs\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Action.php - - - - message: "#^Property Mage_Core_Controller_Varien_Action\\:\\:\\$_request \\(Mage_Core_Controller_Request_Http\\) does not accept Zend_Controller_Request_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Action.php - - - - message: "#^Property Mage_Core_Controller_Varien_Action\\:\\:\\$_response \\(Mage_Core_Controller_Response_Http\\) does not accept Zend_Controller_Response_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Action.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Front.php - - - - message: "#^Method Mage_Core_Controller_Varien_Front\\:\\:_getRequestRewriteController\\(\\) should return Mage_Core_Model_Url_Rewrite_Request but returns bool\\|Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Front.php - - - - message: "#^Parameter \\#2 \\$useRouterName \\(bool\\) of method Mage_Core_Controller_Varien_Router_Admin\\:\\:collectRoutes\\(\\) should be compatible with parameter \\$useRouterName \\(string\\) of method Mage_Core_Controller_Varien_Router_Standard\\:\\:collectRoutes\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Router/Admin.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php - - - - message: "#^Variable \\$action might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php - - - - message: "#^Variable \\$controller might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php - - - - message: "#^Variable \\$controllerInstance might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php - - - - message: "#^Variable \\$realModule might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Controller/Varien/Router/Standard.php - - - - message: "#^Method Mage_Core_Helper_Abstract\\:\\:_getRequest\\(\\) should return Mage_Core_Controller_Request_Http but returns Zend_Controller_Request_Http\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Helper/Abstract.php - - - - message: "#^Property Mage_Core_Helper_String\\:\\:\\$_arrayHelper \\(Mage_Core_Helper_Array\\) does not accept Mage_Core_Helper_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Helper/String.php - - - - message: "#^Property Mage_Core_Model_Abstract\\:\\:\\$_cacheTag \\(string\\|true\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Abstract.php - - - - message: "#^Method Mage_Core_Model_App\\:\\:getDefaultStoreView\\(\\) should return Mage_Core_Model_Store but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/App.php - - - - message: "#^Method Mage_Core_Model_App\\:\\:getResponse\\(\\) should return Mage_Core_Controller_Response_Http but returns Zend_Controller_Response_Http\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/App.php - - - - message: "#^Property Mage_Core_Model_App\\:\\:\\$_useSessionInUrl \\(bool\\) does not accept string\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/App.php - - - - message: "#^Property Mage_Core_Model_App\\:\\:\\$_website \\(Mage_Core_Model_Website\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/App.php - - - - message: "#^Variable \\$id in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/App.php - - - - message: "#^Method Mage_Core_Model_Cache\\:\\:getDbAdapter\\(\\) should return Zend_Db_Adapter_Abstract but returns Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Cache.php - - - - message: "#^Property Mage_Core_Model_Cache\\:\\:\\$_frontend \\(Varien_Cache_Core\\) does not accept Zend_Cache_Core\\|Zend_Cache_Frontend\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Cache.php - - - - message: "#^Call to an undefined method SimpleXMLElement\\:\\:getClassName\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:getClassName\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:is\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Method Mage_Core_Model_Config\\:\\:cleanCache\\(\\) should return \\$this\\(Mage_Core_Model_Config\\) but returns Mage_Core_Model_Config\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Method Mage_Core_Model_Config\\:\\:getNodeClassInstance\\(\\) should return bool but returns object\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Return type \\(Mage_Core_Model_App\\) of method Mage_Core_Model_Config\\:\\:_saveCache\\(\\) should be compatible with return type \\(bool\\) of method Varien_Simplexml_Config\\:\\:_saveCache\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Return type \\(Zend_Cache_Core\\) of method Mage_Core_Model_Config\\:\\:getCache\\(\\) should be compatible with return type \\(Varien_Simplexml_Config_Cache_Abstract\\) of method Varien_Simplexml_Config\\:\\:getCache\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Return type \\(string\\) of method Mage_Core_Model_Config\\:\\:_loadCache\\(\\) should be compatible with return type \\(bool\\) of method Varien_Simplexml_Config\\:\\:_loadCache\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Variable \\$key might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Config.php - - - - message: "#^Method Mage_Core_Model_Cookie\\:\\:getHttponly\\(\\) should return bool but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Cookie.php - - - - message: "#^Binary operation \"\\+\" between string and string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Date.php - - - - message: "#^Binary operation \"\\-\" between string and string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Date.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Design\\:\\:validate\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Design.php - - - - message: "#^Property Varien_Simplexml_Config\\:\\:\\$_cacheChecksum \\(unknown_type\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Design/Config.php - - - - message: "#^Binary operation \"\\.\" between non\\-falsy\\-string and array results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Design/Package.php - - - - message: "#^Cannot assign offset 'layout'\\|'locale'\\|'skin'\\|'template' to string\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Design/Package.php - - - - message: "#^Cannot assign offset string to string\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Design/Package.php - - - - message: "#^Method Zend_Mail\\:\\:addBcc\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Email/Queue.php - - - - message: "#^Method Mage_Core_Model_Email_Template\\:\\:getProcessedTemplate\\(\\) invoked with 2 parameters, 0\\-1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Email/Template.php - - - - message: "#^Method Mage_Core_Model_Email_Template_Abstract\\:\\:loadByConfigPath\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Email/Template/Abstract.php - - - - message: "#^Call to an undefined method Varien_Crypt_Abstract\\:\\:init\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Encryption.php - - - - message: "#^Method Mage_Core_Model_Factory\\:\\:getUrlRewriteInstance\\(\\) should return Mage_Core_Model_Url_Rewrite but returns bool\\|Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Factory.php - - - - message: "#^Variable \\$parentId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/File/Storage/Directory/Database.php - - - - message: "#^PHPDoc tag @param for parameter \\$filter with type array\\|Zend_Filter_Interface is not subtype of native type Zend_Filter_Interface\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Input/Filter.php - - - - message: "#^Call to an undefined method SimpleXMLElement\\:\\:getAttribute\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Layout.php - - - - message: "#^Cannot unset offset '@attributes' on \\(array\\{\\}\\|array\\{\\000\\*\\000_parent\\: Varien_Simplexml_Element\\}\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Layout.php - - - - message: "#^Method Mage_Core_Model_Layout\\:\\:getMessagesBlock\\(\\) should return Mage_Core_Block_Messages but returns Mage_Core_Block_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Layout.php - - - - message: "#^Method Mage_Core_Model_Layout\\:\\:getMessagesBlock\\(\\) should return Mage_Core_Block_Messages but returns Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Layout.php - - - - message: "#^Method Mage_Core_Model_Layout_Update\\:\\:saveCache\\(\\) should return bool but returns Mage_Core_Model_App\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Layout/Update.php - - - - message: "#^Property Mage_Core_Model_Locale\\:\\:\\$_locale \\(Zend_Locale\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Locale.php - - - - message: "#^Method Mage_Core_Model_Message_Collection\\:\\:getMessageByIdentifier\\(\\) should return Mage_Core_Model_Message_Abstract\\|null but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Message/Collection.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Type_Abstract\\:\\:getConnection\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource.php - - - - message: "#^Call to an undefined method SimpleXMLElement\\:\\:getClassName\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource.php - - - - message: "#^Method Mage_Core_Model_Resource\\:\\:_getDefaultConnection\\(\\) should return string but returns Varien_Db_Adapter_Interface\\|false\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Model/Resource.php - - - - message: "#^Method Mage_Core_Model_Resource\\:\\:getConnection\\(\\) should return Varien_Db_Adapter_Interface\\|false but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource.php - - - - message: "#^Method Mage_Core_Model_Resource_Db_Abstract\\:\\:_getConnection\\(\\) should return Magento_Db_Adapter_Pdo_Mysql but returns Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Db/Abstract.php - - - - message: "#^Property Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:\\$_resource \\(Mage_Core_Model_Resource_Db_Abstract\\) does not accept Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php - - - - message: "#^Variable \\$alias in isset\\(\\) always exists and is always null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php - - - - message: "#^Variable \\$alias might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php - - - - message: "#^Variable \\$columnsToSelect in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php - - - - message: "#^Method Mage_Core_Model_Resource_Entity_Abstract\\:\\:getConfig\\(\\) should return bool\\|string but returns Varien_Simplexml_Config\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Entity/Abstract.php - - - - message: "#^Property Mage_Core_Model_Resource_Entity_Abstract\\:\\:\\$_config \\(Varien_Simplexml_Config\\) does not accept default value of type array\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Entity/Abstract.php - - - - message: "#^Method Mage_Core_Model_Resource_File_Storage_Directory_Database\\:\\:getParentId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/File/Storage/Directory/Database.php - - - - message: "#^Property Mage_Core_Model_Resource_File_Storage_File\\:\\:\\$filePointer \\(resource\\) does not accept null\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Model/Resource/File/Storage/File.php - - - - message: "#^PHPDoc tag @param for parameter \\$callbacks with type array\\|string is not subtype of native type array\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Iterator.php - - - - message: "#^Static property Mage_Core_Model_Resource_Resource\\:\\:\\$_dataVersions \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Resource.php - - - - message: "#^Property Mage_Core_Model_Resource_Session\\:\\:\\$_lifeTime \\(int\\) does not accept string\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Session.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:getClassName\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Model/Resource/Setup.php - - - - message: "#^Property Mage_Core_Model_Resource_Setup\\:\\:\\$_conn \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Setup.php - - - - message: "#^Property Mage_Core_Model_Resource_Setup\\:\\:\\$_moduleConfig \\(Mage_Core_Model_Config_Element\\) does not accept SimpleXMLElement\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Setup.php - - - - message: "#^Property Mage_Core_Model_Resource_Setup\\:\\:\\$_resourceConfig \\(Mage_Core_Model_Config_Element\\) does not accept SimpleXMLElement\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Setup.php - - - - message: "#^Binary operation \"\\.\" between string and array results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Resource/Setup/Query/Modifier.php - - - - message: "#^Parameter \\#2 \\$clear \\(bool\\) of method Mage_Core_Model_Session_Abstract_Varien\\:\\:getData\\(\\) should be compatible with parameter \\$index \\(int\\|string\\) of method Varien_Object\\:\\:getData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Session/Abstract/Varien.php - - - - message: "#^Access to an undefined property Zend_Session_Namespace\\:\\:\\$data\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Model/Session/Abstract/Zend.php - - - - message: "#^Parameter \\#2 \\$clear \\(bool\\) of method Mage_Core_Model_Session_Abstract_Zend\\:\\:getData\\(\\) should be compatible with parameter \\$index \\(int\\|string\\) of method Varien_Object\\:\\:getData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Session/Abstract/Zend.php - - - - message: "#^Method Mage_Core_Model_Store\\:\\:_getSession\\(\\) should return Mage_Core_Model_Session but returns Mage_Core_Model_Session_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Store.php - - - - message: "#^Method Mage_Core_Model_Store\\:\\:getPriceFilter\\(\\) should return Varien_Filter_Sprintf but returns Mage_Directory_Model_Currency_Filter\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Store.php - - - - message: "#^PHPDoc type bool of property Mage_Core_Model_Store\\:\\:\\$_cacheTag is not covariant with PHPDoc type string\\|true of overridden property Mage_Core_Model_Abstract\\:\\:\\$_cacheTag\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Store.php - - - - message: "#^Property Mage_Core_Model_Store\\:\\:\\$_priceFilter \\(Mage_Directory_Model_Currency_Filter\\) does not accept Varien_Filter_Sprintf\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Store.php - - - - message: "#^Variable \\$store might not be defined\\.$#" - count: 8 - path: ../app/code/core/Mage/Core/Model/Store/Api.php - - - - message: "#^Property Mage_Core_Model_Template\\:\\:\\$_emulatedDesignConfig \\(Varien_Object\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Template.php - - - - message: "#^Property Mage_Core_Model_Template\\:\\:\\$_emulatedDesignConfig \\(Varien_Object\\) does not accept false\\.$#" - count: 2 - path: ../app/code/core/Mage/Core/Model/Template.php - - - - message: "#^Property Mage_Core_Model_Template\\:\\:\\$_initialEnvironmentInfo \\(Varien_Object\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Template.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Translate.php - - - - message: "#^Method Mage_Core_Model_Url\\:\\:getRequest\\(\\) should return Mage_Core_Controller_Request_Http but returns Zend_Controller_Request_Http\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Url.php - - - - message: "#^PHPDoc type mixed of property Mage_Core_Model_Url_Rewrite\\:\\:\\$_cacheTag is not covariant with PHPDoc type string\\|true of overridden property Mage_Core_Model_Abstract\\:\\:\\$_cacheTag\\.$#" - count: 1 - path: ../app/code/core/Mage/Core/Model/Url/Rewrite.php - - - - message: "#^Variable \\$targetUrl might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Core/Model/Url/Rewrite.php - - - - message: "#^Variable \\$arguments might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Cron/Model/Observer.php - - - - message: "#^Property Mage_CurrencySymbol_Model_System_Currencysymbol\\:\\:\\$_storeId \\(string\\|null\\) does not accept int\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php - - - - message: "#^Property Mage_CurrencySymbol_Model_System_Currencysymbol\\:\\:\\$_websiteId \\(string\\|null\\) does not accept int\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php - - - - message: "#^Call to an undefined method Mage_Wishlist_Model_Resource_Item_Collection\\:\\:addAttributeToSelect\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Block/Account/Dashboard/Sidebar.php - - - - message: "#^Property Mage_Customer_Block_Account_Navigation\\:\\:\\$_activeLink \\(bool\\) does not accept string\\.$#" - count: 2 - path: ../app/code/core/Mage/Customer/Block/Account/Navigation.php - - - - message: "#^Method Mage_Customer_Block_Address_Edit\\:\\:getCountryId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Block/Address/Edit.php - - - - message: "#^Return type \\(int\\) of method Mage_Customer_Block_Address_Edit\\:\\:getCountryId\\(\\) should be compatible with return type \\(string\\) of method Mage_Directory_Block_Data\\:\\:getCountryId\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Customer/Block/Address/Edit.php - - - - message: "#^Method Mage_Customer_Block_Form_Register\\:\\:getCountryId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Block/Form/Register.php - - - - message: "#^Return type \\(int\\) of method Mage_Customer_Block_Form_Register\\:\\:getCountryId\\(\\) should be compatible with return type \\(string\\) of method Mage_Directory_Block_Data\\:\\:getCountryId\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Customer/Block/Form/Register.php - - - - message: "#^Method Mage_Customer_Block_Newsletter\\:\\:getAction\\(\\) should return Mage_Core_Controller_Varien_Action but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Block/Newsletter.php - - - - message: "#^Property Mage_Customer_Helper_Data\\:\\:\\$_groups \\(Mage_Customer_Model_Entity_Group_Collection\\) does not accept Mage_Customer_Model_Resource_Group_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Helper/Data.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Address/Abstract.php - - - - message: "#^Method Mage_Customer_Model_Address_Abstract\\:\\:getStreet\\(\\) should return string but returns array\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Address/Abstract.php - - - - message: "#^Cannot access property \\$is_default_billing on array\\.$#" - count: 2 - path: ../app/code/core/Mage/Customer/Model/Address/Api/V2.php - - - - message: "#^Cannot access property \\$is_default_shipping on array\\.$#" - count: 2 - path: ../app/code/core/Mage/Customer/Model/Address/Api/V2.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getResource\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Api/Resource.php - - - - message: "#^Call to an undefined method Mage_Customer_Model_Api2_Customer_Address\\:\\:_getDefaultAddressesInfo\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Api2/Customer/Address.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php - - - - message: "#^Property Mage_Customer_Model_Convert_Adapter_Customer\\:\\:\\$_customerModel \\(Mage_Customer_Model_Customer\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:setStore\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php - - - - message: "#^Variable \\$regionId might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Customer/Model/Convert/Parser/Customer.php - - - - message: "#^Method Mage_Directory_Model_Region\\:\\:loadByName\\(\\) invoked with 1 parameter, 2 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Customer.php - - - - message: "#^Property Mage_Customer_Model_Customer\\:\\:\\$_addresses \\(array\\\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Customer.php - - - - message: "#^Property Mage_Customer_Model_Customer\\:\\:\\$_addressesCollection \\(Mage_Customer_Model_Entity_Address_Collection\\) does not accept Mage_Customer_Model_Resource_Address_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Customer.php - - - - message: "#^Property Mage_Customer_Model_Customer\\:\\:\\$_addressesCollection \\(Mage_Customer_Model_Entity_Address_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Customer.php - - - - message: "#^Property Mage_Customer_Model_Customer\\:\\:\\$_attributes \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Customer.php - - - - message: "#^Parameter \\#1 \\$data \\(stdClass\\) of method Mage_Customer_Model_Customer_Api_V2\\:\\:_prepareData\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Customer_Model_Customer_Api\\:\\:_prepareData\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Customer/Api/V2.php - - - - message: "#^Method Mage_Customer_Model_Resource_Customer\\:\\:getWebsiteId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/Model/Resource/Customer.php - - - - message: "#^Cannot call method addAttributeToSelect\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/controllers/AccountController.php - - - - message: "#^Cannot call method sendNewAccountEmail\\(\\) on Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/controllers/AccountController.php - - - - message: "#^Method Mage_Customer_AccountController\\:\\:postDispatch\\(\\) should return \\$this\\(Mage_Customer_AccountController\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/controllers/AccountController.php - - - - message: "#^Method Mage_Customer_AccountController\\:\\:preDispatch\\(\\) should return \\$this\\(Mage_Customer_AccountController\\) but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/controllers/AccountController.php - - - - message: "#^Variable \\$address might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Customer/controllers/AddressController.php - - - - message: "#^Method Mage_Dataflow_Model_Batch\\:\\:setParams\\(\\) should return Mage_Dataflow_Model_Batch_Abstract but returns \\$this\\(Mage_Dataflow_Model_Batch\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Batch.php - - - - message: "#^Property Mage_Dataflow_Model_Batch\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Batch.php - - - - message: "#^Property Mage_Dataflow_Model_Batch\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Batch.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Abstract\\:\\:deleteCollection\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Batch/Abstract.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Abstract\\:\\:getIdCollection\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Batch/Abstract.php - - - - message: "#^Call to an undefined method Mage_Dataflow_Model_Convert_Action\\:\\:getData\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert.php - - - - message: "#^Call to an undefined method Mage_Dataflow_Model_Convert_Action_Abstract\\:\\:getClassNameByType\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Action/Abstract.php - - - - message: "#^Call to an undefined method Mage_Dataflow_Model_Convert_Container_Interface\\:\\:setAction\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Action/Abstract.php - - - - message: "#^Call to an undefined method Mage_Dataflow_Model_Convert_Container_Interface\\:\\:setProfile\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Action/Abstract.php - - - - message: "#^Property Mage_Dataflow_Model_Convert_Action_Abstract\\:\\:\\$_container \\(Mage_Dataflow_Model_Convert_Container_Abstract\\) does not accept Mage_Dataflow_Model_Convert_Container_Interface\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Action/Abstract.php - - - - message: "#^Undefined variable\\: \\$action$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Action/Abstract.php - - - - message: "#^Call to an undefined method Mage_Dataflow_Model_Convert_Container_Interface\\:\\:getName\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Container/Collection.php - - - - message: "#^Method Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:getBatchImportModel\\(\\) has invalid return type Mage_Dataflow_Model_Import_Export\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Mapper/Column.php - - - - message: "#^Property Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Mapper/Column.php - - - - message: "#^Property Mage_Dataflow_Model_Convert_Mapper_Column\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Mapper/Column.php - - - - message: "#^Property Mage_Dataflow_Model_Convert_Parser_Abstract\\:\\:\\$_batchExport \\(Mage_Dataflow_Model_Batch_Export\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Parser/Abstract.php - - - - message: "#^Property Mage_Dataflow_Model_Convert_Parser_Abstract\\:\\:\\$_batchImport \\(Mage_Dataflow_Model_Batch_Import\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Parser/Abstract.php - - - - message: "#^Argument of an invalid type string\\|false supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php - - - - message: "#^Method Mage_Dataflow_Model_Convert_Profile_Abstract\\:\\:run\\(\\) should return Mage_Dataflow_Model_Convert_Profile_Abstract but empty return statement found\\.$#" - count: 2 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php - - - - message: "#^Undefined variable\\: \\$profile$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Convert/Profile/Abstract.php - - - - message: "#^Variable \\$parseFileXml might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Dataflow/Model/Profile.php - - - - message: "#^Variable \\$path might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Dataflow/Model/Profile.php - - - - message: "#^Property Mage_Directory_Helper_Data\\:\\:\\$_countryCollection \\(Mage_Directory_Model_Resource_Country_Collection\\) does not accept Mage_Core_Model_Resource_Db_Collection_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Helper/Data.php - - - - message: "#^Method Mage_Directory_Model_Country\\:\\:getFormat\\(\\) should return Mage_Directory_Model_Country_Format but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Model/Country.php - - - - message: "#^Variable \\$response might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Model/Currency/Import/Fixerio.php - - - - message: "#^Method Mage_Directory_Model_Currency_Import_Webservicex\\:\\:_convert\\(\\) should return float\\|null but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Model/Currency/Import/Webservicex.php - - - - message: "#^Variable \\$importModel might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Directory/Model/Observer.php - - - - message: "#^Variable \\$allowCountries in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Directory/Model/Resource/Country/Collection.php - - - - message: "#^Property Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable_Links\\:\\:\\$_purchasedSeparatelyAttribute \\(Mage_Catalog_Model_Resource_Eav_Attribute\\) does not accept Mage_Eav_Model_Entity_Attribute\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php - - - - message: "#^Cannot call method streamRead\\(\\) on resource\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Helper/Download.php - - - - message: "#^Cannot call method streamStat\\(\\) on resource\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Helper/Download.php - - - - message: "#^Property Mage_Downloadable_Helper_Download\\:\\:\\$_handle \\(resource\\) does not accept Varien_Io_File\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Helper/Download.php - - - - message: "#^Cannot access offset 'file' on bool\\|void\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Model/Link/Api.php - - - - message: "#^Offset 'file' does not exist on array\\{status\\: 'new'\\}\\.$#" - count: 2 - path: ../app/code/core/Mage/Downloadable/Model/Link/Api.php - - - - message: "#^Variable \\$downloadableModel might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Downloadable/Model/Link/Api.php - - - - message: "#^Property Varien_File_Uploader\\:\\:\\$_uploadType \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Model/Link/Api/Uploader.php - - - - message: "#^Parameter \\#2 \\$resource \\(object\\) of method Mage_Downloadable_Model_Link_Api_V2\\:\\:add\\(\\) should be compatible with parameter \\$resource \\(array\\) of method Mage_Downloadable_Model_Link_Api\\:\\:add\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/Model/Link/Api/V2.php - - - - message: "#^Cannot access offset 'tmp_name' on bool\\|void\\.$#" - count: 2 - path: ../app/code/core/Mage/Downloadable/controllers/Adminhtml/Downloadable/FileController.php - - - - message: "#^Method Mage_Customer_Model_Session\\:\\:setBeforeAuthUrl\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/controllers/DownloadController.php - - - - message: "#^Return type \\(void\\) of method Mage_Downloadable_FileController\\:\\:preDispatch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Controller_Action\\)\\) of method Mage_Adminhtml_Controller_Action\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/controllers/FileController.php - - - - message: "#^Return type \\(void\\) of method Mage_Downloadable_Product_EditController\\:\\:preDispatch\\(\\) should be compatible with return type \\(Mage_Adminhtml_Controller_Action\\) of method Mage_Adminhtml_Catalog_ProductController\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Downloadable/controllers/Product/EditController.php - - - - message: "#^Property Zend_Validate_InArray\\:\\:\\$_messageTemplates \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Resource_Entity_Attribute\\:\\:getUsedInForms\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Attribute.php - - - - message: "#^Method Mage_Eav_Model_Attribute_Data_Abstract\\:\\:setRequestScope\\(\\) should return string but returns \\$this\\(Mage_Eav_Model_Attribute_Data_Abstract\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Attribute/Data/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Attribute_Data_Abstract\\:\\:\\$_attribite \\(Mage_Eav_Model_Attribute\\) does not accept Mage_Eav_Model_Entity_Attribute_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Attribute/Data/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Attribute_Data_Abstract\\:\\:\\$_dateFilterFormat \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Attribute/Data/Abstract.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getEntityTypeCode\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Attribute/Data/File.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Abstract\\:\\:getDefaultAttributes\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Cannot call method loadByCode\\(\\) on Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Method Mage_Eav_Model_Config\\:\\:getAttribute\\(\\) should return Mage_Eav_Model_Entity_Attribute_Abstract\\|false but returns Mage_Eav_Model_Entity_Attribute_Interface\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Property Mage_Eav_Model_Config\\:\\:\\$_attributeData \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Property Mage_Eav_Model_Config\\:\\:\\$_entityData \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Property Mage_Eav_Model_Config\\:\\:\\$_objects \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Property Mage_Eav_Model_Config\\:\\:\\$_references \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Config.php - - - - message: "#^Method Mage_Eav_Model_Convert_Adapter_Entity\\:\\:_getCollectionForLoad\\(\\) should return Mage_Eav_Model_Entity_Collection but returns Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php - - - - message: "#^Variable \\$defBind might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php - - - - message: "#^Variable \\$entityIds might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Entity.php - - - - message: "#^Binary operation \"\\.\" between Mage_Eav_Model_Entity_Interface and '_collection' results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Grid.php - - - - message: "#^Cannot call method addData\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Grid.php - - - - message: "#^Cannot call method getId\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Grid.php - - - - message: "#^Variable \\$collection might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Grid.php - - - - message: "#^Variable \\$entity might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Convert/Adapter/Grid.php - - - - message: "#^Method Mage_Eav_Model_Entity_Abstract\\:\\:_getReadAdapter\\(\\) should return Magento_Db_Adapter_Pdo_Mysql but returns Varien_Db_Adapter_Pdo_Mysql\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Method Mage_Eav_Model_Entity_Abstract\\:\\:_getWriteAdapter\\(\\) should return Magento_Db_Adapter_Pdo_Mysql but returns Varien_Db_Adapter_Pdo_Mysql\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Entity_Abstract\\:\\:\\$_read \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Entity_Abstract\\:\\:\\$_read \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept string\\|Zend_Db_Adapter_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Entity_Abstract\\:\\:\\$_write \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Entity_Abstract\\:\\:\\$_write \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept string\\|Zend_Db_Adapter_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Variable \\$attributeCode might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Variable \\$id might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Variable \\$instance might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Variable \\$method might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Variable \\$part might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Entity/Abstract.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Resource_Db_Abstract\\:\\:getIdByCode\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Abstract\\:\\:getFlatUpdateSelect\\(\\) should return \\$this\\(Mage_Eav_Model_Entity_Attribute_Abstract\\)\\|Varien_Db_Select but returns null\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php - - - - message: "#^Property Mage_Eav_Model_Entity_Attribute_Abstract\\:\\:\\$_entity \\(Mage_Eav_Model_Entity_Abstract\\) does not accept Mage_Eav_Model_Entity_Type\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php - - - - message: "#^Return type \\(\\$this\\(Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\)\\) of method Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\:\\:setValueId\\(\\) should be compatible with return type \\(int\\) of method Mage_Eav_Model_Entity_Attribute_Backend_Interface\\:\\:setValueId\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Abstract.php - - - - message: "#^Variable \\$out in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Frontend/Abstract.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Resource_Entity_Attribute_Group\\:\\:deleteGroups\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Group.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Collection_Abstract\\:\\:getStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Table.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Attribute_Interface\\:\\:getAttributeCode\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php - - - - message: "#^Constructor of class Mage_Eav_Model_Entity_Collection_Abstract has an unused parameter \\$resource\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php - - - - message: "#^Variable \\$attrArr might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php - - - - message: "#^Variable \\$entity might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php - - - - message: "#^Variable \\$query might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php - - - - message: "#^Variable \\$select might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php - - - - message: "#^Argument of an invalid type string supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Binary operation \"\\+\" between string and 1 results in an error\\.$#" - count: 3 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Binary operation \"\\+\" between string and 10 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Call to an undefined method Varien_Db_Adapter_Interface\\:\\:lastInsertId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Method Mage_Eav_Model_Entity_Setup\\:\\:getDefaultAttributeGroupId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Method Mage_Eav_Model_Entity_Setup\\:\\:getDefaultAttributeSetId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Variable \\$connection might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Entity/Setup.php - - - - message: "#^Method Mage_Eav_Model_Resource_Entity_Attribute\\:\\:_getMaxSortOrder\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php - - - - message: "#^Method Mage_Eav_Model_Resource_Entity_Attribute\\:\\:getIdByCode\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php - - - - message: "#^Method Mage_Eav_Model_Resource_Entity_Attribute_Group\\:\\:_getMaxSortOrder\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Group.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Collection_Abstract\\:\\:getStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Option.php - - - - message: "#^Method Mage_Eav_Model_Resource_Entity_Attribute_Set\\:\\:getDefaultGroupId\\(\\) should return int\\|null but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Set.php - - - - message: "#^Variable \\$store might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Resource/Form/Attribute/Collection.php - - - - message: "#^PHPDoc tag @param for parameter \\$object with type Mage_Eav_Model_Resource_Form_Type is incompatible with native type Mage_Core_Model_Abstract\\.$#" - count: 2 - path: ../app/code/core/Mage/Eav/Model/Resource/Form/Type.php - - - - message: "#^Method Mage_GiftMessage_Model_Api_V2\\:\\:_prepareData\\(\\) should return array but returns mixed\\.$#" - count: 1 - path: ../app/code/core/Mage/GiftMessage/Model/Api/V2.php - - - - message: "#^Return type \\(stdClass\\) of method Mage_GiftMessage_Model_Api_V2\\:\\:_setGiftMessage\\(\\) should be compatible with return type \\(array\\) of method Mage_GiftMessage_Model_Api\\:\\:_setGiftMessage\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/GiftMessage/Model/Api/V2.php - - - - message: "#^Method Mage_GiftMessage_Model_Message\\:\\:getEntityModelByType\\(\\) should return Mage_Eav_Model_Entity_Abstract but returns Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/GiftMessage/Model/Message.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:setGiftMessageId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/GiftMessage/controllers/IndexController.php - - - - message: "#^Call to an undefined method Mage_GiftMessage_IndexController\\:\\:_getMappedType\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/GiftMessage/controllers/IndexController.php - - - - message: "#^Method Mage_Eav_Model_Entity_Abstract\\:\\:load\\(\\) invoked with 1 parameter, 2\\-3 required\\.$#" - count: 1 - path: ../app/code/core/Mage/GiftMessage/controllers/IndexController.php - - - - message: "#^Method Mage_GoogleAnalytics_Block_Ga\\:\\:_getOrdersTrackingCodeAnalytics\\(\\) should return string but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/GoogleAnalytics/Block/Ga.php - - - - message: "#^Method Mage_GoogleAnalytics_Block_Ga\\:\\:_getOrdersTrackingCodeUniversal\\(\\) should return string but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/GoogleAnalytics/Block/Ga.php - - - - message: "#^Method Mage_GoogleAnalytics_Helper_Data\\:\\:isUseUniversalAnalytics\\(\\) should return string but returns bool\\.$#" - count: 1 - path: ../app/code/core/Mage/GoogleAnalytics/Helper/Data.php - - - - message: "#^Return type \\(void\\) of method Mage_GoogleCheckout_Model_Payment\\:\\:authorize\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Abstract\\)\\) of method Mage_Payment_Model_Method_Abstract\\:\\:authorize\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/GoogleCheckout/Model/Payment.php - - - - message: "#^Return type \\(void\\) of method Mage_GoogleCheckout_Model_Payment\\:\\:cancel\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Abstract\\)\\) of method Mage_Payment_Model_Method_Abstract\\:\\:cancel\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/GoogleCheckout/Model/Payment.php - - - - message: "#^Return type \\(void\\) of method Mage_GoogleCheckout_Model_Payment\\:\\:capture\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Abstract\\)\\) of method Mage_Payment_Model_Method_Abstract\\:\\:capture\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/GoogleCheckout/Model/Payment.php - - - - message: "#^Return type \\(void\\) of method Mage_GoogleCheckout_Model_Payment\\:\\:refund\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Abstract\\)\\) of method Mage_Payment_Model_Method_Abstract\\:\\:refund\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/GoogleCheckout/Model/Payment.php - - - - message: "#^Return type \\(void\\) of method Mage_GoogleCheckout_Model_Payment\\:\\:void\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Abstract\\)\\) of method Mage_Payment_Model_Method_Abstract\\:\\:void\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/GoogleCheckout/Model/Payment.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 4 - path: ../app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php - - - - message: "#^Return type \\(false\\) of method Mage_ImportExport_Block_Adminhtml_Export_Filter\\:\\:getRowUrl\\(\\) should be compatible with return type \\(string\\) of method Mage_Adminhtml_Block_Widget_Grid\\:\\:getRowUrl\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php - - - - message: "#^Method Mage_ImportExport_Helper_Data\\:\\:getMaxUploadSize\\(\\) should return int but returns string\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Helper/Data.php - - - - message: "#^Property Mage_ImportExport_Model_Export\\:\\:\\$_entityAdapter \\(Mage_ImportExport_Model_Export_Entity_Abstract\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export.php - - - - message: "#^Property Mage_ImportExport_Model_Export\\:\\:\\$_writer \\(Mage_ImportExport_Model_Export_Adapter_Abstract\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Abstract.php - - - - message: "#^Property Mage_ImportExport_Model_Export_Entity_Abstract\\:\\:\\$_connection \\(Varien_Db_Adapter_Pdo_Mysql\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Abstract.php - - - - message: "#^Property Mage_ImportExport_Model_Export_Entity_Abstract\\:\\:\\$_entityTypeId \\(int\\) does not accept string\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Abstract.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Customer.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Collection_Abstract\\:\\:addCategoryIds\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Collection_Abstract\\:\\:setStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php - - - - message: "#^Variable \\$collection might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php - - - - message: "#^Cannot access offset 'file' on bool\\|void\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import.php - - - - message: "#^Cannot access offset 'path' on bool\\|void\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import.php - - - - message: "#^Property Mage_ImportExport_Model_Import\\:\\:\\$_entityAdapter \\(Mage_ImportExport_Model_Import_Entity_Abstract\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import.php - - - - message: "#^Static property Mage_ImportExport_Model_Import\\:\\:\\$_entityInvalidatedIndexes \\(Mage_ImportExport_Model_Import_Entity_Abstract\\) does not accept default value of type array\\\\>\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php - - - - message: "#^Property Mage_ImportExport_Model_Import_Entity_Abstract\\:\\:\\$_connection \\(Varien_Convert_Adapter_Interface\\) does not accept Varien_Db_Adapter_Interface\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php - - - - message: "#^Property Mage_ImportExport_Model_Import_Entity_Abstract\\:\\:\\$_entityTypeId \\(int\\) does not accept string\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:insertMultiple\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:insertOnDuplicate\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:query\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:quoteInto\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php - - - - message: "#^Variable \\$entityId might not be defined\\.$#" - count: 4 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:delete\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer/Address.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:insertMultiple\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer/Address.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:insertOnDuplicate\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer/Address.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:quoteInto\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Customer/Address.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:delete\\(\\)\\.$#" - count: 8 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:fetchPairs\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:insertMultiple\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:insertOnDuplicate\\(\\)\\.$#" - count: 14 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:query\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:quoteInto\\(\\)\\.$#" - count: 12 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Call to an undefined method Varien_Convert_Adapter_Interface\\:\\:select\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Method Mage_ImportExport_Model_Import_Entity_Product\\:\\:getConnection\\(\\) should return Varien_Db_Adapter_Pdo_Mysql but returns Varien_Convert_Adapter_Interface\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Property Mage_ImportExport_Model_Import_Entity_Product\\:\\:\\$_urlKeyAttributeId \\(int\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Variable \\$prevOptionId might not be defined\\.$#" - count: 4 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Variable \\$rowSku might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Variable \\$sku might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php - - - - message: "#^Variable \\$productId might not be defined\\.$#" - count: 4 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Configurable.php - - - - message: "#^Variable \\$productSuperAttrId might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Configurable.php - - - - message: "#^Variable \\$productData might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Grouped.php - - - - message: "#^Cannot access offset 'name' on bool\\|void\\.$#" - count: 2 - path: ../app/code/core/Mage/ImportExport/Model/Import/Uploader.php - - - - message: "#^Property Varien_File_Uploader\\:\\:\\$_uploadType \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Import/Uploader.php - - - - message: "#^Property Mage_ImportExport_Model_Resource_Import_Data\\:\\:\\$_iterator \\(IteratorIterator\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/ImportExport/Model/Resource/Import/Data.php - - - - message: "#^Method Mage_Index_Model_Lock\\:\\:getInstance\\(\\) should return \\$this\\(Mage_Index_Model_Lock\\) but returns Mage_Index_Model_Lock\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Lock.php - - - - message: "#^Property Mage_Index_Model_Lock\\:\\:\\$_storage \\(Mage_Index_Model_Lock_Storage_Interface\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Lock.php - - - - message: "#^Method Mage_Core_Model_Resource\\:\\:getConnection\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Lock/Storage/Db.php - - - - message: "#^Method Mage_Index_Model_Lock_Storage_Db\\:\\:releaseLock\\(\\) should return int\\|null but returns bool\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Lock/Storage/Db.php - - - - message: "#^Property Mage_Index_Model_Lock_Storage_Db\\:\\:\\$_helper \\(Mage_Index_Model_Resource_Helper_Mysql4\\) does not accept Mage_Core_Model_Resource_Helper_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Lock/Storage/Db.php - - - - message: "#^Return type \\(int\\|null\\) of method Mage_Index_Model_Lock_Storage_Db\\:\\:releaseLock\\(\\) should be compatible with return type \\(bool\\) of method Mage_Index_Model_Lock_Storage_Interface\\:\\:releaseLock\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Lock/Storage/Db.php - - - - message: "#^Property Varien_Data_Collection\\:\\:\\$_totalRecords \\(int\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Resource/Event/Collection.php - - - - message: "#^Property Varien_Data_Collection_Db\\:\\:\\$_data \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Resource/Event/Collection.php - - - - message: "#^Return type \\(Varien_Db_Adapter_Interface\\|false\\) of method Mage_Index_Model_Resource_Lock_Resource\\:\\:_getDefaultConnection\\(\\) should be compatible with return type \\(string\\) of method Mage_Core_Model_Resource\\:\\:_getDefaultConnection\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Resource/Lock/Resource.php - - - - message: "#^Method Mage_Index_Model_Resource_Setup\\:\\:_syncIndexes\\(\\) should return \\$this\\(Mage_Index_Model_Resource_Setup\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Resource/Setup.php - - - - message: "#^Return type \\(void\\) of method Mage_Index_Model_Resource_Setup\\:\\:applyUpdates\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Model_Resource_Setup\\)\\|true\\) of method Mage_Core_Model_Resource_Setup\\:\\:applyUpdates\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Index/Model/Resource/Setup.php - - - - message: "#^Offset 'path' does not exist on array\\{\\000\\*\\000_parent\\: Varien_Simplexml_Element\\}\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/Model/Config.php - - - - message: "#^Constant data not found\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/Model/Installer.php - - - - message: "#^Property Mage_Install_Model_Installer\\:\\:\\$_dataModel \\(Mage_Install_Model_Session\\) does not accept Varien_Object\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/Model/Installer.php - - - - message: "#^Call to an undefined method Mage_Install_Model_Installer_Db_Abstract\\:\\:getVersion\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/Model/Installer/Db.php - - - - message: "#^Method Mage_Install_Model_Installer_Db\\:\\:_getDbResource\\(\\) should return Mage_Install_Model_Installer_Db_Abstract but returns resource\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/Model/Installer/Db.php - - - - message: "#^Property Mage_Install_Model_Installer_Db\\:\\:\\$_dbResource \\(resource\\) does not accept Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/Model/Installer/Db.php - - - - message: "#^Method Mage_Install_IndexController\\:\\:preDispatch\\(\\) with return type void returns void but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/controllers/IndexController.php - - - - message: "#^Result of method Mage_Core_Controller_Varien_Action\\:\\:preDispatch\\(\\) \\(void\\) is used\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/controllers/IndexController.php - - - - message: "#^Method Mage_Install_WizardController\\:\\:preDispatch\\(\\) with return type void returns void but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/controllers/WizardController.php - - - - message: "#^Result of method Mage_Core_Controller_Varien_Action\\:\\:preDispatch\\(\\) \\(void\\) is used\\.$#" - count: 1 - path: ../app/code/core/Mage/Install/controllers/WizardController.php - - - - message: "#^Property Mage_Log_Model_Aggregation\\:\\:\\$_lastRecord \\(string\\) does not accept int\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Log/Model/Aggregation.php - - - - message: "#^Binary operation \"\\+\" between non\\-falsy\\-string and 1 results in an error\\.$#" - count: 2 - path: ../app/code/core/Mage/Log/Model/Resource/Log.php - - - - message: "#^Method Mage_Media_Model_File_Image\\:\\:getImage\\(\\) should return bool\\|resource but returns GdImage\\.$#" - count: 1 - path: ../app/code/core/Mage/Media/Model/File/Image.php - - - - message: "#^Method Mage_Media_Model_File_Image\\:\\:getTmpImage\\(\\) should return resource but returns GdImage\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Media/Model/File/Image.php - - - - message: "#^Property Mage_Media_Model_Image\\:\\:\\$_image \\(resource\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Media/Model/Image.php - - - - message: "#^Property Mage_Media_Model_Image\\:\\:\\$_tmpImage \\(resource\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Media/Model/Image.php - - - - message: "#^Method Mage_Newsletter_ManageController\\:\\:saveAction\\(\\) should return Mage_Newsletter_ManageController but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Newsletter/controllers/ManageController.php - - - - message: "#^Return type \\(void\\) of method Mage_Oauth_Adminhtml_Oauth_AuthorizeController\\:\\:preDispatch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Adminhtml_Controller_Action\\)\\) of method Mage_Adminhtml_Controller_Action\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Abstract\\:\\:authenticate\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Oauth/controllers/Customer/TokenController.php - - - - message: "#^Property Mage_Oauth_Customer_TokenController\\:\\:\\$_session \\(Mage_Customer_Model_Session\\) does not accept Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Oauth/controllers/Customer/TokenController.php - - - - message: "#^Property Mage_Oauth_Customer_TokenController\\:\\:\\$_sessionName \\(Mage_Customer_Model_Session\\) does not accept default value of type string\\.$#" - count: 1 - path: ../app/code/core/Mage/Oauth/controllers/Customer/TokenController.php - - - - message: "#^Return type \\(void\\) of method Mage_Oauth_InitiateController\\:\\:preDispatch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Controller_Front_Action\\)\\) of method Mage_Core_Controller_Front_Action\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Oauth/controllers/InitiateController.php - - - - message: "#^Return type \\(void\\) of method Mage_Oauth_TokenController\\:\\:preDispatch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Controller_Front_Action\\)\\) of method Mage_Core_Controller_Front_Action\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Oauth/controllers/TokenController.php - - - - message: "#^Variable \\$finish might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Page/Block/Html/Pager.php - - - - message: "#^Variable \\$start might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Page/Block/Html/Pager.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:isPartialAuthorization\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paygate/Block/Authorizenet/Form/Cc.php - - - - message: "#^Property Mage_Payment_Block_Info\\:\\:\\$_paymentSpecificInformation \\(Varien_Object\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Paygate/Block/Authorizenet/Info/Cc.php - - - - message: "#^Cannot assign new offset to string\\.$#" - count: 1 - path: ../app/code/core/Mage/Paygate/Model/Authorizenet.php - - - - message: "#^Variable \\$defaultExceptionMessage might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Paygate/Model/Authorizenet.php - - - - message: "#^Variable \\$newTransactionType might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Paygate/Model/Authorizenet.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:cancelPartialAuthorization\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:cancelPartialAuthorization\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paygate/controllers/Authorizenet/PaymentController.php - - - - message: "#^Property Mage_Core_Block_Template\\:\\:\\$_template \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php - - - - message: "#^Property Mage_Payment_Block_Catalog_Product_View_Profile\\:\\:\\$_profile \\(Mage_Payment_Model_Recurring_Profile\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Block/Catalog/Product/View/Profile.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Abstract\\:\\:isAvailable\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Helper/Data.php - - - - message: "#^Method Mage_Payment_Helper_Data\\:\\:getStoreMethods\\(\\) should return array\\ but returns array\\\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Helper/Data.php - - - - message: "#^Method Mage_Payment_Model_Config\\:\\:_getMethod\\(\\) should return Mage_Payment_Model_Method_Abstract\\|false but returns Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Model/Config.php - - - - message: "#^Comparison operation \"\\<\" between \\(array\\|float\\|int\\) and 0\\.0001 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Model/Method/Abstract.php - - - - message: "#^Binary operation \"\\*\\=\" between string and 2 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Model/Method/Cc.php - - - - message: "#^Method Mage_Payment_Model_Recurring_Profile\\:\\:exportStartDatetime\\(\\) should return string\\|Zend_Date but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Payment/Model/Recurring/Profile.php - - - - message: "#^Property Mage_Paypal_Block_Adminhtml_System_Config_Field_Country\\:\\:\\$_defaultCountry \\(string\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/Field/Country.php - - - - message: "#^Method Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Group\\:\\:_getCollapseState\\(\\) should return bool but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/Fieldset/Group.php - - - - message: "#^Method Mage_Paypal_Block_Express_Review\\:\\:_formatPrice\\(\\) should return string but returns float\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Express/Review.php - - - - message: "#^Method Mage_Paypal_Block_Express_Review\\:\\:_getShippingPrice\\(\\) should return bool but returns float\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Express/Review.php - - - - message: "#^Return type \\(false\\) of method Mage_Paypal_Block_Hosted_Pro_Info\\:\\:getCcTypeName\\(\\) should be compatible with return type \\(string\\|null\\) of method Mage_Paypal_Block_Payment_Info\\:\\:getCcTypeName\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Hosted/Pro/Info.php - - - - message: "#^Method Mage_Paypal_Block_Iframe\\:\\:_getBlock\\(\\) should return \\$this\\(Mage_Paypal_Block_Iframe\\) but returns Mage_Payment_Block_Form\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Iframe.php - - - - message: "#^Property Mage_Paypal_Block_Iframe\\:\\:\\$_block \\(Mage_Payment_Block_Form\\) does not accept Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Iframe.php - - - - message: "#^Return type \\(false\\) of method Mage_Paypal_Block_Payflow_Link_Info\\:\\:getCcTypeName\\(\\) should be compatible with return type \\(string\\|null\\) of method Mage_Paypal_Block_Payment_Info\\:\\:getCcTypeName\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Block/Payflow/Link/Info.php - - - - message: "#^Method Mage_Paypal_Controller_Express_Abstract\\:\\:_initCheckout\\(\\) should return Mage_Paypal_Model_Express_Checkout but returns Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Controller/Express/Abstract.php - - - - message: "#^Method Mage_Paypal_Controller_Express_Abstract\\:\\:_initToken\\(\\) should return Mage_Paypal_ExpressController\\|string but returns \\$this\\(Mage_Paypal_Controller_Express_Abstract\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Controller/Express/Abstract.php - - - - message: "#^Property Mage_Paypal_Controller_Express_Abstract\\:\\:\\$_checkout \\(Mage_Paypal_Model_Express_Checkout\\) does not accept Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Controller/Express/Abstract.php - - - - message: "#^Property Mage_Paypal_Controller_Express_Abstract\\:\\:\\$_config \\(Mage_Paypal_Model_Config\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Controller/Express/Abstract.php - - - - message: "#^Property Mage_Paypal_Controller_Express_Abstract\\:\\:\\$_quote \\(Mage_Sales_Model_Quote\\) does not accept default value of type false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Controller/Express/Abstract.php - - - - message: "#^Variable \\$isAjax might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Controller/Express/Abstract.php - - - - message: "#^Method Mage_Paypal_Model_Api_Abstract\\:\\:_exportLineItems\\(\\) should return bool but empty return statement found\\.$#" - count: 2 - path: ../app/code/core/Mage/Paypal/Model/Api/Abstract.php - - - - message: "#^Call to an undefined method Mage_Paypal_Model_Api_Nvp\\:\\:_export\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Api/Nvp.php - - - - message: "#^Call to an undefined method Mage_Paypal_Model_Api_Nvp\\:\\:_import\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Api/Nvp.php - - - - message: "#^Method Mage_Paypal_Model_Api_Nvp\\:\\:_exportLineItems\\(\\) should return true\\|null but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Api/Nvp.php - - - - message: "#^Method Mage_Paypal_Model_Api_Nvp\\:\\:_exportLineItems\\(\\) should return true\\|null but returns bool\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Api/Nvp.php - - - - message: "#^Method Mage_Paypal_Model_Api_Standard\\:\\:_exportLineItems\\(\\) should return true\\|null but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Api/Standard.php - - - - message: "#^Method Mage_Paypal_Model_Api_Standard\\:\\:_exportLineItems\\(\\) should return true\\|null but returns bool\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Api/Standard.php - - - - message: "#^Call to an undefined method Varien_Object\\:\\:isNominal\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Cart.php - - - - message: "#^Property Mage_Paypal_Model_Direct\\:\\:\\$_pro \\(Mage_Paypal_Model_Pro\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Direct.php - - - - message: "#^Method Mage_Paypal_Model_Hostedpro\\:\\:initialize\\(\\) should return \\$this\\(Mage_Paypal_Model_Hostedpro\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Hostedpro.php - - - - message: "#^Return type \\(bool\\) of method Mage_Paypal_Model_Hostedpro\\:\\:getAllowedCcTypes\\(\\) should be compatible with return type \\(string\\) of method Mage_Paypal_Model_Direct\\:\\:getAllowedCcTypes\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Hostedpro.php - - - - message: "#^Return type \\(bool\\) of method Mage_Paypal_Model_Hostedpro\\:\\:validate\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Cc\\)\\) of method Mage_Payment_Model_Method_Cc\\:\\:validate\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Hostedpro.php - - - - message: "#^Binary operation \"\\-\" between array\\|string and array\\|string results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Ipn.php - - - - message: "#^Property Mage_Paypal_Model_Ipn\\:\\:\\$_order \\(Mage_Sales_Model_Order\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Ipn.php - - - - message: "#^Property Mage_Paypal_Model_Ipn\\:\\:\\$_recurringProfile \\(Mage_Sales_Model_Recurring_Profile\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Ipn.php - - - - message: "#^Return type \\(bool\\) of method Mage_Paypal_Model_Payflowlink\\:\\:validate\\(\\) should be compatible with return type \\(\\$this\\(Mage_Payment_Model_Method_Cc\\)\\) of method Mage_Payment_Model_Method_Cc\\:\\:validate\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Payflowlink.php - - - - message: "#^Variable \\$order in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Payflowlink.php - - - - message: "#^Property Mage_Paypal_Model_Payflowpro\\:\\:\\$_centinelFieldMap \\(string\\) does not accept default value of type array\\\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Payflowpro.php - - - - message: "#^Variable \\$order in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Payflowpro.php - - - - message: "#^Method Mage_Paypal_Model_Pro\\:\\:capture\\(\\) should return false\\|null but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Pro.php - - - - message: "#^Property Mage_Paypal_Model_Pro\\:\\:\\$_api \\(Mage_Paypal_Model_Api_Nvp\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Pro.php - - - - message: "#^Property Mage_Paypal_Model_Pro\\:\\:\\$_api \\(Mage_Paypal_Model_Api_Nvp\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Pro.php - - - - message: "#^Property Mage_Paypal_Model_Pro\\:\\:\\$_config \\(Mage_Paypal_Model_Config\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Pro.php - - - - message: "#^Method Mage_Paypal_Model_Standard\\:\\:initialize\\(\\) should return \\$this\\(Mage_Paypal_Model_Standard\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/Standard.php - - - - message: "#^Method Varien_Data_Collection\\:\\:toOptionArray\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/Model/System/Config/Source/MerchantCountry.php - - - - message: "#^Method Mage_Paypal_HostedproController\\:\\:_getIframeBlock\\(\\) should return Mage_Paypal_Block_Hosted_Pro_Iframe but returns Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/controllers/HostedproController.php - - - - message: "#^Method Mage_Paypal_PayflowController\\:\\:_getIframeBlock\\(\\) should return Mage_Paypal_Block_Payflow_Link_Iframe but returns Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/controllers/PayflowController.php - - - - message: "#^Method Mage_Paypal_PayflowadvancedController\\:\\:_getIframeBlock\\(\\) should return Mage_Paypal_Block_Payflow_Advanced_Iframe but returns Mage_Core_Block_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Paypal/controllers/PayflowadvancedController.php - - - - message: "#^Variable \\$key might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Block/ActivePoll.php - - - - message: "#^Variable \\$value might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Block/ActivePoll.php - - - - message: "#^Method Mage_Poll_Model_Poll\\:\\:getPoolId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Model/Poll.php - - - - message: "#^Method Mage_Poll_Model_Poll\\:\\:getRandomId\\(\\) should return string but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Model/Poll.php - - - - message: "#^Method Mage_Poll_Model_Resource_Poll\\:\\:checkAnswerId\\(\\) should return bool but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Model/Resource/Poll.php - - - - message: "#^Method Mage_Poll_Model_Resource_Poll\\:\\:getRandomId\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Model/Resource/Poll.php - - - - message: "#^Method Mage_Poll_Model_Resource_Poll_Answer_Collection\\:\\:countPercent\\(\\) should return \\$this\\(Mage_Poll_Model_Resource_Poll_Answer_Collection\\) but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Poll/Model/Resource/Poll/Answer/Collection.php - - - - message: "#^Method Mage_ProductAlert_Helper_Data\\:\\:createBlock\\(\\) should return string but returns Mage_Core_Block_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/ProductAlert/Helper/Data.php - - - - message: "#^Property Mage_ProductAlert_Model_Email\\:\\:\\$_customer \\(Mage_Customer_Model_Customer\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/ProductAlert/Model/Email.php - - - - message: "#^Property Mage_ProductAlert_Model_Email\\:\\:\\$_priceBlock \\(Mage_ProductAlert_Block_Email_Price\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/ProductAlert/Model/Email.php - - - - message: "#^Property Mage_ProductAlert_Model_Email\\:\\:\\$_stockBlock \\(Mage_ProductAlert_Block_Email_Stock\\) does not accept string\\.$#" - count: 1 - path: ../app/code/core/Mage/ProductAlert/Model/Email.php - - - - message: "#^Method Mage_ProductAlert_Model_Observer\\:\\:process\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/ProductAlert/controllers/AddController.php - - - - message: "#^Return type \\(void\\) of method Mage_ProductAlert_AddController\\:\\:preDispatch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Controller_Front_Action\\)\\) of method Mage_Core_Controller_Front_Action\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/ProductAlert/controllers/AddController.php - - - - message: "#^Method Mage_Rating_Model_Resource_Rating\\:\\:getEntityIdByCode\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Rating/Model/Resource/Rating.php - - - - message: "#^Variable \\$data in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Rating/Model/Resource/Rating.php - - - - message: "#^Method Mage_Rating_Model_Resource_Rating_Collection\\:\\:getItemById\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 2 - path: ../app/code/core/Mage/Rating/Model/Resource/Rating/Collection.php - - - - message: "#^Variable \\$storeId in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Rating/Model/Resource/Rating/Collection.php - - - - message: "#^Method Mage_Rating_Model_Resource_Rating_Entity\\:\\:getIdByCode\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Rating/Model/Resource/Rating/Entity.php - - - - message: "#^Property Mage_Reports_Block_Product_Abstract\\:\\:\\$_indexModel \\(Mage_Reports_Model_Product_Index_Abstract\\) does not accept Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Block/Product/Abstract.php - - - - message: "#^Variable \\$dateStart might not be defined\\.$#" - count: 7 - path: ../app/code/core/Mage/Reports/Helper/Data.php - - - - message: "#^Variable \\$t might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Helper/Data.php - - - - message: "#^Property Mage_Reports_Model_Grouped_Collection\\:\\:\\$_resourceCollection \\(Mage_Core_Model_Resource_Db_Collection_Abstract\\) does not accept Varien_Data_Collection_Db\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Grouped/Collection.php - - - - message: "#^Method Mage_Reports_Model_Resource_Product_Index_Abstract\\:\\:clean\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Product/Index/Abstract.php - - - - message: "#^Property Mage_Reports_Model_Report\\:\\:\\$_reportModel \\(Mage_Reports_Model_Report\\) does not accept Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Report.php - - - - message: "#^Call to an undefined method Mage_Customer_Model_Customer\\:\\:remove\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Resource_Quote_Item_Collection\\:\\:setQuoteFilter\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Customer/Collection.php - - - - message: "#^Call to an undefined method Varien_Data_Collection_Db\\:\\:getResource\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Event.php - - - - message: "#^Method Mage_Reports_Model_Resource_Helper_Mysql4\\:\\:mergeVisitorProductIndex\\(\\) should return string but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Helper/Mysql4.php - - - - message: "#^Method Mage_Reports_Model_Resource_Order_Collection\\:\\:_prepareSummaryAggregated\\(\\) invoked with 4 parameters, 3 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Order/Collection.php - - - - message: "#^Variable \\$productViewEvent might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Product/Collection.php - - - - message: "#^Property Mage_Reports_Model_Resource_Report_Collection\\:\\:\\$_from \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Report/Collection.php - - - - message: "#^Property Mage_Reports_Model_Resource_Report_Collection\\:\\:\\$_to \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Report/Collection.php - - - - message: "#^Comparison operation \"\\!\\=\" between array\\|int and 0 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Report/Product/Viewed/Collection.php - - - - message: "#^Variable \\$currentStoreIds in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Report/Product/Viewed/Collection.php - - - - message: "#^Call to an undefined method Mage_Reports_Model_Resource_Review_Collection\\:\\:_joinFields\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Review/Collection.php - - - - message: "#^Call to an undefined static method Mage_Review_Model_Resource_Review_Collection\\:\\:resetSelect\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Review/Collection.php - - - - message: "#^Method Mage_Reports_Model_Resource_Wishlist_Collection\\:\\:getSharedCount\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Wishlist/Collection.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:setStore\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Resource/Wishlist/Product/Collection.php - - - - message: "#^Property DOMNode\\:\\:\\$nodeValue \\(string\\|null\\) does not accept int\\\\|int\\<1, max\\>\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Test.php - - - - message: "#^Argument of an invalid type Mage_Reports_Model_Report supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: ../app/code/core/Mage/Reports/Model/Totals.php - - - - message: "#^Return type \\(string\\) of method Mage_Review_Block_Form\\:\\:getAction\\(\\) should be compatible with return type \\(Mage_Core_Controller_Varien_Action\\) of method Mage_Core_Block_Abstract\\:\\:getAction\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Review/Block/Form.php - - - - message: "#^Method Mage_Review_Model_Resource_Review\\:\\:getEntityIdByCode\\(\\) should return bool\\|int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Review/Model/Resource/Review.php - - - - message: "#^Method Mage_Review_Model_Resource_Review\\:\\:getTotalReviews\\(\\) should return int but returns string\\.$#" - count: 1 - path: ../app/code/core/Mage/Review/Model/Resource/Review.php - - - - message: "#^Comparison operation \"\\=\\=\" between array\\|null and 1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php - - - - message: "#^Comparison operation \"\\=\\=\" between array\\|null and 2 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php - - - - message: "#^Cannot call method getId\\(\\) on true\\.$#" - count: 1 - path: ../app/code/core/Mage/Rss/Helper/Data.php - - - - message: "#^Offset 'actions'\\|'conditions' on array\\{\\} in isset\\(\\) does not exist\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Abstract.php - - - - message: "#^Call to an undefined method Mage_Rule_Model_Action_Interface\\:\\:getId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Action/Collection.php - - - - message: "#^Call to an undefined method Mage_Rule_Model_Action_Interface\\:\\:setId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Action/Collection.php - - - - message: "#^Call to an undefined method Mage_Rule_Model_Action_Interface\\:\\:setRule\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Action/Collection.php - - - - message: "#^Cannot call method loadArray\\(\\) on Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Action/Collection.php - - - - message: "#^Binary operation \"\\.\" between array and ' ' results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Condition/Abstract.php - - - - message: "#^Variable \\$valueArr in empty\\(\\) always exists and is always falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Condition/Abstract.php - - - - message: "#^Method Mage_Rule_Model_Condition_Abstract\\:\\:loadArray\\(\\) invoked with 2 parameters, 1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Condition/Combine.php - - - - message: "#^Method Mage_Eav_Model_Entity_Attribute_Source_Interface\\:\\:getAllOptions\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php - - - - message: "#^Method Mage_Rule_Model_Condition_Product_Abstract\\:\\:getAttributeObject\\(\\) should return Mage_Catalog_Model_Resource_Eav_Attribute but returns Varien_Object\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php - - - - message: "#^Cannot call method setParentFilter\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Comments.php - - - - message: "#^Property Mage_Sales_Block_Order_Comments\\:\\:\\$_commentCollection \\(Mage_Sales_Model_Resource_Order_Comment_Collection_Abstract\\) does not accept Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Comments.php - - - - message: "#^Property Mage_Sales_Block_Order_Comments\\:\\:\\$_commentCollection \\(Mage_Sales_Model_Resource_Order_Comment_Collection_Abstract\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Comments.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Creditmemo\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Creditmemo.php - - - - message: "#^Call to method setOrderFilter\\(\\) on an unknown class Mage_Sales_Model_Resource_Invoice_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Details.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Email_Creditmemo_Items\\:\\:_prepareItem\\(\\) should be compatible with return type \\(\\$this\\(Mage_Sales_Block_Items_Abstract\\)\\) of method Mage_Sales_Block_Items_Abstract\\:\\:_prepareItem\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Email/Creditmemo/Items.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Email_Invoice_Items\\:\\:_prepareItem\\(\\) should be compatible with return type \\(\\$this\\(Mage_Sales_Block_Items_Abstract\\)\\) of method Mage_Sales_Block_Items_Abstract\\:\\:_prepareItem\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Email/Invoice/Items.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Email_Shipment_Items\\:\\:_prepareItem\\(\\) should be compatible with return type \\(\\$this\\(Mage_Sales_Block_Items_Abstract\\)\\) of method Mage_Sales_Block_Items_Abstract\\:\\:_prepareItem\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Email/Shipment/Items.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Info\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Info.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Invoice\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Invoice.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Print\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Print.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Print_Creditmemo\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Print/Creditmemo.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Print_Invoice\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Print/Invoice.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Print_Shipment\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Print/Shipment.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_Shipment\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/Shipment.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Block_Order_View\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Order/View.php - - - - message: "#^Property Mage_Sales_Block_Recurring_Profiles\\:\\:\\$_profiles \\(Mage_Sales_Model_Resource_Recurring_Profile_Collection\\) does not accept Mage_Core_Model_Resource_Db_Collection_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Block/Recurring/Profiles.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:getClassName\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Config/Ordered.php - - - - message: "#^Call to an undefined method Mage_Sales_Model_Resource_Quote_Collection\\:\\:addAttributeToSelect\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Backend_Region\\:\\:beforeSave\\(\\) should be compatible with return type \\(\\$this\\(Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\)\\) of method Mage_Eav_Model_Entity_Attribute_Backend_Abstract\\:\\:beforeSave\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Backend/Region.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Custbalance\\)\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Custbalance\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Custbalance.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Discount\\)\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Discount\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Discount.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Grand\\)\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Grand\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Grand.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Shipping\\)\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Shipping\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Shipping.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Subtotal\\)\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Subtotal\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Subtotal.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Tax\\)\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend_Tax\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Entity_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Entity/Quote/Address/Attribute/Frontend/Tax.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_addresses \\(iterable\\&Mage_Sales_Model_Resource_Order_Address_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_creditmemos \\(\\(iterable\\&Mage_Sales_Model_Resource_Order_Creditmemo_Collection\\)\\|false\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_invoices \\(Mage_Sales_Model_Resource_Order_Invoice_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_items \\(iterable\\&Mage_Sales_Model_Resource_Order_Item_Collection\\) does not accept null\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_payments \\(iterable\\&Mage_Sales_Model_Resource_Order_Payment_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_shipments \\(Mage_Sales_Model_Resource_Order_Shipment_Collection\\|false\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_statusHistory \\(iterable\\&Mage_Sales_Model_Resource_Order_Status_History_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Property Mage_Sales_Model_Order\\:\\:\\$_tracks \\(Mage_Sales_Model_Resource_Order_Shipment_Track_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order.php - - - - message: "#^Variable \\$oldArea might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Api.php - - - - message: "#^Variable \\$oldStore might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Api.php - - - - message: "#^Cannot call method addAttributeToFilter\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Invoice.php - - - - message: "#^Property Mage_Core_Model_Abstract\\:\\:\\$_origData \\(array\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Invoice.php - - - - message: "#^Property Mage_Sales_Model_Order_Invoice\\:\\:\\$_comments \\(iterable\\&Mage_Sales_Model_Resource_Order_Invoice_Comment_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Invoice.php - - - - message: "#^Property Mage_Sales_Model_Order_Invoice\\:\\:\\$_items \\(iterable\\&Mage_Sales_Model_Resource_Order_Invoice_Item_Collection\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Invoice.php - - - - message: "#^Property Mage_Sales_Model_Order_Invoice\\:\\:\\$_order \\(Mage_Sales_Model_Order\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Invoice.php - - - - message: "#^Property Mage_Sales_Model_Order_Invoice_Item\\:\\:\\$_orderItem \\(Mage_Sales_Model_Order_Item\\) does not accept Varien_Object\\|null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Invoice/Item.php - - - - message: "#^Call to an undefined method Mage_Catalog_Model_Product_Type_Abstract\\:\\:getForceApplyDiscountToParentItem\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Item.php - - - - message: "#^Method Mage_Sales_Model_Order_Payment\\:\\:_addTransaction\\(\\) should return Mage_Sales_Model_Order_Payment_Transaction\\|null but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Payment.php - - - - message: "#^Property Mage_Sales_Model_Order_Payment\\:\\:\\$_canVoidLookup \\(string\\) does not accept bool\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Order/Payment.php - - - - message: "#^Property Mage_Sales_Model_Order_Payment_Transaction\\:\\:\\$_identifiedChildren \\(array\\) does not accept false\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php - - - - message: "#^Property Mage_Sales_Model_Order_Payment_Transaction\\:\\:\\$_order \\(Mage_Sales_Model_Order_Payment\\) does not accept Mage_Sales_Model_Order\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php - - - - message: "#^Property Mage_Sales_Model_Order_Payment_Transaction\\:\\:\\$_order \\(Mage_Sales_Model_Order_Payment\\) does not accept false\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php - - - - message: "#^Property Mage_Sales_Model_Order_Payment_Transaction\\:\\:\\$_parentTransaction \\(\\$this\\(Mage_Sales_Model_Order_Payment_Transaction\\)\\) does not accept Mage_Sales_Model_Order_Payment_Transaction\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php - - - - message: "#^Property Mage_Sales_Model_Order_Payment_Transaction\\:\\:\\$_parentTransaction \\(\\$this\\(Mage_Sales_Model_Order_Payment_Transaction\\)\\) does not accept false\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Order/Payment/Transaction.php - - - - message: "#^Method Mage_Sales_Model_Order_Pdf_Abstract\\:\\:getAlignCenter\\(\\) should return int but returns float\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php - - - - message: "#^Method Mage_Sales_Model_Order_Pdf_Abstract\\:\\:getAlignRight\\(\\) should return int but returns float\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php - - - - message: "#^Variable \\$shippingAddress might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php - - - - message: "#^Variable \\$shippingMethod might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php - - - - message: "#^Variable \\$creditmemo might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php - - - - message: "#^Method Mage_Sales_Model_Order_Pdf_Items_Abstract\\:\\:getSku\\(\\) should return string but returns array\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Items/Abstract.php - - - - message: "#^Variable \\$shipment might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php - - - - message: "#^Call to an undefined method Mage_Eav_Model_Entity_Abstract\\:\\:getStoreId\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Order/Shipment/Api.php - - - - message: "#^Method Mage_Sales_Model_Quote\\:\\:getIsVirtual\\(\\) should return bool but returns int\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote.php - - - - message: "#^Property Mage_Sales_Model_Quote\\:\\:\\$_addresses \\(Mage_Sales_Model_Resource_Order_Address_Collection\\) does not accept Mage_Sales_Model_Resource_Quote_Address_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote.php - - - - message: "#^Variable \\$item might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote.php - - - - message: "#^Variable \\$old in empty\\(\\) always exists and is not falsy\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Quote.php - - - - message: "#^Method Mage_Sales_Model_Quote_Address\\:\\:getItemsCollection\\(\\) should return Mage_Eav_Model_Entity_Collection_Abstract but returns iterable\\&Mage_Sales_Model_Resource_Quote_Address_Item_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address.php - - - - message: "#^Property Mage_Sales_Model_Quote_Address\\:\\:\\$_nominalOnly \\(bool\\) does not accept null\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/Model/Quote/Address.php - - - - message: "#^Variable \\$totalInstance might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Sales/Model/Quote/Address.php - - - - message: "#^Call to an undefined method Varien_Simplexml_Element\\:\\:getClassName\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Collector.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Quote_Address_Total_Discount\\)\\) of method Mage_Sales_Model_Quote_Address_Total_Discount\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Discount.php - - - - message: "#^Return type \\(Mage_Sales_Model_Quote_Address_Total_Grand\\) of method Mage_Sales_Model_Quote_Address_Total_Grand\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Grand.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Quote_Address_Total_Nominal\\)\\) of method Mage_Sales_Model_Quote_Address_Total_Nominal\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Nominal.php - - - - message: "#^Return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Nominal_Shipping\\:\\:fetch\\(\\) should be compatible with return type \\(Mage_Sales_Model_Quote_Address_Total_Shipping\\) of method Mage_Sales_Model_Quote_Address_Total_Shipping\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Nominal/Shipping.php - - - - message: "#^Return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Nominal_Subtotal\\:\\:fetch\\(\\) should be compatible with return type \\(Mage_Sales_Model_Quote_Address_Total_Subtotal\\) of method Mage_Sales_Model_Quote_Address_Total_Subtotal\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Nominal/Subtotal.php - - - - message: "#^Return type \\(Mage_Sales_Model_Quote_Address_Total_Shipping\\) of method Mage_Sales_Model_Quote_Address_Total_Shipping\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php - - - - message: "#^Variable \\$addressQty in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Shipping.php - - - - message: "#^Return type \\(Mage_Sales_Model_Quote_Address_Total_Subtotal\\) of method Mage_Sales_Model_Quote_Address_Total_Subtotal\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Subtotal.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Quote_Address_Total_Tax\\)\\) of method Mage_Sales_Model_Quote_Address_Total_Tax\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Address/Total/Tax.php - - - - message: "#^Method Mage_Sales_Model_Quote_Item\\:\\:__clone\\(\\) with return type void returns \\$this\\(Mage_Sales_Model_Quote_Item\\) but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item.php - - - - message: "#^Method Mage_Sales_Model_Quote_Item\\:\\:save\\(\\) should return \\$this\\(Mage_Sales_Model_Quote_Item\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item.php - - - - message: "#^Property Mage_Sales_Model_Quote_Item\\:\\:\\$_quote \\(Mage_Sales_Model_Quote\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item.php - - - - message: "#^Return type \\(void\\) of method Mage_Sales_Model_Quote_Item\\:\\:__clone\\(\\) should be compatible with return type \\(\\$this\\(Mage_Sales_Model_Quote_Item_Abstract\\)\\) of method Mage_Sales_Model_Quote_Item_Abstract\\:\\:__clone\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item.php - - - - message: "#^Method Mage_Sales_Model_Quote_Item_Abstract\\:\\:__clone\\(\\) with return type void returns \\$this\\(Mage_Sales_Model_Quote_Item_Abstract\\) but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php - - - - message: "#^Method Mage_Sales_Model_Quote_Item_Abstract\\:\\:getParentItem\\(\\) should return \\$this\\(Mage_Sales_Model_Quote_Item_Abstract\\) but returns Mage_Sales_Model_Quote_Item_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php - - - - message: "#^Property Mage_Sales_Model_Quote_Item_Abstract\\:\\:\\$_parentItem \\(Mage_Sales_Model_Quote_Item_Abstract\\) does not accept null\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php - - - - message: "#^Method Mage_Sales_Model_Quote_Item_Option\\:\\:__clone\\(\\) with return type void returns \\$this\\(Mage_Sales_Model_Quote_Item_Option\\) but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Quote/Item/Option.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:canGetRecurringProfileDetails\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Recurring/Profile.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:submitRecurringProfile\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Recurring/Profile.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Method_Abstract\\:\\:updateRecurringProfileStatus\\(\\)\\.$#" - count: 3 - path: ../app/code/core/Mage/Sales/Model/Recurring/Profile.php - - - - message: "#^Method Mage_Sales_Model_Recurring_Profile\\:\\:_getItem\\(\\) should return Mage_Sales_Model_Order_Item but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Recurring/Profile.php - - - - message: "#^Cannot call method updateOnRelatedRecordChanged\\(\\) on Mage_Core_Model_Resource_Db_Collection_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Order/Address.php - - - - message: "#^Call to an undefined method Mage_Core_Model_Abstract\\:\\:isFailsafe\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Order/Payment/Transaction.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Custbalance\\)\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Custbalance\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Quote/Address/Attribute/Frontend/Custbalance.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Discount\\)\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Discount\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Quote/Address/Attribute/Frontend/Discount.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Grand\\)\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Grand\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Quote/Address/Attribute/Frontend/Grand.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Shipping\\)\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Shipping\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Quote/Address/Attribute/Frontend/Shipping.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Subtotal\\)\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Subtotal\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Quote/Address/Attribute/Frontend/Subtotal.php - - - - message: "#^Return type \\(\\$this\\(Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Tax\\)\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend_Tax\\:\\:fetchTotals\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Resource_Quote_Address_Attribute_Frontend\\:\\:fetchTotals\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Quote/Address/Attribute/Frontend/Tax.php - - - - message: "#^Comparison operation \"\\!\\=\" between array\\|int and 0 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers/Collection.php - - - - message: "#^Variable \\$currentStoreIds in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers/Collection.php - - - - message: "#^Call to an undefined method Varien_Db_Adapter_Interface\\:\\:listTables\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Resource/Setup.php - - - - message: "#^Call to an undefined method Mage_Payment_Model_Recurring_Profile\\:\\:submit\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/Model/Service/Quote.php - - - - message: "#^Method Mage_Sales_Billing_AgreementController\\:\\:preDispatch\\(\\) should return \\$this\\(Mage_Sales_Billing_AgreementController\\) but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/controllers/Billing/AgreementController.php - - - - message: "#^Variable \\$billingAgreement might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Sales/controllers/Billing/AgreementController.php - - - - message: "#^Comparison operation \"\\!\\=\" between int and \\(array\\|string\\) results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/controllers/DownloadController.php - - - - message: "#^Method Mage_Sales_Recurring_ProfileController\\:\\:preDispatch\\(\\) should return \\$this\\(Mage_Sales_Recurring_ProfileController\\) but empty return statement found\\.$#" - count: 1 - path: ../app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php - - - - message: "#^Return type \\(Mage_SalesRule_Model_Quote_Discount\\) of method Mage_SalesRule_Model_Quote_Discount\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Quote/Discount.php - - - - message: "#^Return type \\(Mage_SalesRule_Model_Quote_Freeshipping\\) of method Mage_SalesRule_Model_Quote_Freeshipping\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Quote/Freeshipping.php - - - - message: "#^Return type \\(array\\) of method Mage_SalesRule_Model_Quote_Nominal_Discount\\:\\:fetch\\(\\) should be compatible with return type \\(Mage_SalesRule_Model_Quote_Discount\\) of method Mage_SalesRule_Model_Quote_Discount\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Quote/Nominal/Discount.php - - - - message: "#^Binary operation \"\\+\\=\" between string and \\-1\\|1 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Resource/Coupon/Usage.php - - - - message: "#^Method Mage_SalesRule_Model_Resource_Report_Collection\\:\\:_applyRulesFilter\\(\\) should return \\$this\\(Mage_SalesRule_Model_Resource_Report_Collection\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Resource/Report/Collection.php - - - - message: "#^Return type \\(Mage_SalesRule_Model_Rule_Condition_Product_Combine\\) of method Mage_SalesRule_Model_Rule\\:\\:getActionsInstance\\(\\) should be compatible with return type \\(Mage_Rule_Model_Action_Collection\\) of method Mage_Rule_Model_Abstract\\:\\:getActionsInstance\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Rule.php - - - - message: "#^Return type \\(string\\) of method Mage_SalesRule_Model_Rule_Condition_Product_Attribute_Assigned\\:\\:getOperatorName\\(\\) should be compatible with return type \\(array\\) of method Mage_Rule_Model_Condition_Abstract\\:\\:getOperatorName\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Attribute/Assigned.php - - - - message: "#^Call to an undefined method Mage_Rule_Model_Action_Collection\\:\\:validate\\(\\)\\.$#" - count: 2 - path: ../app/code/core/Mage/SalesRule/Model/Validator.php - - - - message: "#^Call to an undefined method Mage_Shipping_Model_Carrier_Abstract\\:\\:_getQuotes\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Abstract.php - - - - message: "#^Call to an undefined method Mage_Shipping_Model_Carrier_Abstract\\:\\:_setFreeMethodRequest\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Abstract.php - - - - message: "#^Method Mage_Shipping_Model_Carrier_Abstract\\:\\:checkAvailableShipCountries\\(\\) should return \\$this\\(Mage_Shipping_Model_Carrier_Abstract\\)\\|bool\\|Mage_Core_Model_Abstract but returns Mage_Shipping_Model_Rate_Result_Error\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Abstract.php - - - - message: "#^Property Mage_Shipping_Model_Carrier_Abstract\\:\\:\\$_numBoxes \\(int\\) does not accept float\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Abstract.php - - - - message: "#^Variable \\$rate in empty\\(\\) is never defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Pickup.php - - - - message: "#^Method Mage_Shipping_Model_Carrier_Tablerate\\:\\:getRate\\(\\) should return Mage_Core_Model_Abstract but returns array\\|bool\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php - - - - message: "#^Variable \\$rate in empty\\(\\) always exists and is not falsy\\.$#" - count: 3 - path: ../app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php - - - - message: "#^Return type \\(void\\) of method Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection\\:\\:_initSelect\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Model_Resource_Db_Collection_Abstract\\)\\) of method Mage_Core_Model_Resource_Db_Collection_Abstract\\:\\:_initSelect\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Resource/Carrier/Tablerate/Collection.php - - - - message: "#^Comparison operation \"\\<\" between \\(array\\|float\\|int\\) and float results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Shipping.php - - - - message: "#^Comparison operation \"\\>\" between \\(array\\|float\\|int\\) and float results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Shipping.php - - - - message: "#^Variable \\$sumResults in empty\\(\\) always exists and is not falsy\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Shipping.php - - - - message: "#^Call to an undefined method Mage_Shipping_Model_Rate_Result\\:\\:getAllTrackings\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Shipping/Model/Tracking/Result.php - - - - message: "#^Method Mage_Tag_Model_Resource_Tag_Collection\\:\\:addPopularity\\(\\) invoked with 2 parameters, 0\\-1 required\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Block/Customer/Tags.php - - - - message: "#^Variable \\$tags in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Block/Customer/Tags.php - - - - message: "#^Method Mage_Tag_Block_Product_List\\:\\:_beforeToHtml\\(\\) should return \\$this\\(Mage_Tag_Block_Product_List\\) but returns false\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Block/Product/List.php - - - - message: "#^Property Mage_Tag_Block_Product_Result\\:\\:\\$_productCollection \\(Mage_Tag_Model_Resource_Tag_Collection\\) does not accept Mage_Tag_Model_Resource_Product_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Block/Product/Result.php - - - - message: "#^Variable \\$result might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Api.php - - - - message: "#^Parameter \\#1 \\$data \\(object\\) of method Mage_Tag_Model_Api_V2\\:\\:_prepareDataForAdd\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Tag_Model_Api\\:\\:_prepareDataForAdd\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Api/V2.php - - - - message: "#^Parameter \\#1 \\$data \\(object\\) of method Mage_Tag_Model_Api_V2\\:\\:_prepareDataForUpdate\\(\\) should be compatible with parameter \\$data \\(array\\) of method Mage_Tag_Model_Api\\:\\:_prepareDataForUpdate\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Api/V2.php - - - - message: "#^Return type \\(object\\) of method Mage_Tag_Model_Api_V2\\:\\:info\\(\\) should be compatible with return type \\(array\\) of method Mage_Tag_Model_Api\\:\\:info\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Api/V2.php - - - - message: "#^Access to an undefined property Mage_Tag_Model_Entity_Customer_Collection\\:\\:\\$_read\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Entity/Customer/Collection.php - - - - message: "#^Variable \\$productsSku might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Resource/Customer/Collection.php - - - - message: "#^Variable \\$result might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tag/Model/Tag.php - - - - message: "#^Call to an undefined method Mage_Tax_Block_Sales_Order_Tax\\:\\:addTotal\\(\\)\\.$#" - count: 7 - path: ../app/code/core/Mage/Tax/Block/Sales/Order/Tax.php - - - - message: "#^Call to an undefined method Mage_Tax_Block_Sales_Order_Tax\\:\\:removeTotal\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Block/Sales/Order/Tax.php - - - - message: "#^Property Mage_Tax_Block_Sales_Order_Tax\\:\\:\\$_source \\(Mage_Sales_Model_Order_Invoice\\) does not accept Mage_Sales_Model_Order\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Block/Sales/Order/Tax.php - - - - message: "#^Call to an undefined method Mage_Core_Model_App\\:\\:getOrder\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Helper/Data.php - - - - message: "#^Method Mage_Tax_Helper_Data\\:\\:needPriceConversion\\(\\) should return int\\|false but returns bool\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Helper/Data.php - - - - message: "#^Property Mage_Tax_Model_Calculation\\:\\:\\$_customer \\(Mage_Customer_Model_Customer\\) does not accept false\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Calculation.php - - - - message: "#^Property Mage_Tax_Model_Calculation\\:\\:\\$_defaultCustomerTaxClass \\(string\\) does not accept int\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Calculation.php - - - - message: "#^Property Mage_Tax_Model_Calculation_Rate\\:\\:\\$_titles \\(array\\) does not accept Mage_Tax_Model_Resource_Calculation_Rate_Title_Collection\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Calculation/Rate.php - - - - message: "#^Method Mage_Tax_Model_Config_Notification\\:\\:_getConfig\\(\\) should return Mage_Core_Model_Config_Data but returns bool\\|Mage_Core_Model_Abstract\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Config/Notification.php - - - - message: "#^Call to an undefined static method Mage_Core_Model_Config_Data\\:\\:afterSave\\(\\)\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Config/Price/Include.php - - - - message: "#^Variable \\$selectClone might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Tax/Model/Resource/Calculation.php - - - - message: "#^Variable \\$zipFrom might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Resource/Calculation.php - - - - message: "#^Variable \\$zipTo might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Resource/Calculation.php - - - - message: "#^Return type \\(void\\) of method Mage_Tax_Model_Sales_Total_Quote_Discount\\:\\:collect\\(\\) should be compatible with return type \\(\\$this\\(Mage_Sales_Model_Quote_Address_Total_Abstract\\)\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:collect\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Discount.php - - - - message: "#^Return type \\(array\\) of method Mage_Tax_Model_Sales_Total_Quote_Nominal_Tax\\:\\:fetch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Tax_Model_Sales_Total_Quote_Tax\\)\\) of method Mage_Tax_Model_Sales_Total_Quote_Tax\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Nominal/Tax.php - - - - message: "#^Return type \\(\\$this\\(Mage_Tax_Model_Sales_Total_Quote_Tax\\)\\) of method Mage_Tax_Model_Sales_Total_Quote_Tax\\:\\:fetch\\(\\) should be compatible with return type \\(array\\) of method Mage_Sales_Model_Quote_Address_Total_Abstract\\:\\:fetch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$baseRowTax might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$baseTax might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$baseTaxBeforeDiscountRounded might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$baseUnitTax might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$rowTax might not be defined\\.$#" - count: 3 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$tax might not be defined\\.$#" - count: 2 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$taxBeforeDiscountRounded might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Variable \\$unitTax might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php - - - - message: "#^Binary operation \"\\*\" between string and 1024 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Uploader/Helper/File.php - - - - message: "#^Binary operation \"\\*\" between string and 1048576 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Uploader/Helper/File.php - - - - message: "#^Binary operation \"\\*\" between string and 1073741824 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Uploader/Helper/File.php - - - - message: "#^Binary operation \"\\*\" between string and 1099511627776 results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Uploader/Helper/File.php - - - - message: "#^Method Mage_Widget_Block_Adminhtml_Widget_Chooser\\:\\:getConfig\\(\\) should return Varien_Object but returns mixed\\.$#" - count: 2 - path: ../app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php - - - - message: "#^Variable \\$options might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php - - - - message: "#^Variable \\$productsOptions might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php - - - - message: "#^Cannot call method toOptionArray\\(\\) on Mage_Core_Model_Abstract\\|false\\.$#" - count: 1 - path: ../app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php - - - - message: "#^Variable \\$template might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Widget/Model/Widget/Instance.php - - - - message: "#^Return type \\(void\\) of method Mage_Wishlist_Block_Customer_Sharing\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Block_Abstract\\)\\) of method Mage_Core_Block_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/Block/Customer/Sharing.php - - - - message: "#^Return type \\(void\\) of method Mage_Wishlist_Block_Customer_Wishlist\\:\\:_prepareLayout\\(\\) should be compatible with return type \\(\\$this\\(Mage_Catalog_Block_Product_Abstract\\)\\) of method Mage_Catalog_Block_Product_Abstract\\:\\:_prepareLayout\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/Block/Customer/Wishlist.php - - - - message: "#^Parameter \\#1 \\$item \\(Mage_Wishlist_Model_Item\\) of method Mage_Wishlist_Block_Share_Email_Items\\:\\:hasDescription\\(\\) should be compatible with parameter \\$item \\(Mage_Catalog_Model_Product\\) of method Mage_Wishlist_Block_Abstract\\:\\:hasDescription\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/Block/Share/Email/Items.php - - - - message: "#^Method Mage_Wishlist_Model_Item\\:\\:save\\(\\) should return \\$this\\(Mage_Wishlist_Model_Item\\) but return statement is missing\\.$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/Model/Item.php - - - - message: "#^Variable \\$buyRequest in empty\\(\\) always exists and is not falsy\\.$#" - count: 2 - path: ../app/code/core/Mage/Wishlist/Model/Item.php - - - - message: "#^Method Mage_Wishlist_Model_Item_Option\\:\\:__clone\\(\\) with return type void returns \\$this\\(Mage_Wishlist_Model_Item_Option\\) but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/Model/Item/Option.php - - - - message: "#^Variable \\$item might not be defined\\.$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/Model/Wishlist.php - - - - message: "#^Comparison operation \"\\!\\=\" between int and \\(array\\|string\\) results in an error\\.$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/controllers/IndexController.php - - - - message: "#^Method Mage_Wishlist_IndexController\\:\\:_addItemToWishList\\(\\) with return type void returns mixed but should not return anything\\.$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/controllers/IndexController.php - - - - message: "#^Method Mage_Wishlist_IndexController\\:\\:downloadCustomOptionAction\\(\\) with return type void returns mixed but should not return anything\\.$#" - count: 3 - path: ../app/code/core/Mage/Wishlist/controllers/IndexController.php - - - - message: "#^Return type \\(void\\) of method Mage_Wishlist_IndexController\\:\\:preDispatch\\(\\) should be compatible with return type \\(\\$this\\(Mage_Core_Controller_Front_Action\\)\\) of method Mage_Core_Controller_Front_Action\\:\\:preDispatch\\(\\)$#" - count: 1 - path: ../app/code/core/Mage/Wishlist/controllers/IndexController.php diff --git a/.github/phpstan.neon b/.github/phpstan.neon deleted file mode 100644 index 95ace89b5b8..00000000000 --- a/.github/phpstan.neon +++ /dev/null @@ -1,54 +0,0 @@ -includes: - - ../vendor/macopedia/phpstan-magento1/extension.neon - - phpstan-baseline.neon -parameters: - phpVersion: 80000 # PHP 8.0 - magentoRootPath: %currentWorkingDirectory% - paths: - - %currentWorkingDirectory%/app/code/core/Mage - excludePaths: - #todo DOCblocks - - %currentWorkingDirectory%/app/code/core/Mage/Centinel - - %currentWorkingDirectory%/app/code/core/Mage/PaypalUk - - %currentWorkingDirectory%/app/code/core/Mage/Usa - - %currentWorkingDirectory%/app/code/core/Mage/Weee - - #incompatible interfaces - - */app/code/core/Mage/Admin/Model/Acl/Assert/Ip.php - - */app/code/core/Mage/Admin/Model/Acl/Assert/Time.php - - */app/code/core/Mage/Api/Model/Acl/Assert/Ip.php - - */app/code/core/Mage/Api/Model/Acl/Assert/Time.php - - */app/code/core/Mage/Adminhtml/Block/Widget/Grid/Block.php - - */app/code/core/Mage/Core/Model/Mysql4/Design/Theme/Collection.php - - # deprecated _getHelper() - - */app/code/core/Mage/Adminhtml/Controller/Rss/Abstract.php - - */app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php - - */app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php - - # contains 1 abstract method and must therefore be declared abstract or implement the remaining methods - - */app/code/core/Mage/Dataflow/Model/Session/Adapter/Http.php - - */app/code/core/Mage/Dataflow/Model/Convert/Iterator/Http.php - - */app/code/core/Mage/Dataflow/Model/Convert/Iterator/File/Csv.php - - # Cannot declare class Varien_Date, because the name is already in use - - */app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php - - # Class phpseclib\Net\SSH2 not found. - - */Paypal/Model/Report/Settlement.php - - # Class backup/db was not found while trying to analyse it - - */Adminhtml/controllers/System/BackupController.php - - # Dataflow/Model/Convert/Iterator.php - - */Dataflow/Model/Convert/Iterator.php - - # Too much noise from "Variable $this might not be defined" - - */app/code/core/*/*/data/* - - */app/code/core/*/*/sql/* - level: 3 - checkFunctionNameCase: true - checkInternalClassCaseSensitivity: true - -# universalObjectCratesClasses: -# - Varien_Object diff --git a/.github/phpstan_experimental_level.neon b/.github/phpstan_experimental_level.neon deleted file mode 100644 index 76a004ba3d4..00000000000 --- a/.github/phpstan_experimental_level.neon +++ /dev/null @@ -1,9 +0,0 @@ -includes: - - phpstan.neon -parameters: - paths: - - %currentWorkingDirectory%/app/code/core/Mage - - %currentWorkingDirectory%/lib/Mage - - %currentWorkingDirectory%/lib/Magento - - %currentWorkingDirectory%/lib/Varien - level: 4 diff --git a/.github/workflows/check-files.yml b/.github/workflows/check-files.yml new file mode 100644 index 00000000000..ac14aa845bc --- /dev/null +++ b/.github/workflows/check-files.yml @@ -0,0 +1,133 @@ +name: File checker + +on: + workflow_call: + outputs: + composer: + description: "Count changed Composer files" + value: ${{ jobs.check.outputs.composer }} + php: + description: "Count changed PHP files" + value: ${{ jobs.check.outputs.php }} + xml: + description: "Count changed XML files" + value: ${{ jobs.check.outputs.xml }} + workflow: + description: "Count changed Workflow files" + value: ${{ jobs.check.outputs.workflow }} + phpcs: + description: "Count changed PHPCS files" + value: ${{ jobs.check.outputs.phpcs }} + php-cs-fixer: + description: "Count changed PHP-CS-Fixer files" + value: ${{ jobs.check.outputs.php-cs-fixer }} + phpstan: + description: "Count changed PHPStan files" + value: ${{ jobs.check.outputs.phpstan }} + phpunit-test: + description: "Count changed PhpUnit test files" + value: ${{ jobs.check.outputs.phpunit-test }} + phpunit: + description: "Count changed PhpUnit files" + value: ${{ jobs.check.outputs.phpunit }} + sonar: + description: "Count changed Sonar files" + value: ${{ jobs.check.outputs.sonar }} + # Allow manually triggering the workflow. + workflow_dispatch: + +jobs: + check: + name: Changed + runs-on: [ubuntu-latest] + outputs: + composer: ${{ steps.all.outputs.composer }} + php: ${{ steps.all.outputs.php }} + xml: ${{ steps.all.outputs.xml }} + workflow: ${{ steps.all.outputs.workflow }} + phpcs: ${{ steps.all.outputs.phpcs }} + php-cs-fixer: ${{ steps.all.outputs.php-cs-fixer }} + phpstan: ${{ steps.all.outputs.phpstan }} + phpunit-test: ${{ steps.all.outputs.phpunit-test }} + phpunit: ${{ steps.all.outputs.phpunit }} + sonar: ${{ steps.all.outputs.sonar }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Get changed files + id: changed-files-specific + uses: tj-actions/changed-files@v35 + with: + files: | + composer.* + *.php + **/*.php + **/*.xml + .github/workflows/** + **phpcs** + **php-cs-fixer** + **phpstan** + dev/tests/ + dev/phpunit* + dev/sonar* + + - name: Run step if any file(s) changed + id: all + if: steps.changed-files-specific.outputs.any_modified == 'true' + run: | + echo "One or more files have changed." + + count="$(grep -oE "composer.*" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count Composer file(s) changed" + echo "composer=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "*.php" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count PHP file(s) changed" + echo "php=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "*.xml" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count XML file(s) changed" + echo "xml=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE ".github/workflows/**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count Workflow file(s) changed" + echo "workflow=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "**phpcs**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count PHPCS file(s) changed" + echo "phpcs=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "**php-cs-fixer**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count PHP-CS-Fixer file(s) changed" + echo "php-cs-fixer=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "**phpstan**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count PHPStan file(s) changed" + echo "phpstan=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "dev/tests/" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count UnitTest test file(s) changed" + echo "phpunit-test=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "dev/phpunit*" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count UnitTest file(s) changed" + echo "phpunit=$count" >> $GITHUB_OUTPUT + + count="$(grep -oE "dev/sonar*" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)" + echo "$count Sonar file(s) changed" + echo "sonar=$count" >> $GITHUB_OUTPUT diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000000..75bc27f3bbc --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,76 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "1.9.4.x", 20.0 ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "1.9.4.x", 20.0 ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + config-file: ./.github/codeql-config.yml + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/composer.yml b/.github/workflows/composer.yml new file mode 100644 index 00000000000..56929a37c25 --- /dev/null +++ b/.github/workflows/composer.yml @@ -0,0 +1,29 @@ +name: Composer + +on: + workflow_call: + # Allow manually triggering the workflow. + workflow_dispatch: + +jobs: + composer: + name: Validation + runs-on: [ubuntu-latest] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Validate composer + run: composer validate --strict diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index e859a082bdf..d0f7a216412 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -7,13 +7,15 @@ name: Labeler on: - - pull_request_target + pull_request_target: jobs: triage: + name: Add labels runs-on: [ubuntu-latest] steps: - uses: actions/labeler@main with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true continue-on-error: true diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml new file mode 100644 index 00000000000..4152b027db8 --- /dev/null +++ b/.github/workflows/php-cs-fixer.yml @@ -0,0 +1,32 @@ +name: PHP-CS-Fixer + +on: + workflow_call: + # Allow manually triggering the workflow. + workflow_dispatch: + +jobs: + php-cs-fixer: + name: Validation + runs-on: [ubuntu-latest] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* + + - name: PHP-CS-Fixer + run: php vendor/bin/php-cs-fixer fix --diff --dry-run diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 2d9a18be9ae..b5cbc73d155 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -1,50 +1,35 @@ -name: "PHPCodeSniffer Code Style Analyses" +name: PHPCS on: - # Run on all pushes and on all pull requests. - # Prevent the build from running when there are only irrelevant changes. - push: - paths: - - '**.php' - - '.github/phpcs*' - - '.github/workflows/phpcs*' - pull_request: - paths: - - '**.php' - - '.github/phpcs*' - - '.github/workflows/phpcs*' + workflow_call: # Allow manually triggering the workflow. workflow_dispatch: jobs: phpcs: + name: ${{ matrix.rules.label }} runs-on: [ubuntu-latest] strategy: matrix: - paths: [ - 'app/code/core/Mage/', - 'lib/Mage/', - 'lib/Magento/', - 'lib/Varien/', - 'app/code/community/' - ] - - name: PHPCodeSniffer ${{ matrix.paths }} + rules: + - label: Default + path: .phpcs.xml.dist + - label: Ecg + path: .phpcs.ecg.xml.dist + - label: PhpCompatibility + path: .phpcs.php.xml.dist steps: - name: Checkout code uses: actions/checkout@v3 - - name: Validate composer - run: composer validate --strict - - name: Get composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -54,5 +39,5 @@ jobs: run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* - name: PHPCodeSniffer - run: php vendor/bin/phpcs -s --report=full --standard=.github/phpcs-ruleset.xml ${{ matrix.paths }} - continue-on-error: ${{ matrix.paths == 'app/code/community/' }} + run: php vendor/bin/phpcs -s --report=full --standard=${{ matrix.rules.path }} + continue-on-error: ${{ matrix.rules.path != '.github/phpcs-ruleset.xml' }} diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 0e67b9bf619..143f5696e2a 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -1,43 +1,24 @@ -name: "PHPStan Static Code Analyses" +name: PHPStan on: - # Run on all pushes and on all pull requests. - # Prevent the build from running when there are only irrelevant changes. - push: - paths: - - '**.php' - pull_request: - paths: - - '**.php' + workflow_call: # Allow manually triggering the workflow. workflow_dispatch: jobs: - php_stan: + phpstan: + name: Analyze runs-on: [ubuntu-latest] - strategy: - matrix: - config_files: [ - '.github/phpstan.neon', - '.github/phpstan_experimental_level.neon' - ] - - name: PHP Stan ${{ matrix.config_files }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Validate composer - run: composer validate --strict + - uses: actions/checkout@v3 - name: Get composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -46,9 +27,5 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* - - name: ensure existance of ./app/code/local - run: mkdir -p app/code/local - - name: PHPStan Static Analysis - run: php vendor/bin/phpstan.phar analyze -c ${{ matrix.config_files }} - continue-on-error: ${{ matrix.config_files == '.github/phpstan_experimental_level.neon' }} + run: XDEBUG_MODE=off php vendor/bin/phpstan.phar analyze diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 92f92825ee7..9e3441786aa 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -1,14 +1,10 @@ -name: OpenMage LTS - Unit Tests +name: PHPUnit on: - # Run on all pushes and on all pull requests. - # Prevent the build from running when there are only irrelevant changes. - push: - paths: - - '**.php' - pull_request: - paths: - - '**.php' + # Run automatically every Monday on midnight. + schedule: + - cron: '0 0 * * 1' + workflow_call: # Allow manually triggering the workflow. workflow_dispatch: @@ -30,7 +26,7 @@ jobs: run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -52,7 +48,7 @@ jobs: run: bash ./run_unit_tests.sh - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1.6 + uses: EnricoMi/publish-unit-test-result-action@v1.40 if: always() continue-on-error: true with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000..640090719a1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Release builder + +on: + release: + types: [created] + +jobs: + release_build: + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: ['7.3'] + steps: + - name: Checkout repository + uses: actions/checkout@master + + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: ${{ runner.os }}-composer- + + - name: Composer install + run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-* --no-dev + + - name: Create ZIP file + run: zip -rq openmage-${{ github.event.release.tag_name }}.zip . -x '.git/*' + + - name: Attach ZIP to GitHub release + uses: svenstaro/upload-release-action@master + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openmage-${{ github.event.release.tag_name }}.zip + tag: ${{ github.event.release.tag_name }} + overwrite: true diff --git a/.github/workflows/security-php.yml b/.github/workflows/security-php.yml index 6cd27c8b256..58599bcf243 100644 --- a/.github/workflows/security-php.yml +++ b/.github/workflows/security-php.yml @@ -1,4 +1,4 @@ -name: "PHP Security Check" +name: PHP Security Check on: # Run automatically every Monday on midnight. @@ -18,10 +18,10 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: cache-db with: path: ~/.symfony/cache key: db - - uses: symfonycorp/security-checker-action@v4 + - uses: symfonycorp/security-checker-action@v5 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index df569949363..676b63e8e43 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -1,15 +1,12 @@ -name: OpenMage LTS - Sonar - Full Analyses +name: Sonar on: - # Run on all pushes and on all pull requests. - # Prevent the build from running when there are only irrelevant changes. - push: - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - types: [opened, synchronize, reopened] + # Run automatically every Monday on midnight. + schedule: + - cron: '0 0 * * 1' + workflow_call: + # Allow manually triggering the workflow. + workflow_dispatch: jobs: unit: @@ -33,15 +30,12 @@ jobs: env: COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Validate composer - run: composer validate --strict - - name: Get composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/syntax-php.yml b/.github/workflows/syntax-php.yml index c7eb13f2ad2..8f3007721cd 100644 --- a/.github/workflows/syntax-php.yml +++ b/.github/workflows/syntax-php.yml @@ -1,21 +1,15 @@ -name: "PHP Syntax Check" +name: PHP Syntax on: - # Run on all pushes and on all pull requests. - # Prevent the build from running when there are only irrelevant changes. - push: - paths: - - '**.php' - - '**.phtml' - pull_request: - paths: - - '**.php' - - '**.phtml' + # Run automatically every Monday on midnight. + schedule: + - cron: '0 0 * * 1' + workflow_call: # Allow manually triggering the workflow. workflow_dispatch: jobs: - php_syntax: + syntax_php: runs-on: [ubuntu-latest] strategy: diff --git a/.github/workflows/syntax-xml.yml b/.github/workflows/syntax-xml.yml index d7f8af924ae..51819c3572b 100644 --- a/.github/workflows/syntax-xml.yml +++ b/.github/workflows/syntax-xml.yml @@ -1,21 +1,18 @@ -name: XML Validation +name: XML Syntax on: - # Run on all pushes and on all pull requests. - # Prevent the build from running when there are only irrelevant changes. - push: - paths: - - '**.xml' - pull_request: - paths: - - '**.xml' + # Run automatically every Monday on midnight. + schedule: + - cron: '0 0 * * 1' + workflow_call: # Allow manually triggering the workflow. workflow_dispatch: jobs: - validate: + syntax_xml: + name: XML Validation runs-on: [ubuntu-latest] - + steps: - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 00000000000..75421d666a8 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,119 @@ +name: CI + +on: + push: + paths: + - '.github/workflows/*' + - 'composer.json' + - 'composer.lock' + - '**.php' + - '**.xml' + - '.php-cs-fixer.dist.php' + - '.phpcs.xml.dist' + - '.phpcs.ecg.xml.dist' + - '.phpcs.php.xml.dist' + - 'phpstan.dist.neon' + - 'phpstan.dist.baseline.neon' + + pull_request: + paths: + - '.github/workflows/*' + - 'composer.json' + - 'composer.lock' + - '**.php' + - '**.xml' + - '.php-cs-fixer.dist.php' + - '.phpcs.xml.dist' + - '.phpcs.ecg.xml.dist' + - '.phpcs.php.xml.dist' + - 'phpstan.dist.neon' + - 'phpstan.dist.baseline.neon' + +jobs: + debug: + name: Debug + runs-on: [ubuntu-latest] + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJSON(github) }} + run: echo "$GITHUB_CONTEXT" + + check: + name: Check files + uses: ./.github/workflows/check-files.yml + + composer: + name: Composer + needs: [check] +# if: | +# needs.check.outputs.composer > 0 || +# needs.check.outputs.workflow > 0 + uses: ./.github/workflows/composer.yml + + phpcs: + name: PHPCS + needs: [check, composer] + if: | + needs.check.outputs.php > 0 || + needs.check.outputs.phpcs > 0 || + needs.check.outputs.composer > 0 || + needs.check.outputs.workflow > 0 + uses: ./.github/workflows/phpcs.yml + + php-cs-fixer: + name: PHP-CS-Fixer + needs: [check, composer] + if: | + needs.check.outputs.php > 0 || + needs.check.outputs.php-cs-fixer > 0 || + needs.check.outputs.composer > 0 || + needs.check.outputs.workflow > 0 + uses: ./.github/workflows/php-cs-fixer.yml + + phpstan: + name: PHPStan + needs: [check, composer, phpcs, php-cs-fixer] + if: | + needs.check.outputs.php > 0 || + needs.check.outputs.phpstan > 0 || + needs.check.outputs.composer > 0 || + needs.check.outputs.workflow > 0 + uses: ./.github/workflows/phpstan.yml + + # DOES NOT run by default + # runs on schedule or when worklfow changed + syntax_php: + name: Syntax + needs: [check, phpcs, php-cs-fixer] + if: needs.check.outputs.workflow > 0 + uses: ./.github/workflows/syntax-php.yml + + syntax_xml: + name: Syntax + needs: [check] + if: needs.check.outputs.xml > 0 + uses: ./.github/workflows/syntax-xml.yml + + # DOES NOT run by default + # runs on schedule or when worklfow or unit tests changed + sonar: + name: Sonar Unit Tests + needs: [check, phpcs, php-cs-fixer] + if: | + needs.check.outputs.phpunit-test > 0 || + needs.check.outputs.phpunit > 0 || + needs.check.outputs.sonar > 0 || + needs.check.outputs.workflow > 0 + uses: ./.github/workflows/sonar.yml + + # DOES NOT run by default + # runs on schedule or when worklfow or unit tests changed + unit_tests: + name: OpenMage LTS - Unit Tests + needs: [check, sonar] + if: | + needs.check.outputs.phpunit-test > 0 || + needs.check.outputs.phpunit > 0 || + needs.check.outputs.workflow > 0 + uses: ./.github/workflows/phpunit.yml diff --git a/.gitignore b/.gitignore index c320218feb8..e74e2574e9c 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,20 @@ # .phar (n98-magerun, ...) *.phar + +# PHP-CS-Fixer cache +.php-cs-fixer.cache + +# Ignore custom config files +.php-cs-fixer* +!.php-cs-fixer.dist.* + +.phpcs*.xml +!.phpcs*.xml.dist + +phpstan*.neon +!phpstan.dist.*.neon + +# dev scripts loaded via composer +/shell/update-copyright.php +/shell/translations.php diff --git a/.htaccess b/.htaccess index a06ae0a53b9..18638ff6e2c 100644 --- a/.htaccess +++ b/.htaccess @@ -218,7 +218,7 @@ Order allow,deny Deny from all - + Order allow,deny Deny from all diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 00000000000..653d7c3268e --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,107 @@ +setRules([ + // There MUST be one blank line after the namespace declaration. + 'blank_line_after_namespace' => true, + // Ensure there is no code on the same line as the PHP open tag and it is followed by a blank line. + 'blank_line_after_opening_tag' => true, + // The body of each structure MUST be enclosed by braces. Braces should be properly placed. Body of braces should be properly indented. + 'braces' => true, + // Whitespace around the keywords of a class, trait or interfaces definition should be one space. + 'class_definition' => true, + // Remove extra spaces in a nullable typehint. + 'compact_nullable_typehint' => true, + // The PHP constants `true`, `false`, and `null` MUST be written using the correct casing. + 'constant_case' => true, + // Equal sign in declare statement should be surrounded by spaces or not following configuration. + 'declare_equal_normalize' => true, + // The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words. + 'elseif' => true, + // PHP code MUST use only UTF-8 without BOM (remove BOM). + 'encoding' => true, + // PHP code must use the long ` true, + // Spaces should be properly placed in a function declaration. + 'function_declaration' => true, + // Code MUST use configured indentation type. + 'indentation_type' => true, + // All PHP files must use same line ending. + 'line_ending' => true, + // Cast should be written in lower case. + 'lowercase_cast' => true, + // PHP keywords MUST be in lower case. + 'lowercase_keywords' => true, + // Class static references `self`, `static` and `parent` MUST be in lower case. + 'lowercase_static_reference' => true, + // In method arguments and method call, there MUST NOT be a space before each comma and there MUST be one space after each comma. Argument lists MAY be split across multiple lines, where each subsequent line is indented once. When doing so, the first item in the list MUST be on the next line, and there MUST be only one argument per line. + 'method_argument_space' => true, + // All instances created with new keyword must be followed by braces. + 'new_with_braces' => true, + // There should be no empty lines after class opening brace. + 'no_blank_lines_after_class_opening' => true, + // There must be a comment when fall-through is intentional in a non-empty case body. + 'no_break_comment' => true, + // The closing `? >` tag MUST be omitted from files containing only PHP. + 'no_closing_tag' => true, + // Remove leading slashes in `use` clauses. + 'no_leading_import_slash' => true, + // There must be no space around double colons (also called Scope Resolution Operator or Paamayim Nekudotayim). + 'no_space_around_double_colon' => true, + // When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis. + 'no_spaces_after_function_name' => true, + // There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis. + 'no_spaces_inside_parenthesis' => true, + // Remove trailing whitespace at the end of non-blank lines. + 'no_trailing_whitespace' => true, + // There MUST be no trailing spaces inside comment or PHPDoc. + 'no_trailing_whitespace_in_comment' => true, + // Remove trailing whitespace at the end of blank lines. + 'no_whitespace_in_blank_line' => true, + // Orders the elements of classes/interfaces/traits. + 'ordered_class_elements' => false, + // Ordering `use` statements. + 'ordered_imports' => true, + // There should be one or no space before colon, and one space after it in return type declarations, according to configuration. + 'return_type_declaration' => true, + // Cast `(boolean)` and `(integer)` should be written as `(bool)` and `(int)`, `(double)` and `(real)` as `(float)`, `(binary)` as `(string)`. + 'short_scalar_cast' => true, + // A PHP file without end tag must always end with a single empty line feed. + 'single_blank_line_at_eof' => true, + // There should be exactly one blank line before a namespace declaration. + 'single_blank_line_before_namespace' => true, + // There MUST NOT be more than one property or constant declared per statement. + 'single_class_element_per_statement' => true, + // There MUST be one use keyword per declaration. + 'single_import_per_statement' => true, + // Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block. + 'single_line_after_imports' => true, + // Each trait `use` must be done as single statement. + 'single_trait_insert_per_statement' => true, + // A case should be followed by a colon and not a semicolon. + 'switch_case_semicolon_to_colon' => true, + // Removes extra spaces between colon and case value. + 'switch_case_space' => true, + // Standardize spaces around ternary operator. + 'ternary_operator_spaces' => true, + // Visibility MUST be declared on all properties and methods; `abstract` and `final` MUST be declared before the visibility; `static` MUST be declared after the visibility. + 'visibility_required' => true, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in([ + 'app/code/core/Mage/', + 'lib/Mage/', + 'lib/Magento/', + 'lib/Varien/', + 'shell/', + ]) + ->name('*.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true) + ); diff --git a/.phpcs.ecg.xml.dist b/.phpcs.ecg.xml.dist new file mode 100644 index 00000000000..d802c387385 --- /dev/null +++ b/.phpcs.ecg.xml.dist @@ -0,0 +1,178 @@ + + + api.php + cron.php + get.php + index.php + install.php + app/Mage.php + app/code/core/Mage/ + lib/Mage/ + lib/Magento/ + lib/Varien/ + shell/ + + + + */core/Mage/Admin/Model/Acl/Role/Registry.php* + */core/Mage/Admin/Model/Resource/User.php* + */core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php* + */core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php* + */core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php* + */core/Mage/Adminhtml/Block/Widget/Grid.php* + */core/Mage/Adminhtml/controllers/CustomerController.php* + */core/Mage/Adminhtml/controllers/IndexController.php* + */core/Mage/Adminhtml/controllers/NotificationController.php* + */core/Mage/Adminhtml/controllers/PollController.php* + */core/Mage/Adminhtml/controllers/RatingController.php* + */core/Mage/Adminhtml/controllers/TagController.php* + */core/Mage/Adminhtml/controllers/Catalog/ProductController.php* + */core/Mage/Adminhtml/controllers/Catalog/SearchController.php* + */core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php* + */core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php* + */core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php* + */core/Mage/Adminhtml/controllers/Promo/QuoteController.php* + */core/Mage/Adminhtml/controllers/Sales/OrderController.php* + */core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php* + */core/Mage/Adminhtml/controllers/Tax/RateController.php* + */core/Mage/Adminhtml/Model/Email/Template.php* + */core/Mage/Adminhtml/Model/Giftmessage/Save.php* + */core/Mage/Adminhtml/Model/Sales/Order/Create.php* + */core/Mage/Adminhtml/Model/System/Config/Backend/Category.php* + */core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php* + */core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php* + */core/Mage/Api/Model/Resource/User.php* + */core/Mage/Api2/Model/Observer.php* + */core/Mage/Api2/controllers/Adminhtml/Api2/AttributeController.php* + */core/Mage/Api2/controllers/Adminhtml/Api2/RoleController.php* + */core/Mage/Authorizenet/Helper/Data.php* + */core/Mage/Backup/Model/Fs/Collection.php* + */core/Mage/Bundle/Model/Product/Type.php* + */core/Mage/Catalog/Model/Api2/Product/Website/Rest.php* + */core/Mage/Catalog/Model/Convert/Adapter/Product.php* + */core/Mage/Catalog/Model/Convert/Parser/Product.php* + */core/Mage/Catalog/Model/Product/Option.php* + */core/Mage/Catalog/Model/Product/Attribute/Backend/Price.php* + */core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php* + */core/Mage/Catalog/Model/Product/Option/Value.php* + */core/Mage/Catalog/Model/Product/Type/Configurable.php* + */core/Mage/Catalog/Model/Resource/Category/Flat.php* + */core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php* + */core/Mage/Catalog/Model/Resource/Product.php* + */core/Mage/Catalog/Model/Resource/Product/Link.php* + */core/Mage/Catalog/Model/Resource/Product/Option.php* + */core/Mage/Catalog/Model/Resource/Product/Compare/Item.php* + */core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php* + */core/Mage/Catalog/Model/Resource/Product/Option/Value.php* + */core/Mage/CatalogIndex/Model/Indexer.php* + */core/Mage/CatalogInventory/Model/Observer.php* + */core/Mage/CatalogInventory/Model/Api2/Stock/Item/Rest.php* + */core/Mage/CatalogRule/Model/Observer.php* + */core/Mage/Cron/Model/Observer.php* + */core/Mage/Downloadable/Model/Product/Type.php* + */core/Mage/Downloadable/Model/Observer.php* + */core/Mage/Checkout/Model/Cart/Api.php* + */core/Mage/Checkout/Model/Type/Multishipping.php* + */core/Mage/Core/Model/Email/Queue.php* + */core/Mage/Core/Model/File/Storage.php* + */core/Mage/Core/Model/File/Storage/Directory/Database.php* + */core/Mage/Core/Model/Resource/Db/Collection/Abstract.php* + */core/Mage/Core/Model/Resource/Transaction.php* + */core/Mage/Core/Model/Resource/Translate/String.php* + */core/Mage/Core/Model/Session/Abstract.php* + */core/Mage/Core/Model/Session/Abstract/Varien.php* + */core/Mage/Customer/Model/Convert/Adapter/Customer.php* + */core/Mage/Customer/Model/Convert/Parser/Customer.php* + */core/Mage/Customer/Model/Resource/Customer.php* + */core/Mage/Customer/Model/Resource/Group.php* + */core/Mage/Dataflow/Model/Profile.php* + */core/Mage/Dataflow/Model/Convert/Mapper/Column.php* + */core/Mage/Dataflow/Model/Convert/Parser/Csv.php* + */core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php* + */core/Mage/Dataflow/Model/Session/Parser/Csv.php* + */core/Mage/Directory/Model/Currency/Import/Abstract.php* + */core/Mage/Downloadable/Model/Resource/Link.php* + */core/Mage/Eav/Model/Convert/Adapter/Entity.php* + */core/Mage/Eav/Model/Convert/Adapter/Grid.php* + */core/Mage/Eav/Model/Entity/Abstract.php* + */core/Mage/Eav/Model/Entity/Setup.php* + */core/Mage/Eav/Model/Entity/Attribute/Set.php* + */core/Mage/Eav/Model/Entity/Collection/Abstract.php* + */core/Mage/Eav/Model/Form/Type.php* + */core/Mage/Eav/Model/Resource/Entity/Attribute.php* + */core/Mage/Eav/Model/Resource/Entity/Attribute/Group.php* + */core/Mage/Eav/Model/Resource/Entity/Attribute/Set.php* + */core/Mage/GiftMessage/Model/Observer.php* + */core/Mage/ImportExport/Model/Export/Entity/Product.php* + */core/Mage/ImportExport/Model/Import/Entity/Product.php* + */core/Mage/ImportExport/Model/Import/Entity/Product/Type/Configurable.php* + */core/Mage/ImportExport/Model/Import/Entity/Product/Type/Grouped.php* + */core/Mage/ImportExport/Model/Import/Proxy/Product/Resource.php* + */core/Mage/Index/controllers/Adminhtml/ProcessController.php* + */core/Mage/Index/Model/Process.php* + */core/Mage/Index/Model/Resource/Event.php* + */core/Mage/Log/Model/Resource/Log.php* + */core/Mage/Newsletter/Model/Queue.php* + */core/Mage/Oauth/controllers/Adminhtml/Oauth/Admin/TokenController.php* + */core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizedTokensController.php* + */core/Mage/Paypal/Model/Ipn.php* + */core/Mage/Paypal/Model/Report/Settlement.php* + */core/Mage/Poll/Model/Poll.php* + */core/Mage/Poll/Model/Resource/Poll.php* + */core/Mage/ProductAlert/Model/Observer.php* + */core/Mage/Reports/Model/Resource/Event.php* + */core/Mage/Reports/Model/Resource/Customer/Collection.php* + */core/Mage/Reports/Model/Resource/Product/Index/Abstract.php* + */core/Mage/Rating/Model/Resource/Rating/Option/Vote/Collection.php* + */core/Mage/Rating/Model/Resource/Rating/Option.php* + */core/Mage/Review/Model/Resource/Review/Collection.php* + */core/Mage/Review/Model/Resource/Review/Product/Collection.php* + */core/Mage/Sales/Model/Entity/Order/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Entity/Order/Creditmemo/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Entity/Order/Invoice/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Entity/Order/Shipment/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Entity/Quote.php* + */core/Mage/Sales/Model/Order/Api.php* + */core/Mage/Sales/Model/Order/Invoice.php* + */core/Mage/Sales/Model/Order/Payment.php* + */core/Mage/Sales/Model/Quote/Item.php* + */core/Mage/Sales/Model/Resource/Order/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Resource/Order/Creditmemo/Attribute/Backend/Parent.php + */core/Mage/Sales/Model/Resource/Order/Invoice/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Resource/Order/Shipment/Attribute/Backend/Parent.php* + */core/Mage/Sales/Model/Observer.php* + */core/Mage/Sales/Model/Order.php* + */core/Mage/Sales/Model/Order/Creditmemo.php* + */core/Mage/Sales/Model/Order/Shipment.php* + */core/Mage/SalesRule/Model/Observer.php* + */core/Mage/SalesRule/Model/Rule.php* + */core/Mage/Tag/controllers/IndexController.php* + */core/Mage/Tag/Model/Api.php* + */core/Mage/Tag/Model/Resource/Product/Collection.php* + */core/Mage/Tax/Model/Observer.php* + */core/Mage/Tax/Model/Calculation/Rate.php* + */core/Mage/Tax/Model/Calculation/Rule.php* + */core/Mage/Tax/Model/Resource/Setup.php* + */core/Mage/Wishlist/controllers/IndexController.php* + */core/Mage/Wishlist/Model/Item.php* + */core/Mage/Wishlist/Model/Observer.php* + */lib/Mage/Backup/Filesystem/Rollback/Ftp.php* + */lib/Varien/Cache/Core.php* + */lib/Varien/Cache/Backend/Memcached.php* + */lib/Varien/Convert/Parser/Csv.php* + */lib/Varien/Object/Cache.php* + */core/Mage/*/data/* + */core/Mage/*/sql/* + + + */core/Mage/Catalog/Model/Resource/Eav/Mysql4/**.php* + */core/Mage/Install/Block/Db/Type/Mysql4.php* + */core/Mage/Install/Model/Installer/Db/Mysql4.php* + + */core/Mage/*/Model/Mysql4/**.php* + + */core/Mage/*/Model/Resource/Helper/Mysql4.php* + + diff --git a/.phpcs.php.xml.dist b/.phpcs.php.xml.dist new file mode 100644 index 00000000000..302d5e75ff9 --- /dev/null +++ b/.phpcs.php.xml.dist @@ -0,0 +1,21 @@ + + + api.php + cron.php + get.php + index.php + install.php + app/Mage.php + app/code/core/Mage/ + lib/Mage/ + lib/Magento/ + lib/Varien/ + shell/ + + + */Varien/Object.php* + */Varien/Data/Form/Abstract.php* + */Varien/Db/Tree.php* + */Varien/Directory/Collection.php* + + diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist new file mode 100644 index 00000000000..a4a9c1ce8fe --- /dev/null +++ b/.phpcs.xml.dist @@ -0,0 +1,59 @@ + + + api.php + cron.php + get.php + index.php + install.php + app/Mage.php + app/code/core/Mage/ + lib/Mage/ + lib/Magento/ + lib/Varien/ + shell/ + + + + */get.php* + */index.php* + */app/Mage.php* + */core/Mage/Adminhtml/controllers/Sales/Order/EditController.php* + */core/Mage/Adminhtml/controllers/System/Convert/GuiController.php* + */core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php* + */core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php* + */core/Mage/Bundle/controllers/Product/EditController.php* + */core/Mage/Bundle/controllers/SelectionController.php* + */core/Mage/Centinel/Model/Api/Client.php* + */core/Mage/Downloadable/controllers/Adminhtml/Downloadable/Product/EditController.php* + */core/Mage/Downloadable/controllers/Product/EditController.php* + */core/Mage/Downloadable/controllers/FileController.php* + */shell/indexer.php* + */shell/log.php* + */shell/translations.php* + */shell/update-copyright.php* + + */lib/Varien/Db/Tree/Exception.php* + */lib/Varien/Db/Tree/Node.php* + */lib/Varien/Db/Exception.php* + */lib/Varien/Db/Tree.php* + */lib/Varien/Directory/Collection.php* + */lib/Varien/Directory/Factory.php* + */lib/Varien/File/CsvMulty.php* + */lib/Varien/File/Object.php* + */lib/Varien/Io/Sftp.php* + + + + + + + + + + + + + + + + diff --git a/.phpmd.dist.xml b/.phpmd.dist.xml new file mode 100644 index 00000000000..8bbcf608db5 --- /dev/null +++ b/.phpmd.dist.xml @@ -0,0 +1,126 @@ + + + + OpenMage ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.phpstorm.meta.php/magento_blocks.meta.php b/.phpstorm.meta.php/magento_blocks.meta.php index 3fe157e5bf9..e4d9439c59c 100644 --- a/.phpstorm.meta.php/magento_blocks.meta.php +++ b/.phpstorm.meta.php/magento_blocks.meta.php @@ -1083,7 +1083,6 @@ 'oauth/authorize_button' => \Mage_Oauth_Block_Authorize_Button::class, 'oauth/authorize_buttonBaseAbstract' => \Mage_Oauth_Block_Authorize_ButtonBaseAbstract::class, 'oauth/customer_token_list' => \Mage_Oauth_Block_Customer_Token_List::class, - 'pagecache/adminhtml_cache_additional' => \Mage_PageCache_Block_Adminhtml_Cache_Additional::class, 'page/html' => \Mage_Page_Block_Html::class, 'page/html_breadcrumbs' => \Mage_Page_Block_Html_Breadcrumbs::class, 'page/html_cookieNotice' => \Mage_Page_Block_Html_CookieNotice::class, diff --git a/.phpstorm.meta.php/magento_blocks_methods.meta.php b/.phpstorm.meta.php/magento_blocks_methods.meta.php index 1f4674cd8a3..5770efa0083 100644 --- a/.phpstorm.meta.php/magento_blocks_methods.meta.php +++ b/.phpstorm.meta.php/magento_blocks_methods.meta.php @@ -1083,7 +1083,6 @@ 'oauth/authorize_button' => \Mage_Oauth_Block_Authorize_Button::class, 'oauth/authorize_buttonBaseAbstract' => \Mage_Oauth_Block_Authorize_ButtonBaseAbstract::class, 'oauth/customer_token_list' => \Mage_Oauth_Block_Customer_Token_List::class, - 'pagecache/adminhtml_cache_additional' => \Mage_PageCache_Block_Adminhtml_Cache_Additional::class, 'page/html' => \Mage_Page_Block_Html::class, 'page/html_breadcrumbs' => \Mage_Page_Block_Html_Breadcrumbs::class, 'page/html_cookieNotice' => \Mage_Page_Block_Html_CookieNotice::class, diff --git a/.phpstorm.meta.php/magento_helpers.meta.php b/.phpstorm.meta.php/magento_helpers.meta.php index 6192a3e6760..0ccbf726e21 100644 --- a/.phpstorm.meta.php/magento_helpers.meta.php +++ b/.phpstorm.meta.php/magento_helpers.meta.php @@ -132,8 +132,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, diff --git a/.phpstorm.meta.php/magento_helpers_methods.meta.php b/.phpstorm.meta.php/magento_helpers_methods.meta.php index f0ce708599a..05fa4212d53 100644 --- a/.phpstorm.meta.php/magento_helpers_methods.meta.php +++ b/.phpstorm.meta.php/magento_helpers_methods.meta.php @@ -132,8 +132,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -327,8 +325,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -522,8 +518,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -717,8 +711,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -912,8 +904,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -1107,8 +1097,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -1302,8 +1290,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -1497,8 +1483,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -1692,8 +1676,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -1887,8 +1869,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -2082,8 +2062,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -2277,8 +2255,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -2472,8 +2448,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -2667,8 +2641,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -2862,8 +2834,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, @@ -3057,8 +3027,6 @@ 'newsletter/data' => \Mage_Newsletter_Helper_Data::class, 'oauth' => \Mage_Oauth_Helper_Data::class, 'oauth/data' => \Mage_Oauth_Helper_Data::class, - 'pagecache' => \Mage_PageCache_Helper_Data::class, - 'pagecache/data' => \Mage_PageCache_Helper_Data::class, 'page' => \Mage_Page_Helper_Data::class, 'page/data' => \Mage_Page_Helper_Data::class, 'page/html' => \Mage_Page_Helper_Html::class, diff --git a/.phpstorm.meta.php/magento_models.meta.php b/.phpstorm.meta.php/magento_models.meta.php index 19159a55502..1c6a2e33db0 100644 --- a/.phpstorm.meta.php/magento_models.meta.php +++ b/.phpstorm.meta.php/magento_models.meta.php @@ -1898,9 +1898,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -2122,6 +2119,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -5084,9 +5082,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -5308,6 +5303,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, diff --git a/.phpstorm.meta.php/magento_models_methods.meta.php b/.phpstorm.meta.php/magento_models_methods.meta.php index eec4fa17805..cc6d607fb0e 100644 --- a/.phpstorm.meta.php/magento_models_methods.meta.php +++ b/.phpstorm.meta.php/magento_models_methods.meta.php @@ -1898,9 +1898,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -2122,6 +2119,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -5084,9 +5082,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -5308,6 +5303,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -8270,9 +8266,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -8494,6 +8487,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -11456,9 +11450,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -11680,6 +11671,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -14642,9 +14634,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -14866,6 +14855,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -17828,9 +17818,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -18052,6 +18039,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -21014,9 +21002,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -21238,6 +21223,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -24200,9 +24186,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -24424,6 +24407,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, @@ -27386,9 +27370,6 @@ 'oauth_resource/token_collection' => \Mage_Oauth_Model_Resource_Token_Collection::class, 'oauth/server' => \Mage_Oauth_Model_Server::class, 'oauth/token' => \Mage_Oauth_Model_Token::class, - 'pagecache/control_zend' => \Mage_PageCache_Model_Control_Zend::class, - 'pagecache/observer' => \Mage_PageCache_Model_Observer::class, - 'pagecache/system_config_source_controls' => \Mage_PageCache_Model_System_Config_Source_Controls::class, 'page/config' => \Mage_Page_Model_Config::class, 'page/source_layout' => \Mage_Page_Model_Source_Layout::class, 'paygate/authorizenet' => \Mage_Paygate_Model_Authorizenet::class, @@ -27610,6 +27591,7 @@ 'reports/mysql4_tax_collection' => \Mage_Reports_Model_Mysql4_Tax_Collection::class, 'reports/mysql4_wishlist_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Collection::class, 'reports/mysql4_wishlist_product_collection' => \Mage_Reports_Model_Mysql4_Wishlist_Product_Collection::class, + 'reports/observer' => \Mage_Reports_Model_Observer::class, 'reports/product_index_abstract' => \Mage_Reports_Model_Product_Index_Abstract::class, 'reports/product_index_compared' => \Mage_Reports_Model_Product_Index_Compared::class, 'reports/product_index_viewed' => \Mage_Reports_Model_Product_Index_Viewed::class, diff --git a/README.md b/README.md index e2006ef84f5..206892f3cfa 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@

-All Contributors +All Contributors Total Downloads License -
-PHP workflow Badge -Sonar workflow badge -PHPStan Static Code Analyses workflow badge -PHP Syntax Check workflow badge -Unit Tests workflow badge +PHP Security workflow Badge +CI workflow Badge

# Magento - Long Term Support @@ -18,29 +14,23 @@ This repository is the home of an **unofficial** community-driven project. It's to the Magento CE official releases which integrates improvements directly from the community while maintaining a high level of backwards compatibility to the official releases. -**Pull requests with unofficial bug fixes and security patches from the community are encouraged and welcome!** - -### Versioning - -Though Magento does __not__ follow [Semantic Versioning](http://semver.org/) we aim to provide a workable system for -dependency definition. Each Magento `1..` release will get its own branch (named `1...x`) -that will be independently maintained with upstream patches and community bug fixes for as long as it makes sense -to do so (based on available resources). For example, Magento version `1.9.4.5` was merged into the `1.9.4.x` branch. +**Pull requests with bug fixes and security patches from the community are encouraged and welcome!** ## Requirements - PHP 7.3+ (PHP 8.0 is supported) - MySQL 5.6+ (8.0+ recommended) or MariaDB -__Please be aware that although OpenMage is compatible that one or more extensions may not be__ + +- PHP extension `intl` since 1.9.4.19 & 20.0.17 +- Command `patch` 2.7+ (or `gpatch` on MacOS/HomeBrew) since 1.9.5.0 & 20.1.0 + +__Please be aware that although OpenMage is compatible that one or more extensions may not be.__ ### Optional - Redis 5+ (6.x recommended, latest verified compatible 6.0.7 with 20.x) -### PHP 7.2+ -If using php 7.2+ then `mcrypt` needs to be disabled in `php.ini` or pecl to fallback on `mcryptcompat` and `phpseclib`. `mcrypt` is deprecated from 7.2+ onwards. - ## Installation ### Using Composer @@ -48,7 +38,7 @@ If using php 7.2+ then `mcrypt` needs to be disabled in `php.ini` or pecl to fal Download the latest archive and extract it, clone the repo, or add a composer dependency to your existing project like so: ```bash -composer require "openmage/magento-lts":"^19.4.0" +composer require "openmage/magento-lts":"^19.5.0" ``` To get the latest changes use: @@ -107,7 +97,16 @@ Most important changes will be listed here, all other changes since `19.4.0` can - bug fixes and PHP 7.x, 8.0 and 8.1 compatibility - added config cache for system.xml [#1916](https://github.com/OpenMage/magento-lts/pull/1916) - search for "NULL" in backend grids [#1203](https://github.com/OpenMage/magento-lts/pull/1203) -- removed modules `Mage_Compiler`, `Mage_GoogleBase`, `Mage_Xmlconnect`, `Phoenix_Moneybookers` +- removed lib/flex containing unused ActionScript "file uploader" files [#2271](https://github.com/OpenMage/magento-lts/pull/2271) +- removed modules: + - `Mage_Compiler` + - `Mage_GoogleBase` + - `Mage_PageCache` [#2258](https://github.com/OpenMage/magento-lts/pull/2258) + - `Mage_Xmlconnect` + - `Phoenix_Moneybookers` + +_If you rely on those modules you can reinstall them with composer:_ +- `Mage_PageCache`: `composer require openmage/module-mage-pagecache` ### Between OpenMage 19.4.18 / 20.0.16 and 19.4.19 / 20.0.17 @@ -123,13 +122,28 @@ Do not use 20.x.x if you need IE support. - added redis as a valid option for `global/session_save` [#1513](https://github.com/OpenMage/magento-lts/pull/1513) - reduce needless saves by avoiding setting `_hasDataChanges` flag [#2066](https://github.com/OpenMage/magento-lts/pull/2066) - removed support for `global/sales/old_fields_map` defined in XML [#921](https://github.com/OpenMage/magento-lts/pull/921) -- removed module `Mage_PageCache` [#2258](https://github.com/OpenMage/magento-lts/pull/2258) -- removed lib/flex containing unused ActionScript "file uploader" files [#2271](https://github.com/OpenMage/magento-lts/pull/2271) - enabled website level config cache [#2355](https://github.com/OpenMage/magento-lts/pull/2355) - make overrides of Mage_Core_Model_Resource_Db_Abstract::delete respect parent api [#1257](https://github.com/OpenMage/magento-lts/pull/1257) For full list of changes, you can [compare tags](https://github.com/OpenMage/magento-lts/compare/1.9.4.x...20.0). +### Since OpenMage 19.5.0 / 20.1.0 + +Most of the 3rd party libraries/modules that were bundled in our repository were removed and migrated to composer dependencies. +This allows for better maintenance and upgradability. + +Specifically: +- phpseclib, mcrypt_compat, Cm_RedisSession, Cm_Cache_Backend_Redis, Pelago_Emogrifier (#2411) +- Zend Framework 1 (#2827) + +If your project uses OpenMage through composer then all dependencies will be managed automatically. +If you just extracted the release zip/tarball in your project's main folder then be sure to: +- remove the old copy of aforementioned libraries from your project, you can do that with this command: + `rm -rf lib/Cm lib/Credis lib/mcryptcompat lib/Pelago lib/phpseclib lib/Zend` +- download the new release zip file that is named `openmage-VERSIONNUMBER.zip`, this one is built to contain the `vendor` + folder generated by composer, with all the dependencies in it +- extract the zip file in your project's repository as you always did + ### New Config Options - `admin/design/use_legacy_theme` @@ -211,6 +225,13 @@ You can add additional meta files in this directory to cover your own project fi [PhpStorm advanced metadata](https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html) for more information. +## Versioning + +Though Magento does __not__ follow [Semantic Versioning](http://semver.org/) we aim to provide a workable system for +dependency definition. Each Magento `1..` release will get its own branch (named `1...x`) +that will be independently maintained with upstream patches and community bug fixes for as long as it makes sense +to do so (based on available resources). For example, Magento version `1.9.4.5` was merged into the `1.9.4.x` branch. + ## Public Communication * [Discord](https://discord.gg/EV8aNbU) (maintained by Flyingmana) @@ -222,6 +243,7 @@ for more information. * [Daniel Fahlke aka Flyingmana](https://github.com/Flyingmana) * [Tymoteusz Motylewski](https://github.com/tmotyl) * [Sven Reichel](https://github.com/sreichel) +* [Fabrizio Balliano](https://github.com/fballiano) ## License @@ -428,6 +450,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Enéias Ramos de Melo

Scott Moore
+
Roger Feese
diff --git a/api.php b/api.php index c8e2ff60f3c..bccd0ccada3 100644 --- a/api.php +++ b/api.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -if (version_compare(phpversion(), '7.3.0', '<')===true) { +if (version_compare(phpversion(), '7.3.0', '<') === true) { echo 'It looks like you have an invalid PHP version. OpenMage supports PHP 7.3.0 or newer'; exit; } @@ -56,7 +56,7 @@ if (in_array($apiAlias, Mage_Api2_Model_Server::getApiTypes())) { // emulate index.php entry point for correct URLs generation in API Mage::register('custom_entry_point', true); - /** @var $server Mage_Api2_Model_Server */ + /** @var Mage_Api2_Model_Server $server */ $server = Mage::getSingleton('api2/server'); $server->run(); diff --git a/app/Mage.php b/app/Mage.php index b0f76865e40..65cfa51725b 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -27,7 +27,7 @@ if (!empty($_SERVER['MAGE_IS_DEVELOPER_MODE']) || !empty($_ENV['MAGE_IS_DEVELOPER_MODE'])) { Mage::setIsDeveloperMode(true); - ini_set('display_errors', 1); + ini_set('display_errors', '1'); ini_set('error_prepend_string', '
');
     ini_set('error_append_string', '
'); } @@ -48,9 +48,6 @@ Varien_Autoload::register(); -include_once "phpseclib/bootstrap.php"; -include_once "mcryptcompat/mcrypt.php"; - /* Support additional includes, such as composer's vendor/autoload.php files */ foreach (glob(BP . DS . 'app' . DS . 'etc' . DS . 'includes' . DS . '*.php') as $path) { include_once $path; @@ -68,71 +65,71 @@ final class Mage * * @var array */ - static private $_registry = []; + private static $_registry = []; /** * Application root absolute path * - * @var string + * @var string|null */ - static private $_appRoot; + private static $_appRoot; /** * Application model * - * @var Mage_Core_Model_App + * @var Mage_Core_Model_App|null */ - static private $_app; + private static $_app; /** * Config Model * - * @var Mage_Core_Model_Config + * @var Mage_Core_Model_Config|null */ - static private $_config; + private static $_config; /** * Event Collection Object * - * @var Varien_Event_Collection + * @var Varien_Event_Collection|null */ - static private $_events; + private static $_events; /** * Object cache instance * - * @var Varien_Object_Cache + * @var Varien_Object_Cache|null */ - static private $_objects; + private static $_objects; /** * Is developer mode flag * * @var bool */ - static private $_isDeveloperMode = false; + private static $_isDeveloperMode = false; /** * Is allow throw Exception about headers already sent * * @var bool */ - public static $headersSentThrowsException = true; + public static $headersSentThrowsException = true; /** * Is installed flag * - * @var bool + * @var bool|null */ - static private $_isInstalled; + private static $_isInstalled; /** * Magento edition constants */ - const EDITION_COMMUNITY = 'Community'; - const EDITION_ENTERPRISE = 'Enterprise'; - const EDITION_PROFESSIONAL = 'Professional'; - const EDITION_GO = 'Go'; + public const EDITION_COMMUNITY = 'Community'; + public const EDITION_ENTERPRISE = 'Enterprise'; + public const EDITION_PROFESSIONAL = 'Professional'; + public const EDITION_GO = 'Go'; /** * Current Magento edition. @@ -140,7 +137,7 @@ final class Mage * @var string * @static */ - static private $_currentEdition = self::EDITION_COMMUNITY; + private static $_currentEdition = self::EDITION_COMMUNITY; /** * Gets the current Magento version string @@ -158,6 +155,7 @@ public static function getVersion() * Gets the detailed Magento version information * * @return array + * @deprecated */ public static function getVersionInfo() { @@ -178,16 +176,16 @@ public static function getVersionInfo() * * @return string */ - public static function getOpenMageVersion() + public static function getOpenMageVersion(): string { - $i = self::getOpenMageVersionInfo(); - $versionString = "{$i['major']}.{$i['minor']}.{$i['patch']}"; - if ( $i['stability'] || $i['number'] ) { - $versionString .= "-"; - if ( $i['stability'] && $i['number'] ) { - $versionString .= implode('.', [$i['stability'], $i['number']]); + $info = self::getOpenMageVersionInfo(); + $versionString = "{$info['major']}.{$info['minor']}.{$info['patch']}"; + if ($info['stability'] || $info['number']) { + $versionString .= '-'; + if ($info['stability'] && $info['number']) { + $versionString .= implode('.', [$info['stability'], $info['number']]); } else { - $versionString .= implode('', [$i['stability'], $i['number']]); + $versionString .= implode('', [$info['stability'], $info['number']]); } } return trim( @@ -203,35 +201,41 @@ public static function getOpenMageVersion() * * @return array */ - public static function getOpenMageVersionInfo() + public static function getOpenMageVersionInfo(): array { - $majorVersion = 20; - /** * This code construct is to make merging for forward porting of changes easier. * By having the version numbers of different branches in own lines, they do not provoke a merge conflict * also as releases are usually done together, this could in theory be done at once. * The major Version then needs to be only changed once per branch. */ - if ($majorVersion === 20) { + if (self::getOpenMageMajorVersion() === 20) { return [ 'major' => '20', - 'minor' => '0', - 'patch' => '19', - 'stability' => '', // beta,alpha,rc + 'minor' => '1', + 'patch' => '0', + 'stability' => 'rc1', // beta,alpha,rc 'number' => '', // 1,2,3,0.3.7,x.7.z.92 @see https://semver.org/#spec-item-9 ]; } return [ 'major' => '19', - 'minor' => '4', - 'patch' => '21', - 'stability' => '', // beta,alpha,rc + 'minor' => '5', + 'patch' => '0', + 'stability' => 'rc1', // beta,alpha,rc 'number' => '', // 1,2,3,0.3.7,x.7.z.92 @see https://semver.org/#spec-item-9 ]; } + /** + * @return int<19,20> + */ + public static function getOpenMageMajorVersion(): int + { + return 19; + } + /** * Get current Magento edition * @@ -240,7 +244,7 @@ public static function getOpenMageVersionInfo() */ public static function getEdition() { - return self::$_currentEdition; + return self::$_currentEdition; } /** @@ -274,7 +278,7 @@ public static function register($key, $value, $graceful = false) if ($graceful) { return; } - self::throwException('Mage registry key "'.$key.'" already exists'); + self::throwException('Mage registry key "' . $key . '" already exists'); } self::$_registry[$key] = $value; } @@ -360,7 +364,7 @@ public static function getEvents() public static function objects($key = null) { if (!self::$_objects) { - self::$_objects = new Varien_Object_Cache; + self::$_objects = new Varien_Object_Cache(); } if (is_null($key)) { return self::$_objects; @@ -413,7 +417,8 @@ public static function getStoreConfig($path, $store = null) */ public static function getStoreConfigFlag($path, $store = null) { - $flag = strtolower(self::getStoreConfig($path, $store)); + $flag = self::getStoreConfig($path, $store); + $flag = is_string($flag) ? strtolower($flag) : $flag; if (!empty($flag) && $flag !== 'false') { return true; } else { @@ -436,7 +441,7 @@ public static function getBaseUrl($type = Mage_Core_Model_Store::URL_TYPE_LINK, /** * Generate url by route and parameters * - * @param string $route + * @param null|string $route * @param array $params * @return string */ @@ -458,7 +463,7 @@ public static function getDesign() /** * Retrieve a config instance * - * @return Mage_Core_Model_Config + * @return Mage_Core_Model_Config|null */ public static function getConfig() { @@ -497,9 +502,9 @@ public static function addObserver($eventName, $callback, $data = [], $observerN */ public static function dispatchEvent($name, array $data = []) { - Varien_Profiler::start('DISPATCH EVENT:'.$name); + Varien_Profiler::start('DISPATCH EVENT:' . $name); $result = self::app()->dispatchEvent($name, $data); - Varien_Profiler::stop('DISPATCH EVENT:'.$name); + Varien_Profiler::stop('DISPATCH EVENT:' . $name); return $result; } @@ -508,7 +513,7 @@ public static function dispatchEvent($name, array $data = []) * * @link Mage_Core_Model_Config::getModelInstance * @param string $modelClass - * @param array|object $arguments + * @param array|string|object $arguments * @return Mage_Core_Model_Abstract|false */ public static function getModel($modelClass = '', $arguments = []) @@ -523,7 +528,7 @@ public static function getModel($modelClass = '', $arguments = []) * @param array $arguments * @return Mage_Core_Model_Abstract */ - public static function getSingleton($modelClass = '', array $arguments= []) + public static function getSingleton($modelClass = '', array $arguments = []) { $registryKey = '_singleton/' . $modelClass; if (!isset(self::$_registry[$registryKey])) { @@ -597,7 +602,7 @@ public static function helper($name) $registryKey = '_helper/' . $name; if (!isset(self::$_registry[$registryKey])) { $helperClass = self::getConfig()->getHelperClassName($name); - self::register($registryKey, new $helperClass); + self::register($registryKey, new $helperClass()); } return self::$_registry[$registryKey]; } @@ -845,8 +850,7 @@ public static function log($message, $level = null, $file = '', $forceLog = fals if (empty($file)) { $file = self::getStoreConfig('dev/log/file'); } - } - catch (Exception $e) { + } catch (Exception $e) { $logActive = true; } @@ -878,7 +882,7 @@ public static function log($message, $level = null, $file = '', $forceLog = fals ',', (string) self::getConfig()->getNode('dev/log/allowedFileExtensions', Mage_Core_Model_Store::DEFAULT_CODE) ); - if ( ! ($extension = pathinfo($file, PATHINFO_EXTENSION)) || ! in_array($extension, $_allowedFileExtensions)) { + if (! ($extension = pathinfo($file, PATHINFO_EXTENSION)) || ! in_array($extension, $_allowedFileExtensions)) { return; } @@ -900,8 +904,7 @@ public static function log($message, $level = null, $file = '', $forceLog = fals $writerModel = (string)self::getConfig()->getNode('global/log/core/writer_model'); if (!self::$_app || !$writerModel) { $writer = new Zend_Log_Writer_Stream($logFile); - } - else { + } else { $writer = new $writerModel($logFile); } $writer->setFormatter($formatter); @@ -914,8 +917,7 @@ public static function log($message, $level = null, $file = '', $forceLog = fals $message = addcslashes($message, 'log($message, $level); - } - catch (Exception $e) { + } catch (Exception $e) { } } @@ -963,7 +965,6 @@ public static function getIsDeveloperMode() public static function printException(Throwable $e, $extra = '') { if (self::$_isDeveloperMode) { - @http_response_code(500); print '
';
 
             if (!empty($extra)) {
@@ -974,28 +975,25 @@ public static function printException(Throwable $e, $extra = '')
             print $e->getTraceAsString();
             print '
'; } else { - $reportData = [ (!empty($extra) ? $extra . "\n\n" : '') . $e->getMessage(), $e->getTraceAsString() ]; // retrieve server data - if (isset($_SERVER)) { - if (isset($_SERVER['REQUEST_URI'])) { - $reportData['url'] = $_SERVER['REQUEST_URI']; - } - if (isset($_SERVER['SCRIPT_NAME'])) { - $reportData['script_name'] = $_SERVER['SCRIPT_NAME']; - } + if (isset($_SERVER['REQUEST_URI'])) { + $reportData['url'] = $_SERVER['REQUEST_URI']; + } + if (isset($_SERVER['SCRIPT_NAME'])) { + $reportData['script_name'] = $_SERVER['SCRIPT_NAME']; } // attempt to specify store as a skin try { $storeCode = self::app()->getStore()->getCode(); $reportData['skin'] = $storeCode; + } catch (Exception $e) { } - catch (Exception $e) {} require_once(self::getBaseDir() . DS . 'errors' . DS . 'report.php'); } @@ -1017,14 +1015,14 @@ public static function getScriptSystemUrl($folder, $exitIfNot = false) $runDir = rtrim(dirname($_SERVER['SCRIPT_FILENAME']), DS); $baseUrl = null; - if (is_dir($runDir.'/'.$folder)) { + if (is_dir($runDir . '/' . $folder)) { $baseUrl = str_replace(DS, '/', $runDirUrl); } else { $runDirUrlArray = explode('/', $runDirUrl); $runDirArray = explode('/', $runDir); $count = count($runDirArray); - for ($i=0; $i < $count; $i++) { + for ($i = 0; $i < $count; $i++) { array_pop($runDirUrlArray); array_pop($runDirArray); $_runDir = implode('/', $runDirArray); @@ -1032,7 +1030,7 @@ public static function getScriptSystemUrl($folder, $exitIfNot = false) $_runDir .= '/'; } - if (is_dir($_runDir.$folder)) { + if (is_dir($_runDir . $folder)) { $_runDirUrl = implode('/', $runDirUrlArray); $baseUrl = str_replace(DS, '/', $_runDirUrl); break; @@ -1052,4 +1050,13 @@ public static function getScriptSystemUrl($folder, $exitIfNot = false) return $baseUrl; } + + /** + * Set is downloader flag + * + * @deprecated + */ + public static function setIsDownloader() + { + } } diff --git a/app/code/community/Cm/RedisSession/Model/Session.php b/app/code/community/Cm/RedisSession/Model/Session.php deleted file mode 100644 index dfccb18b96d..00000000000 --- a/app/code/community/Cm/RedisSession/Model/Session.php +++ /dev/null @@ -1,695 +0,0 @@ -_config = $config = Mage::getConfig()->getNode('global/redis_session'); - if (!$config) { - $this->_useRedis = FALSE; - Mage::log('Redis configuration does not exist, falling back to MySQL handler.', Zend_Log::EMERG); - parent::__construct(); - return; - } - - $this->_logLevel = ((int) $config->descend('log_level') ?: self::DEFAULT_LOG_LEVEL); - if ($this->_logLevel >= Zend_Log::DEBUG) { - $timeStart = microtime(true); - } - - // Database config - $host = ((string) $config->descend('host') ?: '127.0.0.1'); - $port = ((int) $config->descend('port') ?: '6379'); - $pass = ((string) $config->descend('password') ?: ''); - $timeout = ((float) $config->descend('timeout') ?: self::DEFAULT_TIMEOUT); - $persistent = ((string) $config->descend('persistent') ?: ''); - $this->_dbNum = ((int) $config->descend('db') ?: 0); - - // General config - $this->_compressionThreshold = ((int) $config->descend('compression_threshold') ?: self::DEFAULT_COMPRESSION_THRESHOLD); - $this->_compressionLib = ((string) $config->descend('compression_lib') ?: self::DEFAULT_COMPRESSION_LIB); - $this->_maxConcurrency = ((int) $config->descend('max_concurrency') ?: self::DEFAULT_MAX_CONCURRENCY); - $this->_breakAfter = ((float) $config->descend('break_after_'.session_name()) ?: self::DEFAULT_BREAK_AFTER); - $this->_maxLifetime = ((int) $config->descend('max_lifetime') ?: self::DEFAULT_MAX_LIFETIME); - $this->_minLifetime = ((int) $config->descend('min_lifetime') ?: self::DEFAULT_MIN_LIFETIME); - $this->_useLocking = defined('CM_REDISSESSION_LOCKING_ENABLED') - ? CM_REDISSESSION_LOCKING_ENABLED - : ! ((int) $config->descend('disable_locking') ?: self::DEFAULT_DISABLE_LOCKING); - - // Use sleep time multiplier so break time is in seconds - $this->_breakAfter = (int) round((1000000 / self::SLEEP_TIME) * $this->_breakAfter); - $this->_failAfter = (int) round((1000000 / self::SLEEP_TIME) * self::FAIL_AFTER); - - // Connect and authenticate - $this->_redis = new Credis_Client($host, $port, $timeout, $persistent); - if (!empty($pass)) { - $this->_redis->auth($pass) || Zend_Cache::throwException('Unable to authenticate with the redis server.'); - } - $this->_redis->setCloseOnDestruct(FALSE); // Destructor order cannot be predicted - $this->_useRedis = TRUE; - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("%s initialized for connection to %s:%s after %.5f seconds", - get_class($this), $host, $port, (microtime(true) - $timeStart) - )); - } - } - - /** - * @param $msg - * @param $level - */ - protected function _log($msg, $level = Zend_Log::DEBUG) - { - Mage::log("{$this->_getPid()}: $msg", $level, self::LOG_FILE); - } - - /** - * Check DB connection - * - * @return bool - */ - public function hasConnection() - { - if( ! $this->_useRedis) return parent::hasConnection(); - - try { - $this->_redis->connect(); - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log("Connected to Redis"); - } - return TRUE; - } - catch (Exception $e) { - Mage::logException($e); - $this->_redis = NULL; - Mage::log('Unable to connect to Redis; falling back to MySQL handler', Zend_Log::EMERG); - - // Fall-back to MySQL handler. If this fails, the file handler will be used. - $this->_useRedis = FALSE; - parent::__construct(); - return parent::hasConnection(); - } - } - - /** - * Fetch session data - * - * @param string $sessionId - * @return string - */ - public function read($sessionId) - { - if ( ! $this->_useRedis) return parent::read($sessionId); - Varien_Profiler::start(__METHOD__); - - // Get lock on session. Increment the "lock" field and if the new value is 1, we have the lock. - $sessionId = self::SESSION_PREFIX.$sessionId; - $tries = $waiting = $lock = 0; - $lockPid = $oldLockPid = NULL; // Restart waiting for lock when current lock holder changes - $detectZombies = FALSE; - if ($this->_logLevel >= Zend_Log::WARN) { - $timeStart = microtime(true); - } - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Attempting to take lock on ID %s", $sessionId)); - } - $this->_redis->select($this->_dbNum); - while ($this->_useLocking) - { - // Increment lock value for this session and retrieve the new value - $oldLock = $lock; - $lock = $this->_redis->hIncrBy($sessionId, 'lock', 1); - - // Get the pid of the process that has the lock - if ($lock != 1 && $tries + 1 >= $this->_breakAfter) { - $lockPid = $this->_redis->hGet($sessionId, 'pid'); - } - - // If we got the lock, update with our pid and reset lock and expiration - if ( $lock == 1 // We actually do have the lock - || ( - $tries >= $this->_breakAfter // We are done waiting and want to start trying to break it - && $oldLockPid == $lockPid // Nobody else got the lock while we were waiting - ) - ) { - $this->_hasLock = TRUE; - break; - } - - // Otherwise, add to "wait" counter and continue - else if ( ! $waiting) { - $i = 0; - do { - $waiting = $this->_redis->hIncrBy($sessionId, 'wait', 1); - } while (++$i < $this->_maxConcurrency && $waiting < 1); - } - - // Handle overloaded sessions - else { - // Detect broken sessions (e.g. caused by fatal errors) - if ($detectZombies) { - $detectZombies = FALSE; - if ( $lock > $oldLock // lock shouldn't be less than old lock (another process broke the lock) - && $lock + 1 < $oldLock + $waiting // lock should be old+waiting, otherwise there must be a dead process - ) { - // Reset session to fresh state - if ($this->_logLevel >= Zend_Log::INFO) { - $this->_log(sprintf( - "Detected zombie waiter after %.5f seconds for ID %s (%d waiting)\n %s (%s - %s)", - (microtime(true) - $timeStart), - $sessionId, $waiting, - Mage::app()->getRequest()->getRequestUri(), Mage::app()->getRequest()->getClientIp(), Mage::app()->getRequest()->getHeader('User-Agent') - ), Zend_Log::INFO); - } - $waiting = $this->_redis->hIncrBy($sessionId, 'wait', -1); - continue; - } - } - - // Limit concurrent lock waiters to prevent server resource hogging - if ($waiting >= $this->_maxConcurrency) { - // Overloaded sessions get 503 errors - $this->_redis->hIncrBy($sessionId, 'wait', -1); - $this->_sessionWritten = TRUE; // Prevent session from getting written - $writes = $this->_redis->hGet($sessionId, 'writes'); - if ($this->_logLevel >= Zend_Log::WARN) { - $this->_log(sprintf( - "Session concurrency exceeded for ID %s; displaying HTTP 503 (%s waiting, %s total requests)\n %s (%s - %s)", - $sessionId, $waiting, $writes, - Mage::app()->getRequest()->getRequestUri(), Mage::app()->getRequest()->getClientIp(), Mage::app()->getRequest()->getHeader('User-Agent') - ), Zend_Log::WARN); - } - $this->_logLevel = -1; // Disable further logging - require_once(Mage::getBaseDir() . DS . 'errors' . DS . '503.php'); - exit; - } - } - - $tries++; - $oldLockPid = $lockPid; - $sleepTime = self::SLEEP_TIME; - - // Detect dead lock waiters - if ($tries % self::DETECT_ZOMBIES == 1) { - $detectZombies = TRUE; - $sleepTime += 10000; // sleep + 0.01 seconds - } - // Detect dead lock holder every 10 seconds (only works on same node as lock holder) - if ($tries % self::DETECT_ZOMBIES == 0) { - Varien_Profiler::start(__METHOD__.'-detect-zombies'); - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf( - "Checking for zombies after %.5f seconds of waiting...", (microtime(true) - $timeStart) - )); - } - $pid = $this->_redis->hGet($sessionId, 'pid'); - if ($pid && ! $this->_pidExists($pid)) { - // Allow a live process to get the lock - $this->_redis->hSet($sessionId, 'lock', 0); - if ($this->_logLevel >= Zend_Log::INFO) { - $this->_log(sprintf( - "Detected zombie process (%s) for %s (%s waiting)\n %s (%s - %s)", - $pid, $sessionId, $waiting, - Mage::app()->getRequest()->getRequestUri(), Mage::app()->getRequest()->getClientIp(), Mage::app()->getRequest()->getHeader('User-Agent') - ), Zend_Log::INFO); - } - Varien_Profiler::stop(__METHOD__.'-detect-zombies'); - continue; - } - Varien_Profiler::stop(__METHOD__.'-detect-zombies'); - } - // Timeout - if ($tries >= $this->_breakAfter + $this->_failAfter) { - $this->_hasLock = FALSE; - if ($this->_logLevel >= Zend_Log::NOTICE) { - $this->_log(sprintf("Giving up on read lock for ID %s after %.5f seconds (%d attempts)", $sessionId, (microtime(true) - $timeStart), $tries), Zend_Log::NOTICE); - } - break; - } - else { - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf( - "Waiting %.2f seconds for lock on ID %s (%d tries, lock pid is %s, %.5f seconds elapsed)", - $sleepTime / 1000000, $sessionId, $tries, $lockPid, (microtime(true) - $timeStart) - )); - } - Varien_Profiler::start(__METHOD__.'-wait'); - usleep($sleepTime); - Varien_Profiler::stop(__METHOD__.'-wait'); - } - } - self::$failedLockAttempts = $tries; - - // Session can be read even if it was not locked by this pid! - if ($this->_logLevel >= Zend_Log::DEBUG) { - $timeStart = microtime(true); - } - list($sessionData, $sessionWrites) = array_values($this->_redis->hMGet($sessionId, array('data','writes'))); - Varien_Profiler::stop(__METHOD__); - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Data read for ID %s in %.5f seconds", $sessionId, (microtime(true) - $timeStart))); - } - $this->_sessionWrites = (int) $sessionWrites; - - $this->_redis->pipeline(); - - // This process is no longer waiting for a lock - if ($tries > 0) { - $this->_redis->hIncrBy($sessionId, 'wait', -1); - } - - // This process has the lock, save the pid - if ($this->_hasLock) { - $setData = array( - 'pid' => $this->_getPid(), - 'lock' => 1, - ); - - // Save request data in session so if a lock is broken we can know which page it was for debugging - if ($this->_logLevel >= Zend_Log::INFO) { - if (empty($_SERVER['REQUEST_METHOD'])) { - $setData['req'] = $_SERVER['SCRIPT_NAME']; - } else { - $setData['req'] = "{$_SERVER['REQUEST_METHOD']} {$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}"; - } - if ($lock != 1) { - $this->_log(sprintf( - "Successfully broke lock for ID %s after %.5f seconds (%d attempts). Lock: %d\nLast request of broken lock: %s", - $sessionId, (microtime(true) - $timeStart), $tries, $lock, $this->_redis->hGet($sessionId, 'req') - ), Zend_Log::INFO); - } - } - $this->_redis->hMSet($sessionId, $setData); - } - - // Set session expiration - $this->_redis->expire($sessionId, min($this->getLifeTime(), $this->_maxLifetime)); - $this->_redis->exec(); - - // Reset flag in case of multiple session read/write operations - $this->_sessionWritten = FALSE; - - return $sessionData ? $this->_decodeData($sessionData) : ''; - } - - /** - * Update session - * - * @param string $sessionId - * @param string $sessionData - * @return boolean - */ - public function write($sessionId, $sessionData) - { - Varien_Profiler::start(__METHOD__); - if ( ! $this->_useRedis) return parent::write($sessionId, $sessionData); - if ($this->_sessionWritten) { - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Repeated session write detected; skipping for ID %s", $sessionId)); - } - Varien_Profiler::stop(__METHOD__); - return TRUE; - } - $this->_sessionWritten = TRUE; - if ($this->_logLevel >= Zend_Log::WARN) { - $timeStart = microtime(true); - } - - // Do not overwrite the session if it is locked by another pid - try { - if($this->_dbNum) $this->_redis->select($this->_dbNum); // Prevent conflicts with other connections? - - if ( ! $this->_useLocking - || ( ! ($pid = $this->_redis->hGet('sess_'.$sessionId, 'pid')) || $pid == $this->_getPid()) - ) { - $this->_writeRawSession($sessionId, $sessionData, $this->getLifeTime()); - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Data written to ID %s in %.5f seconds", $sessionId, (microtime(true) - $timeStart))); - } - } - else { - if ($this->_logLevel >= Zend_Log::WARN) { - if ($this->_hasLock) { - $this->_log(sprintf("Did not write session for ID %s: another process took the lock.", - $sessionId - ), Zend_Log::WARN); - } else { - $this->_log(sprintf("Did not write session for ID %s: unable to acquire lock.", - $sessionId - ), Zend_Log::WARN); - } - } - } - } - catch(Exception $e) { - if (class_exists('Mage', false)) { - Mage::logException($e); - } else { - error_log("$e"); - } - Varien_Profiler::stop(__METHOD__); - return FALSE; - } - Varien_Profiler::stop(__METHOD__); - return TRUE; - } - - /** - * Destroy session - * - * @param string $sessionId - * @return boolean - */ - public function destroy($sessionId) - { - if ( ! $this->_useRedis) return parent::destroy($sessionId); - Varien_Profiler::start(__METHOD__); - - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Destroying ID %s", $sessionId)); - } - $this->_redis->pipeline(); - if($this->_dbNum) $this->_redis->select($this->_dbNum); - $this->_redis->del(self::SESSION_PREFIX.$sessionId); - $this->_redis->exec(); - Varien_Profiler::stop(__METHOD__); - return TRUE; - } - - /** - * Overridden to prevent calling getLifeTime at shutdown - * - * @return bool - */ - public function close() - { - if ( ! $this->_useRedis) return parent::close(); - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log("Closing connection"); - } - if ($this->_redis) $this->_redis->close(); - return TRUE; - } - - /** - * Garbage collection - * - * @param int $maxLifeTime ignored - * @return boolean - */ - public function gc($maxLifeTime) - { - if ( ! $this->_useRedis) return parent::gc($maxLifeTime); - return TRUE; - } - - /** - * @return int|mixed - */ - public function getLifeTime() - { - if ( ! $this->_config) return parent::getLifeTime(); - - if ($this->_lifeTime === NULL) { - $lifeTime = NULL; - - // Detect bots by user agent - $botLifetime = ((int) $this->_config->descend('bot_lifetime') ?: self::DEFAULT_BOT_LIFETIME); - if ($botLifetime) { - $userAgent = empty($_SERVER['HTTP_USER_AGENT']) ? FALSE : $_SERVER['HTTP_USER_AGENT']; - $isBot = ! $userAgent || preg_match(self::BOT_REGEX, $userAgent); - if ($isBot) { - if ($this->_logLevel > Zend_Log::DEBUG) { - $this->_log(sprintf("Bot detected for user agent: %s", $userAgent)); - } - if ( $this->_sessionWrites <= 1 - && ($botFirstLifetime = ((int) $this->_config->descend('bot_first_lifetime') ?: self::DEFAULT_BOT_FIRST_LIFETIME)) - ) { - $lifeTime = $botFirstLifetime * (1+$this->_sessionWrites); - } else { - $lifeTime = min(parent::getLifeTime(), $botLifetime); - } - } - } - - // Use different lifetime for first write - if ($lifeTime === NULL && $this->_sessionWrites <= 1) { - $firstLifetime = ((int) $this->_config->descend('first_lifetime') ?: self::DEFAULT_FIRST_LIFETIME); - if ($firstLifetime) { - $lifeTime = $firstLifetime * (1+$this->_sessionWrites); - } - } - - // Neither bot nor first write - if ($lifeTime === NULL) { - $lifeTime = parent::getLifeTime(); - } - - $this->_lifeTime = $lifeTime; - if ($this->_lifeTime < $this->_minLifetime) { - $this->_lifeTime = $this->_minLifetime; - } - if ($this->_lifeTime > $this->_maxLifetime) { - $this->_lifeTime = $this->_maxLifetime; - } - } - return $this->_lifeTime; - } - - /** - * Public for testing purposes only. - * - * @param string $data - * @return string - */ - public function _encodeData($data) - { - Varien_Profiler::start(__METHOD__); - $originalDataSize = strlen($data); - if ($this->_compressionThreshold > 0 && $this->_compressionLib != 'none' && $originalDataSize >= $this->_compressionThreshold) { - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Compressing %s bytes with %s", $originalDataSize,$this->_compressionLib)); - $timeStart = microtime(true); - } - $prefix = ':'.substr($this->_compressionLib,0,2).':'; - switch($this->_compressionLib) { - case 'snappy': $data = snappy_compress($data); break; - case 'lzf': $data = lzf_compress($data); break; - case 'lz4': $data = lz4_compress($data); $prefix = ':l4:'; break; - case 'gzip': $data = gzcompress($data, 1); break; - } - if($data) { - $data = $prefix.$data; - if ($this->_logLevel >= Zend_Log::DEBUG) { - $this->_log(sprintf("Data compressed by %.1f percent in %.5f seconds", - ($originalDataSize == 0 ? 0 : (100 - (strlen($data) / $originalDataSize * 100))), (microtime(true) - $timeStart) - )); - } - } else if ($this->_logLevel >= Zend_Log::WARN) { - $this->_log(sprintf("Could not compress session data using %s", $this->_compressionLib), Zend_Log::WARN); - } - } - Varien_Profiler::stop(__METHOD__); - return $data; - } - - /** - * Public for testing purposes only. - * - * @param string $data - * @return string - */ - public function _decodeData($data) - { - Varien_Profiler::start(__METHOD__); - switch (substr($data,0,4)) { - // asking the data which library it uses allows for transparent changes of libraries - case ':sn:': $data = snappy_uncompress(substr($data,4)); break; - case ':lz:': $data = lzf_decompress(substr($data,4)); break; - case ':l4:': $data = lz4_uncompress(substr($data,4)); break; - case ':gz:': $data = gzuncompress(substr($data,4)); break; - } - Varien_Profiler::stop(__METHOD__); - return $data; - } - - /** - * Public for testing/import purposes only. - * - * @param $id - * @param $data - * @param $lifetime - * @throws Exception - */ - public function _writeRawSession($id, $data, $lifetime) - { - if ( ! $this->_useRedis) { - throw new Exception('Not connected to redis!'); - } - - $sessionId = 'sess_' . $id; - $this->_redis->pipeline() - ->select($this->_dbNum) - ->hMSet($sessionId, array( - 'data' => $this->_encodeData($data), - 'lock' => 0, // 0 so that next lock attempt will get 1 - )) - ->hIncrBy($sessionId, 'writes', 1) - ->expire($sessionId, min($lifetime, $this->_maxLifetime)) - ->exec(); - } - - /** - * @param string $id - * @return array - * @throws Exception - */ - public function _inspectSession($id) - { - if ( ! $this->_useRedis) { - throw new Exception('Not connected to redis!'); - } - - $sessionId = strpos($id, 'sess_') === 0 ? $id : 'sess_' . $id; - $this->_redis->select($this->_dbNum); - $data = $this->_redis->hGetAll($sessionId); - if ($data && isset($data['data'])) { - $data['data'] = $this->_decodeData($data['data']); - } - return $data; - } - - /** - * Public for testing/inspection purposes only. - * - * @param $forceStandalone - * @return Credis_Client - */ - public function _redisClient($forceStandalone) - { - if ($forceStandalone) { - $this->_redis->forceStandalone(); - } - if ($this->_dbNum) { - $this->_redis->select($this->_dbNum); - } - return $this->_redis; - } - - /** - * @return string - */ - public function _getPid() - { - return gethostname().'|'.getmypid(); - } - - /** - * @param $pid - * @return bool - */ - public function _pidExists($pid) - { - list($host,$pid) = explode('|', $pid); - if (PHP_OS != 'Linux' || $host != gethostname()) { - return TRUE; - } - return @file_exists('/proc/'.$pid); - } - -} diff --git a/app/code/community/Cm/RedisSession/etc/config.xml b/app/code/community/Cm/RedisSession/etc/config.xml deleted file mode 100644 index bf21d925c90..00000000000 --- a/app/code/community/Cm/RedisSession/etc/config.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - 0.2 - - - - - - Cm_RedisSession_Model - - - - diff --git a/app/code/core/Mage/Admin/Helper/Data.php b/app/code/core/Mage/Admin/Helper/Data.php index e535d98a0bf..a438fdc12e7 100644 --- a/app/code/core/Mage/Admin/Helper/Data.php +++ b/app/code/core/Mage/Admin/Helper/Data.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Admin * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Config.php b/app/code/core/Mage/Admin/Model/Config.php index 35bc407bfbf..f8549e41174 100644 --- a/app/code/core/Mage/Admin/Model/Config.php +++ b/app/code/core/Mage/Admin/Model/Config.php @@ -43,7 +43,6 @@ public function __construct() parent::__construct(); $this->setCacheId('adminhtml_acl_menu_config'); - /** @var Varien_Simplexml_Config $adminhtmlConfig */ $adminhtmlConfig = Mage::app()->loadCache($this->getCacheId()); if ($adminhtmlConfig) { $this->_adminhtmlConfig = new Varien_Simplexml_Config($adminhtmlConfig); @@ -80,7 +79,7 @@ public function __construct() * Load Acl resources from config * * @param Mage_Admin_Model_Acl $acl - * @param Mage_Core_Model_Config_Element $resource + * @param Mage_Core_Model_Config_Element|Varien_Simplexml_Element $resource * @param string $parentName * @return $this */ diff --git a/app/code/core/Mage/Admin/Model/Observer.php b/app/code/core/Mage/Admin/Model/Observer.php index f98f45333ae..d697fb194de 100644 --- a/app/code/core/Mage/Admin/Model/Observer.php +++ b/app/code/core/Mage/Admin/Model/Observer.php @@ -70,7 +70,7 @@ public function actionPreDispatchAdmin($observer) $session->login($username, $password, $request); $request->setPost('login', null); } else { - if ($request && !$request->getParam('messageSent')) { + if (!$request->getParam('messageSent')) { Mage::getSingleton('adminhtml/session')->addError( Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.') ); diff --git a/app/code/core/Mage/Admin/Model/Resource/User.php b/app/code/core/Mage/Admin/Model/Resource/User.php index de9204e97b5..2181f6f8868 100644 --- a/app/code/core/Mage/Admin/Model/Resource/User.php +++ b/app/code/core/Mage/Admin/Model/Resource/User.php @@ -233,7 +233,7 @@ public function _saveRelations(Mage_Core_Model_Abstract $user) $adapter->delete($this->getTable('admin/role'), $conditions); foreach ($rolesIds as $rid) { - $rid = intval($rid); + $rid = (int) $rid; if ($rid > 0) { $role = Mage::getModel('admin/role')->load($rid); } else { diff --git a/app/code/core/Mage/Admin/Model/Rules.php b/app/code/core/Mage/Admin/Model/Rules.php index 585d2c0e51f..bf8f1a92faa 100644 --- a/app/code/core/Mage/Admin/Model/Rules.php +++ b/app/code/core/Mage/Admin/Model/Rules.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Admin * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Session.php b/app/code/core/Mage/Admin/Model/Session.php index 76d287627c5..cba417c24ad 100644 --- a/app/code/core/Mage/Admin/Model/Session.php +++ b/app/code/core/Mage/Admin/Model/Session.php @@ -63,7 +63,7 @@ class Mage_Admin_Model_Session extends Mage_Core_Model_Session_Abstract /** * Whether it is the first page after successfull login * - * @var bool + * @var bool|null */ protected $_isFirstPageAfterLogin; diff --git a/app/code/core/Mage/Admin/Model/User.php b/app/code/core/Mage/Admin/Model/User.php index c2bedf1c450..069b2e5c1b8 100644 --- a/app/code/core/Mage/Admin/Model/User.php +++ b/app/code/core/Mage/Admin/Model/User.php @@ -180,7 +180,7 @@ protected function _beforeSave() $this->cleanPasswordsValidationData(); if (!is_null($this->getIsActive())) { - $data['is_active'] = intval($this->getIsActive()); + $data['is_active'] = (int) $this->getIsActive(); } $this->addData($data); @@ -504,7 +504,7 @@ protected function _getHelper($helperName) /** * Find first menu item that user is able to access * - * @param Mage_Core_Model_Config_Element $parent + * @param Mage_Core_Model_Config_Element|Varien_Simplexml_Element $parent * @param string $path * @param int $level * @return string diff --git a/app/code/core/Mage/Admin/etc/config.xml b/app/code/core/Mage/Admin/etc/config.xml index 5dc91381e75..c2965fdd860 100644 --- a/app/code/core/Mage/Admin/etc/config.xml +++ b/app/code/core/Mage/Admin/etc/config.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_Admin * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2018 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2018-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/AdminNotification/Model/Feed.php b/app/code/core/Mage/AdminNotification/Model/Feed.php index 30ae82168d1..f760b50cbc7 100644 --- a/app/code/core/Mage/AdminNotification/Model/Feed.php +++ b/app/code/core/Mage/AdminNotification/Model/Feed.php @@ -120,7 +120,7 @@ public function getFrequency() /** * Retrieve Last update time * - * @return int + * @return string|false */ public function getLastUpdate() { diff --git a/app/code/core/Mage/AdminNotification/etc/adminhtml.xml b/app/code/core/Mage/AdminNotification/etc/adminhtml.xml index 1715a1fd4c8..f0124872a4d 100644 --- a/app/code/core/Mage/AdminNotification/etc/adminhtml.xml +++ b/app/code/core/Mage/AdminNotification/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_AdminNotification * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php b/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php index 5b60e51ce91..058423727f4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php @@ -94,7 +94,7 @@ public function getSaveButtonHtml() public function getDeleteButtonHtml() { - if (intval($this->getRequest()->getParam('rid')) == 0) { + if ((int) $this->getRequest()->getParam('rid') == 0) { return; } return $this->getChildHtml('deleteButton'); diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php b/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php index 8875a7c11ae..ee077468bd2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php @@ -53,7 +53,7 @@ protected function _beforeToHtml() 'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesedit')->toHtml(), ]); - if (intval($roleId) > 0) { + if ((int) $roleId > 0) { $this->addTab('roles', [ 'label' => Mage::helper('adminhtml')->__('Role Users'), 'title' => Mage::helper('adminhtml')->__('Role Users'), diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php index 2d75ea4f55e..558c3197548 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php @@ -40,7 +40,8 @@ public function __construct() foreach ($rules_set->getItems() as $item) { if (array_key_exists(strtolower($item->getResource_id()), $resources) - && $item->getApiPermission() == 'allow') { + && $item->getApiPermission() == 'allow' + ) { $resources[$item->getResource_id()]['checked'] = true; $selrids[] = $item->getResource_id(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php index eb89f2c97a0..dca626bd0ad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php index 87e9f125b53..f3c0c827fcf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php @@ -42,12 +42,14 @@ public function __construct() ) . '\')) editForm.submit(\'' . $this->getUrl('*/*/delete') . '\'); return false;'); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('api_user')->getId()) { return Mage::helper('adminhtml')->__("Edit User '%s'", $this->escapeHtml(Mage::registry('api_user')->getUsername())); - } else { - return Mage::helper('adminhtml')->__('New User'); } + return Mage::helper('adminhtml')->__('New User'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php index e50f87b7dda..e7b68688bc8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php @@ -43,7 +43,7 @@ protected function _prepareForm() 'name' => 'user_id', ]); } else { - if (! $model->hasData('is_active')) { + if (!$model->hasData('is_active')) { $model->setIsActive(1); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Users.php b/app/code/core/Mage/Adminhtml/Block/Api/Users.php index 618f8d6e81d..d803ee82825 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Users.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Users.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php b/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php index 9987d555f78..7ae2e11a4da 100644 --- a/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml backups grid block * @@ -56,7 +58,7 @@ protected function _prepareMassaction() $this->setMassactionIdField('id'); $this->getMassactionBlock()->setFormFieldName('ids'); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('adminhtml')->__('Delete'), 'url' => $this->getUrl('*/*/massDelete'), 'confirm' => Mage::helper('backup')->__('Are you sure you want to delete the selected backup(s)?') diff --git a/app/code/core/Mage/Adminhtml/Block/Cache.php b/app/code/core/Mage/Adminhtml/Block/Cache.php index 8461608dafd..110b42742aa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * @category Mage * @package Mage_Adminhtml @@ -37,23 +38,24 @@ public function __construct() $this->_removeButton('add'); $this->_addButton('flush_magento', [ 'label' => Mage::helper('core')->__('Flush OpenMage Cache'), - 'onclick' => 'setLocation(\'' . $this->getFlushSystemUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getFlushSystemUrl()), 'class' => 'delete', ]); - $confirmationMessage = Mage::helper('core')->jsQuoteEscape( - Mage::helper('core')->__('Cache storage may contain additional data. Are you sure that you want flush it?') - ); $this->_addButton('flush_system', [ 'label' => Mage::helper('core')->__('Flush Cache Storage'), - 'onclick' => 'confirmSetLocation(\'' . $confirmationMessage . '\', \'' . $this->getFlushStorageUrl() - . '\')', + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs( + $this->getFlushStorageUrl(), + Mage::helper('core')->__('Cache storage may contain additional data. Are you sure that you want flush it?') + ), 'class' => 'delete', ]); } /** * Get url for clean cache storage + * + * @return string */ public function getFlushStorageUrl() { @@ -62,6 +64,8 @@ public function getFlushStorageUrl() /** * Get url for clean cache storage + * + * @return string */ public function getFlushSystemUrl() { diff --git a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php index c6f2e9f10b5..e97c38a3730 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * @category Mage * @package Mage_Adminhtml @@ -63,7 +65,7 @@ protected function _afterLoadCollection() } /** - * Prepare grid columns + * @inheritDoc */ protected function _prepareColumns() { @@ -136,6 +138,8 @@ public function getRowUrl($row) /** * Add mass-actions to grid + * + * @return $this */ protected function _prepareMassaction() { @@ -144,15 +148,15 @@ protected function _prepareMassaction() $modeOptions = Mage::getModel('index/process')->getModesOptions(); - $this->getMassactionBlock()->addItem('enable', [ - 'label' => Mage::helper('index')->__('Enable'), - 'url' => $this->getUrl('*/*/massEnable'), + $this->getMassactionBlock()->addItem(MassAction::ENABLE, [ + 'label' => Mage::helper('index')->__('Enable'), + 'url' => $this->getUrl('*/*/massEnable'), ]); - $this->getMassactionBlock()->addItem('disable', [ + $this->getMassactionBlock()->addItem(MassAction::DISABLE, [ 'label' => Mage::helper('index')->__('Disable'), 'url' => $this->getUrl('*/*/massDisable'), ]); - $this->getMassactionBlock()->addItem('refresh', [ + $this->getMassactionBlock()->addItem(MassAction::REFRESH, [ 'label' => Mage::helper('index')->__('Refresh'), 'url' => $this->getUrl('*/*/massRefresh'), 'selected' => true, diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php index 22e3f3e0242..067c72c7a77 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php @@ -30,6 +30,9 @@ class Mage_Adminhtml_Block_Catalog_Category_Checkboxes_Tree extends Mage_Adminht { protected $_selectedIds = []; + /** + * @return $this + */ protected function _prepareLayout() { $this->setTemplate('catalog/category/checkboxes/tree.phtml'); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php index 4e8da19d625..890930e46ec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php index 694555f812e..46aab0bbf0d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php @@ -133,7 +133,8 @@ public function getLoadTreeUrl($expanded = null) { $params = ['_current' => true, 'id' => null,'store' => null]; if ((is_null($expanded) && Mage::getSingleton('admin/session')->getIsTreeWasExpanded()) - || $expanded == true) { + || $expanded == true + ) { $params['expand_all'] = true; } return $this->getUrl('*/*/categoriesJson', $params); @@ -209,7 +210,7 @@ public function getBreadcrumbsJavascript($path, $javascriptVarName) * * @param Varien_Data_Tree_Node|array $node * @param int $level - * @return string + * @return array */ protected function _getNodeJson($node, $level = 0) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php index 0878c5b2c73..be7af2a441c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php @@ -158,7 +158,7 @@ function (node, e) { * * @param Varien_Data_Tree_Node|array $node * @param int $level - * @return string + * @return array */ protected function _getNodeJson($node, $level = 0) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php index ddd2ba82b28..5702ec7b006 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php @@ -77,7 +77,8 @@ public function canDisplayUseDefault() if (!$attribute->isScopeGlobal() && $this->getDataObject() && $this->getDataObject()->getId() - && $this->getDataObject()->getStoreId()) { + && $this->getDataObject()->getStoreId() + ) { return true; } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php index 925b94f88d9..1425c0b0dad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Catalog manage products block * @@ -44,7 +45,7 @@ protected function _prepareLayout() { $this->_addButton('add_new', [ 'label' => Mage::helper('catalog')->__('Add Product'), - 'onclick' => "setLocation('{$this->getUrl('*/*/new')}')", + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/new')), 'class' => 'add' ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php index ac8cc3dfa8f..016f2c54810 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php @@ -61,13 +61,16 @@ public function __construct() $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save Attribute')); $this->_updateButton('save', 'onclick', 'saveAttribute()'); - if (! Mage::registry('entity_attribute')->getIsUserDefined()) { + if (!Mage::registry('entity_attribute')->getIsUserDefined()) { $this->_removeButton('delete'); } else { $this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete Attribute')); } } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('entity_attribute')->getId()) { @@ -76,16 +79,21 @@ public function getHeaderText() $frontendLabel = $frontendLabel[0]; } return Mage::helper('catalog')->__('Edit Product Attribute "%s"', $this->escapeHtml($frontendLabel)); - } else { - return Mage::helper('catalog')->__('New Product Attribute'); } + return Mage::helper('catalog')->__('New Product Attribute'); } + /** + * @return string + */ public function getValidationUrl() { return $this->getUrl('*/*/validate', ['_current' => true]); } + /** + * @return string + */ public function getSaveUrl() { return $this->getUrl('*/' . $this->_controller . '/save', ['_current' => true, 'back' => null]); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php index 0574510855c..5ca4dff500f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php @@ -76,7 +76,7 @@ protected function _prepareColumns() 'align' => 'center', ], 'is_visible'); - $this->addColumn('is_searchable', [ + $this->addColumnAfter('is_searchable', [ 'header' => Mage::helper('catalog')->__('Searchable'), 'sortable' => true, 'index' => 'is_searchable', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php index d74ec7dea5b..d4cc6e80a4d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php @@ -48,25 +48,19 @@ protected function _prepareCollection() } /** - * @return void + * @return $this * @throws Exception */ protected function _prepareColumns() { - /*$this->addColumn('set_id', array( - 'header' => Mage::helper('catalog')->__('ID'), - 'align' => 'right', - 'sortable' => true, - 'width' => '50px', - 'index' => 'attribute_set_id', - ));*/ - $this->addColumn('set_name', [ 'header' => Mage::helper('catalog')->__('Set Name'), 'align' => 'left', 'sortable' => true, 'index' => 'attribute_set_name', ]); + + return $this; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php index f77a946f51e..ad875a675e2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php @@ -30,7 +30,6 @@ class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Main extends Mage_Admin { /** * Initialize template - * */ protected function _construct() { @@ -78,7 +77,7 @@ protected function _prepareLayout() 'back_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData([ 'label' => Mage::helper('catalog')->__('Back'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/')), 'class' => 'back' ]) ); @@ -100,14 +99,14 @@ protected function _prepareLayout() ]) ); - $deleteConfirmMessage = $this->jsQuoteEscape(Mage::helper('catalog') - ->__('All products of this set will be deleted! Are you sure you want to delete this attribute set?')); - $deleteUrl = $this->getUrlSecure('*/*/delete', ['id' => $setId]); $this->setChild( 'delete_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData([ 'label' => Mage::helper('catalog')->__('Delete Attribute Set'), - 'onclick' => 'deleteConfirm(\'' . $deleteConfirmMessage . '\', \'' . $deleteUrl . '\')', + 'onclick' => Mage::helper('core/js')->getDeleteConfirmJs( + $this->getUrlSecure('*/*/delete', ['id' => $setId]), + Mage::helper('catalog')->__('All products of this set will be deleted! Are you sure you want to delete this attribute set?') + ), 'class' => 'delete' ]) ); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php index fb4d391164d..44b952212af 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php @@ -74,8 +74,8 @@ protected function _prepareForm() protected function _getSetId() { - return (intval($this->getRequest()->getParam('id')) > 0) - ? intval($this->getRequest()->getParam('id')) + return ((int) $this->getRequest()->getParam('id') > 0) + ? (int) $this->getRequest()->getParam('id') : Mage::getModel('eav/entity_type') ->load(Mage::registry('entityType')) ->getDefaultAttributeSetId(); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php index ba68780441a..51c6df86fcd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php @@ -31,6 +31,9 @@ protected function _construct() $this->setTemplate('catalog/product/attribute/set/toolbar/add.phtml'); } + /** + * @inheritDoc + */ protected function _prepareLayout() { $this->setChild( @@ -47,7 +50,7 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Back'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/')), 'class' => 'back' ]) ); @@ -59,21 +62,33 @@ protected function _prepareLayout() return parent::_prepareLayout(); } + /** + * @return string + */ protected function _getHeader() { return Mage::helper('catalog')->__('Add New Attribute Set'); } + /** + * @return string + */ protected function getSaveButtonHtml() { return $this->getChildHtml('save_button'); } + /** + * @return string + */ protected function getBackButtonHtml() { return $this->getChildHtml('back_button'); } + /** + * @return string + */ protected function getFormHtml() { return $this->getChildHtml('setForm'); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php index 97b330ab819..4c89f4bf9cb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php @@ -34,6 +34,9 @@ public function __construct() $this->setTemplate('catalog/product/attribute/set/toolbar/main.phtml'); } + /** + * @inheritDoc + */ protected function _prepareLayout() { $this->setChild( @@ -41,23 +44,32 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Add New Set'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/add') . '\')', - 'class' => 'add', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/add')), + 'class' => 'add', ]) ); return parent::_prepareLayout(); } + /** + * @return string + */ protected function getNewButtonHtml() { return $this->getChildHtml('addButton'); } + /** + * @return string + */ protected function _getHeader() { return Mage::helper('catalog')->__('Manage Attribute Sets'); } + /** + * @return string + */ protected function _toHtml() { Mage::dispatchEvent('adminhtml_catalog_product_attribute_set_toolbar_main_html_before', ['block' => $this]); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php index 3eb686154b2..e15eebe00fe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Customer edit block * @@ -45,6 +46,9 @@ public function getProduct() return Mage::registry('current_product'); } + /** + * @inheritDoc + */ protected function _prepareLayout() { if (!$this->getRequest()->getParam('popup')) { @@ -53,9 +57,8 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Back'), - 'onclick' => 'setLocation(\'' - . $this->getUrl('*/*/', ['store' => $this->getRequest()->getParam('store', 0)]) . '\')', - 'class' => 'back' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/', ['store' => $this->getRequest()->getParam('store', 0)])), + 'class' => 'back' ]) ); } else { @@ -65,7 +68,7 @@ protected function _prepareLayout() ->setData([ 'label' => Mage::helper('catalog')->__('Close Window'), 'onclick' => 'window.close()', - 'class' => 'cancel' + 'class' => 'cancel' ]) ); } @@ -76,7 +79,7 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Reset'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/*', ['_current' => true]) . '\')' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/*', ['_current' => true])) ]) ); @@ -86,7 +89,7 @@ protected function _prepareLayout() ->setData([ 'label' => Mage::helper('catalog')->__('Save'), 'onclick' => 'productForm.submit()', - 'class' => 'save' + 'class' => 'save' ]) ); } @@ -98,23 +101,19 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Save and Continue Edit'), - 'onclick' => 'saveAndContinueEdit(\'' . $this->getSaveAndContinueUrl() . '\')', - 'class' => 'save' + 'onclick' => Mage::helper('core/js')->getSaveAndContinueEditJs($this->getSaveAndContinueUrl()), + 'class' => 'save' ]) ); } if ($this->getProduct()->isDeleteable()) { - $confirmationMessage = Mage::helper('core')->jsQuoteEscape( - Mage::helper('catalog')->__('Are you sure?') - ); $this->setChild( 'delete_button', $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Delete'), - 'onclick' => 'confirmSetLocation(\'' . $confirmationMessage - . '\', \'' . $this->getDeleteUrl() . '\')', - 'class' => 'delete' + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs($this->getDeleteUrl()), + 'class' => 'delete' ]) ); } @@ -125,8 +124,8 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Duplicate'), - 'onclick' => 'setLocation(\'' . $this->getDuplicateUrl() . '\')', - 'class' => 'add' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getDuplicateUrl()), + 'class' => 'add' ]) ); } @@ -135,46 +134,73 @@ protected function _prepareLayout() return parent::_prepareLayout(); } + /** + * @return string + */ public function getBackButtonHtml() { return $this->getChildHtml('back_button'); } + /** + * @return string + */ public function getCancelButtonHtml() { return $this->getChildHtml('reset_button'); } + /** + * @return string + */ public function getSaveButtonHtml() { return $this->getChildHtml('save_button'); } + /** + * @return string + */ public function getSaveAndEditButtonHtml() { return $this->getChildHtml('save_and_edit_button'); } + /** + * @return string + */ public function getDeleteButtonHtml() { return $this->getChildHtml('delete_button'); } + /** + * @return string + */ public function getDuplicateButtonHtml() { return $this->getChildHtml('duplicate_button'); } + /** + * @return string + */ public function getValidationUrl() { return $this->getUrl('*/*/validate', ['_current' => true]); } + /** + * @return string + */ public function getSaveUrl() { return $this->getUrl('*/*/save', ['_current' => true, 'back' => null]); } + /** + * @return string + */ public function getSaveAndContinueUrl() { return $this->getUrl('*/*/save', [ @@ -204,16 +230,25 @@ public function getIsGrouped() return $this->getProduct()->isGrouped(); } + /** + * @return string + */ public function getDeleteUrl() { return $this->getUrlSecure('*/*/delete', ['_current' => true]); } + /** + * @return string + */ public function getDuplicateUrl() { return $this->getUrl('*/*/duplicate', ['_current' => true]); } + /** + * @return string + */ public function getHeader() { $header = ''; @@ -228,6 +263,9 @@ public function getHeader() return $header; } + /** + * @return string + */ public function getAttributeSetName() { if ($setId = $this->getProduct()->getAttributeSetId()) { @@ -238,6 +276,9 @@ public function getAttributeSetName() return ''; } + /** + * @return bool + */ public function getIsConfigured() { $superAttributes = true; @@ -254,6 +295,10 @@ public function getIsConfigured() return !$product->isConfigurable() || $superAttributes !== false; } + /** + * @return string + * @throws Exception + */ public function getSelectedTabId() { return addslashes(htmlspecialchars($this->getRequest()->getParam('tab'))); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php index ca32a2746c9..b88712f1d6d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php @@ -35,7 +35,12 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Back'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/catalog_product/', ['store' => $this->getRequest()->getParam('store', 0)]) . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs( + $this->getUrl( + '*/catalog_product/', + ['store' => $this->getRequest()->getParam('store', 0)] + ) + ), 'class' => 'back' ]) ); @@ -45,7 +50,7 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Reset'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/*', ['_current' => true]) . '\')' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/*', ['_current' => true])) ]) ); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php index 711ab87caf4..3bd7466a261 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -55,7 +56,7 @@ public function getFieldSuffix() public function getStoreId() { $storeId = $this->getRequest()->getParam('store'); - return intval($storeId); + return (int) $storeId; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php index 2a0b3b91979..53a5a8d292c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php index d15d4ac470a..b65cf2920cf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php @@ -43,9 +43,7 @@ protected function _prepareLayout() } /** - * Prepare attributes form - * - * @return void + * @inheritDoc */ protected function _prepareForm() { @@ -140,6 +138,8 @@ protected function _prepareForm() $this->setForm($form); } + + return parent::_prepareForm(); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php index 4a4e10666c4..e7dedcbe6c9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php @@ -31,7 +31,7 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create extends Ma /** * Config of create new attribute * - * @var Varien_Object + * @var Varien_Object|null */ protected $_config = null; @@ -49,6 +49,9 @@ public function getConfig() return $this->_config; } + /** + * @inheritDoc + */ protected function _beforeToHtml() { $this->setId('create_attribute_' . $this->getConfig()->getGroupId()) @@ -74,6 +77,9 @@ protected function _beforeToHtml() return parent::_beforeToHtml(); } + /** + * @return string + */ protected function _toHtml() { $this->setCanShow(true); @@ -91,6 +97,9 @@ protected function _toHtml() return $html; } + /** + * @return string + */ public function getJsObjectName() { return $this->getId() . 'JsObject'; diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php index c50b3c32e33..f3ab0d79976 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php @@ -236,7 +236,7 @@ public function getCategoryChildrenJson($categoryId) /** * Returns URL for loading tree * - * @param null $expanded + * @param null $expanded deprecated * @return string */ public function getLoadTreeUrl($expanded = null) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php index c8b2986e37d..d0b3d8605f4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php @@ -288,7 +288,8 @@ public function getOptionValues() $value['image_size_x'] = $option->getImageSizeX(); $value['image_size_y'] = $option->getImageSizeY(); if ($this->getProduct()->getStoreId() != '0' && - $scope == Mage_Core_Model_Store::PRICE_SCOPE_WEBSITE) { + $scope == Mage_Core_Model_Store::PRICE_SCOPE_WEBSITE + ) { $value['checkboxScopePrice'] = $this->getCheckboxScopeHtml( $option->getOptionId(), 'price', diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php index 85e60c634d2..345645c3298 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php index 4949246bbc0..fbc451da7a5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php index 2e2fdb22fb3..ed5de8469d8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php index dfaf9d5f547..1cad175a7de 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php @@ -45,7 +45,7 @@ abstract class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstrac /** * Websites cache * - * @var array + * @var array|null */ protected $_websites; @@ -75,7 +75,7 @@ public function render(Varien_Data_Form_Element_Abstract $element) * Set form element instance * * @param Varien_Data_Form_Element_Abstract $element - * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract + * @return $this */ public function setElement(Varien_Data_Form_Element_Abstract $element) { @@ -271,9 +271,8 @@ public function getPriceColumnHeader($default) { if ($this->hasData('price_column_header')) { return $this->getData('price_column_header'); - } else { - return $default; } + return $default; } /** @@ -286,9 +285,8 @@ public function getPriceValidation($default) { if ($this->hasData('price_validation')) { return $this->getData('price_validation'); - } else { - return $default; } + return $default; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php index c5492a77c3c..a2e90de669b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php @@ -35,6 +35,10 @@ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends */ protected $_product = null; + /** + * @return $this + * @throws Mage_Core_Exception + */ protected function _prepareForm() { $form = new Varien_Data_Form(); @@ -173,6 +177,8 @@ protected function _prepareForm() ]); $this->setForm($form); + + return $this; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php index 7cf59e6eb20..60970e45929 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php @@ -47,7 +47,7 @@ protected function _prepareLayout() $backButton = $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Back'), - 'onclick' => "setLocation('" . $this->getBackUrl() . "')", + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getBackUrl()), 'class' => 'back' ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php index 5f3cec30088..1913252f31a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php @@ -202,7 +202,7 @@ public function getProduct() /** * Getting attribute block name for tabs * - * @return string + * @return string|null */ public function getAttributeTabBlock() { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php index 644591c19be..207c7d45888 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml customer grid block * @@ -310,16 +312,15 @@ protected function _prepareMassaction() $this->setMassactionIdField('entity_id'); $this->getMassactionBlock()->setFormFieldName('product'); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('catalog')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete'), - 'confirm' => Mage::helper('catalog')->__('Are you sure?') + 'url' => $this->getUrl('*/*/massDelete') ]); $statuses = Mage::getSingleton('catalog/product_status')->getOptionArray(); array_unshift($statuses, ['label' => '', 'value' => '']); - $this->getMassactionBlock()->addItem('status', [ + $this->getMassactionBlock()->addItem(MassAction::STATUS, [ 'label' => Mage::helper('catalog')->__('Change status'), 'url' => $this->getUrl('*/*/massStatus', ['_current' => true]), 'additional' => [ @@ -334,7 +335,7 @@ protected function _prepareMassaction() ]); if (Mage::getSingleton('admin/session')->isAllowed('catalog/update_attributes')) { - $this->getMassactionBlock()->addItem('attributes', [ + $this->getMassactionBlock()->addItem(MassAction::ATTRIBUTES, [ 'label' => Mage::helper('catalog')->__('Update Attributes'), 'url' => $this->getUrl('*/catalog_product_action_attribute/edit', ['_current' => true]) ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php index 89c2a6dcd1a..5611ba1fb57 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php index fc0cc17f445..d3f0437a07d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php index 2361f6cafd9..c1572eb551f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php @@ -85,7 +85,8 @@ public function usedDefault($attribute) if (!$this->getDataObject()->getExistsStoreValueFlag($attributeCode)) { return true; } elseif ($this->getValue() == $defaultValue && - $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId()) { + $this->getDataObject()->getStoreId() != $this->_getDefaultStoreId() + ) { return false; } if ($defaultValue === false && !$attribute->getIsRequired() && $this->getValue()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php index 13159beebc4..32024c3b602 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php index 654e79cbb51..d09ce75a579 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php index 2c612965cab..c4073084ca5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php index c57a4c87b89..d0cccbc49ee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php @@ -80,7 +80,7 @@ protected function _getTaxObservingCode($attribute) } /** - * @param null $index + * @param null $index deprecated * @return string|null */ public function getEscapedValue($index = null) diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php index afbd5fc2c85..91248b305a2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php index 63405c945a9..cd12f305300 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -38,12 +39,14 @@ public function __construct() $this->_updateButton('delete', 'label', Mage::helper('catalog')->__('Delete Search')); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('current_catalog_search')->getId()) { return Mage::helper('catalog')->__("Edit Search '%s'", $this->escapeHtml(Mage::registry('current_catalog_search')->getQueryText())); - } else { - return Mage::helper('catalog')->__('New Search'); } + return Mage::helper('catalog')->__('New Search'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php index d2e256ff9df..1b94b354580 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * @category Mage * @category Mage @@ -152,10 +154,9 @@ protected function _prepareMassaction() $this->setMassactionIdField('query_id'); $this->getMassactionBlock()->setFormFieldName('search'); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('catalog')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete'), - 'confirm' => Mage::helper('catalog')->__('Are you sure?') + 'url' => $this->getUrl('*/*/massDelete') ]); return parent::_prepareMassaction(); diff --git a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php index b71d9438ab8..9273ca863c7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -45,8 +46,7 @@ public function getHeaderText() { if (Mage::registry('checkout_agreement')->getId()) { return Mage::helper('checkout')->__('Edit Terms and Conditions'); - } else { - return Mage::helper('checkout')->__('New Terms and Conditions'); } + return Mage::helper('checkout')->__('New Terms and Conditions'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php index 024ff8615c9..925bd164f6b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php @@ -68,8 +68,7 @@ public function getHeaderText() { if (Mage::registry('cms_block')->getId()) { return Mage::helper('cms')->__("Edit Block '%s'", $this->escapeHtml(Mage::registry('cms_block')->getTitle())); - } else { - return Mage::helper('cms')->__('New Block'); } + return Mage::helper('cms')->__('New Block'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php index a2a644b6ced..abfd11834d7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Admin CMS page * @@ -42,7 +43,7 @@ public function __construct() $this->_updateButton('save', 'label', Mage::helper('cms')->__('Save Page')); $this->_addButton('saveandcontinue', [ 'label' => Mage::helper('adminhtml')->__('Save and Continue Edit'), - 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSaveAndContinueEditJs($this->_getSaveAndContinueUrl()), 'class' => 'save', ], -100); } else { @@ -65,9 +66,8 @@ public function getHeaderText() { if (Mage::registry('cms_page')->getId()) { return Mage::helper('cms')->__("Edit Page '%s'", $this->escapeHtml(Mage::registry('cms_page')->getTitle())); - } else { - return Mage::helper('cms')->__('New Page'); } + return Mage::helper('cms')->__('New Page'); } /** @@ -97,9 +97,7 @@ protected function _getSaveAndContinueUrl() } /** - * Prepare layout - * - * @return Mage_Core_Block_Abstract + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php index 29776f54beb..9c68e59cb48 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -41,7 +42,7 @@ class Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Files extends Mage_Adminht */ public function getFiles() { - if (! $this->_filesCollection) { + if (!$this->_filesCollection) { $this->_filesCollection = Mage::getSingleton('cms/wysiwyg_images_storage')->getFilesCollection(Mage::helper('cms/wysiwyg_images')->getCurrentPath(), $this->_getMediaType()); } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php index 6798e3a8a34..0e2d7770035 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Customer edit block * @@ -34,11 +35,12 @@ public function __construct() $this->_controller = 'customer'; if ($this->getCustomerId() && - Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create')) { + Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/create') + ) { $this->_addButton('order', [ - 'label' => Mage::helper('customer')->__('Create Order'), - 'onclick' => 'setLocation(\'' . $this->getCreateOrderUrl() . '\')', - 'class' => 'add', + 'label' => Mage::helper('customer')->__('Create Order'), + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getCreateOrderUrl()), + 'class' => 'add', ], 0); } @@ -57,6 +59,9 @@ public function __construct() } } + /** + * @return string + */ public function getCreateOrderUrl() { return $this->getUrl('*/sales_order_create/start', ['customer_id' => $this->getCustomerId()]); @@ -67,13 +72,15 @@ public function getCustomerId() return Mage::registry('current_customer')->getId(); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('current_customer')->getId()) { return $this->escapeHtml(Mage::registry('current_customer')->getName()); - } else { - return Mage::helper('customer')->__('New Customer'); } + return Mage::helper('customer')->__('New Customer'); } /** @@ -88,17 +95,23 @@ public function getFormHtml() return $html; } + /** + * @return string + */ public function getValidationUrl() { return $this->getUrl('*/*/validate', ['_current' => true]); } + /** + * @inheritDoc + */ protected function _prepareLayout() { if (!Mage::registry('current_customer')->isReadonly()) { $this->_addButton('save_and_continue', [ 'label' => Mage::helper('customer')->__('Save and Continue Edit'), - 'onclick' => 'saveAndContinueEdit(\'' . $this->_getSaveAndContinueUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSaveAndContinueEditJs($this->_getSaveAndContinueUrl()), 'class' => 'save' ], 10); } @@ -106,6 +119,9 @@ protected function _prepareLayout() return parent::_prepareLayout(); } + /** + * @return string + */ protected function _getSaveAndContinueUrl() { return $this->getUrl('*/*/save', [ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Adminpass.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Adminpass.php index 892d08d17d8..8e36065f700 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Adminpass.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Adminpass.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php index af8ccf68a83..7ef68d09274 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php index 706e6c4fd60..2c201d1b13b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php index 80741001d99..693a73bc686 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php @@ -31,7 +31,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Renderer_Region extends Mage_Adminhtml_ /** * Factory instance * - * @var Mage_Core_Model_Abstract + * @var Mage_Core_Model_Factory */ protected $_factory; diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php index 4d3eccfd6d9..f50cf3cd32a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php @@ -89,7 +89,7 @@ public function getCreateDate() */ public function getStoreCreateDate() { - if (! $this->getCustomer()->getCreatedAt()) { + if (!$this->getCustomer()->getCreatedAt()) { return null; } $date = Mage::app()->getLocale()->storeDate( diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php index 1a2db3d01c4..0d6a80dccec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php @@ -194,11 +194,12 @@ protected function _drawElementHtml($element, array $attributes, $closed = true) */ public function getEscapedValue($index = null) { - if (is_array($this->getValue())) { + $value = $this->getValue(); + if (is_array($value)) { return false; } - $value = $this->getValue(); - if (is_array($value) && is_null($index)) { + + if (is_null($index)) { $index = 'value'; } diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php index 54c69064e7a..c02899b0347 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml customer grid block * @@ -178,18 +180,17 @@ protected function _prepareMassaction() $this->setMassactionIdField('entity_id'); $this->getMassactionBlock()->setFormFieldName('customer'); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('customer')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete'), - 'confirm' => Mage::helper('customer')->__('Are you sure?') + 'url' => $this->getUrl('*/*/massDelete') ]); - $this->getMassactionBlock()->addItem('newsletter_subscribe', [ + $this->getMassactionBlock()->addItem(MassAction::NEWSLETTER_SUBSCRIBE, [ 'label' => Mage::helper('customer')->__('Subscribe to Newsletter'), 'url' => $this->getUrl('*/*/massSubscribe') ]); - $this->getMassactionBlock()->addItem('newsletter_unsubscribe', [ + $this->getMassactionBlock()->addItem(MassAction::NEWSLETTER_UNSUBSCRIBE, [ 'label' => Mage::helper('customer')->__('Unsubscribe from Newsletter'), 'url' => $this->getUrl('*/*/massUnsubscribe') ]); @@ -199,7 +200,7 @@ protected function _prepareMassaction() $groups = $helper->getGroups()->toOptionArray(); array_unshift($groups, ['label' => '', 'value' => '']); - $this->getMassactionBlock()->addItem('assign_group', [ + $this->getMassactionBlock()->addItem(MassAction::ASSIGN_GROUP, [ 'label' => Mage::helper('customer')->__('Assign a Customer Group'), 'url' => $this->getUrl('*/*/massAssignGroup'), 'additional' => [ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group.php index bc88b42c326..2b0791c2009 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php index deb62654587..6742a9c3dea 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php @@ -43,6 +43,10 @@ public function __construct() } } + /** + * @return string + * @throws Exception + */ public function getDeleteUrl() { if (!Mage::getSingleton('adminhtml/url')->useSecretKey()) { @@ -55,15 +59,20 @@ public function getDeleteUrl() } } + /** + * @return string + */ public function getHeaderText() { if (!is_null(Mage::registry('current_group')->getId())) { return Mage::helper('customer')->__('Edit Customer Group "%s"', $this->escapeHtml(Mage::registry('current_group')->getCustomerGroupCode())); - } else { - return Mage::helper('customer')->__('New Customer Group'); } + return Mage::helper('customer')->__('New Customer Group'); } + /** + * @return string + */ public function getHeaderCssClass() { return 'icon-head head-customer-groups'; diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php index 996d3e325d1..cffc07c9c86 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -27,6 +28,9 @@ */ class Mage_Adminhtml_Block_Customer_Online_Grid_Renderer_Ip extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { + /** + * @SuppressWarnings(PHPMD.ErrorControlOperator) + */ public function render(Varien_Object $row) { /** diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php index 625a63d945d..c36b687c069 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php index e39393e09c1..35d8cd47b18 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Media/Editor.php b/app/code/core/Mage/Adminhtml/Block/Media/Editor.php index e7b59d50244..b28181bddcd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Media/Editor.php +++ b/app/code/core/Mage/Adminhtml/Block/Media/Editor.php @@ -28,7 +28,9 @@ */ class Mage_Adminhtml_Block_Media_Editor extends Mage_Adminhtml_Block_Widget { - /** @var Varien_Object */ + /** + * @var Varien_Object|null + */ protected $_config; /** diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php index f3d4149f050..d1aa29db47b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php @@ -29,7 +29,7 @@ class Mage_Adminhtml_Block_Newsletter_Subscriber extends Mage_Adminhtml_Block_Template { /** - * @var Mage_Newsletter_Model_Resource_Queue_Collection + * @var Mage_Newsletter_Model_Resource_Queue_Collection|null */ protected $_queueCollection = null; diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php index d9b182290e2..708bb1e1680 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml newsletter subscribers grid block * @@ -201,12 +203,12 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setFormFieldName('subscriber'); $this->getMassactionBlock()->setUseSelectAll(false); - $this->getMassactionBlock()->addItem('unsubscribe', [ + $this->getMassactionBlock()->addItem(MassAction::UNSUBSCRIBE, [ 'label' => Mage::helper('newsletter')->__('Unsubscribe'), 'url' => $this->getUrl('*/*/massUnsubscribe') ]); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('newsletter')->__('Delete'), 'url' => $this->getUrl('*/*/massDelete') ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php index a8bed23e4d8..65b4b7ca9ef 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php @@ -29,7 +29,7 @@ class Mage_Adminhtml_Block_Newsletter_Subscriber_Grid_Filter_Website extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select { /** - * @var Mage_Core_Model_Resource_Website_Collection + * @var Mage_Core_Model_Resource_Website_Collection|null */ protected $_websiteCollection = null; diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php index 936f0195da4..2599fbb2549 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php @@ -34,17 +34,26 @@ public function __construct() $this->setTemplate('newsletter/template/list.phtml'); } + /** + * @inheritDoc + */ protected function _prepareLayout() { $this->setChild('grid', $this->getLayout()->createBlock('adminhtml/newsletter_template_grid', 'newsletter.template.grid')); return parent::_prepareLayout(); } + /** + * @return string + */ public function getCreateUrl() { return $this->getUrl('*/*/new'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('newsletter')->__('Newsletter Templates'); 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 a801af85e0a..fce0595535e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php @@ -46,9 +46,7 @@ public function getModel() } /** - * Preparing block layout - * - * @return $this + * @inheritDoc */ protected function _prepareLayout() { @@ -254,7 +252,6 @@ public function getHeaderText() if ($this->getEditMode()) { return Mage::helper('newsletter')->__('Edit Newsletter Template'); } - return Mage::helper('newsletter')->__('New Newsletter Template'); } diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php index 04322b64485..ef023bc829b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php index a5dd7e3d92e..95f9ed6942b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml AdminNotification inbox grid * @@ -95,15 +97,14 @@ protected function _prepareMassaction() $this->setMassactionIdField('notification_id'); $this->getMassactionBlock()->setFormFieldName('notification'); - $this->getMassactionBlock()->addItem('mark_as_read', [ + $this->getMassactionBlock()->addItem(MassAction::MARK_AS_READ, [ 'label' => Mage::helper('adminnotification')->__('Mark as Read'), 'url' => $this->getUrl('*/*/massMarkAsRead', ['_current' => true]), ]); - $this->getMassactionBlock()->addItem('remove', [ + $this->getMassactionBlock()->addItem(MassAction::REMOVE, [ 'label' => Mage::helper('adminnotification')->__('Remove'), - 'url' => $this->getUrl('*/*/massRemove'), - 'confirm' => Mage::helper('adminnotification')->__('Are you sure?') + 'url' => $this->getUrl('*/*/massRemove') ]); return $this; diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Window.php b/app/code/core/Mage/Adminhtml/Block/Notification/Window.php index 4acf72322cd..7b2e2e7229f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Window.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Window.php @@ -34,14 +34,14 @@ class Mage_Adminhtml_Block_Notification_Window extends Mage_Adminhtml_Block_Noti /** * Severity icons url * - * @var string + * @var string|null */ protected $_severityIconsUrl; /** * Is available flag * - * @var bool + * @var bool|null */ protected $_available = null; diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php index 5d9a22c0404..10f8c236983 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -47,8 +48,7 @@ public function getHeaderText() { if (Mage::registry('permissions_block')->getId()) { return Mage::helper('adminhtml')->__("Edit Block '%s'", $this->escapeHtml(Mage::registry('permissions_block')->getBlockName())); - } else { - return Mage::helper('adminhtml')->__('New block'); } + return Mage::helper('adminhtml')->__('New block'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php index a0efd0d5814..57a6340cd83 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php @@ -94,7 +94,7 @@ public function getSaveButtonHtml() public function getDeleteButtonHtml() { - if (intval($this->getRequest()->getParam('rid')) == 0) { + if ((int) $this->getRequest()->getParam('rid') == 0) { return; } return $this->getChildHtml('deleteButton'); 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 6016e8618af..491a54d1a2b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php @@ -108,11 +108,12 @@ public function __construct() $undefinedResources = array_diff(array_keys($resources), array_keys($resourcesPermissionsMap)); foreach ($undefinedResources as $undefinedResourceId) { - if ($this->_getFallbackHelper()->fallbackResourcePermissions( + // Fallback resource permissions + $permissions = $this->_getFallbackHelper()->fallbackResourcePermissions( $resourcesPermissionsMap, $undefinedResourceId - ) == Mage_Admin_Model_Rules::RULE_PERMISSION_ALLOWED - ) { + ); + if ($permissions == Mage_Admin_Model_Rules::RULE_PERMISSION_ALLOWED) { $selrids[] = $undefinedResourceId; } } @@ -120,8 +121,6 @@ public function __construct() $this->setSelectedResources($selrids); $this->setTemplate('permissions/rolesedit.phtml'); - //->assign('resources', $resources); - //->assign('checkedResources', join(',', $selrids)); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php index 0a787324cc0..6f4f9a36cc5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php index 0a7bddf1304..9f7a0d62874 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php @@ -42,12 +42,14 @@ public function __construct() ) . '\')) editForm.submit(\'' . $this->getUrl('*/*/delete') . '\'); return false;'); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('permissions_user')->getId()) { return Mage::helper('adminhtml')->__("Edit User '%s'", $this->escapeHtml(Mage::registry('permissions_user')->getUsername())); - } else { - return Mage::helper('adminhtml')->__('New User'); } + return Mage::helper('adminhtml')->__('New User'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php index d1b43dbaa04..09f936683e3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php @@ -43,7 +43,7 @@ protected function _prepareForm() 'name' => 'user_id', ]); } else { - if (! $model->hasData('is_active')) { + if (!$model->hasData('is_active')) { $model->setIsActive(1); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php index 77343118bb1..ec83eb93714 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php index ee0aa2892b8..225b3fa08ed 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -45,8 +46,7 @@ public function getHeaderText() { if (Mage::registry('permissions_variable')->getId()) { return Mage::helper('adminhtml')->__("Edit Variable '%s'", $this->escapeHtml(Mage::registry('permissions_variable')->getVariableName())); - } else { - return Mage::helper('adminhtml')->__('New Variable'); } + return Mage::helper('adminhtml')->__('New Variable'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php b/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php index a9472fdb93d..0d20da9ff20 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Admin poll answer edit block * @@ -41,13 +42,28 @@ public function __construct() Mage::register('answer_data', $answerData); } - $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/poll/edit', ['id' => $answerData->getPollId(), 'tab' => 'answers_section']) . '\');'); + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs( + $this->getUrl( + '*/poll/edit', + ['id' => $answerData->getPollId(), 'tab' => 'answers_section'] + ) + ) + ); $this->_updateButton('save', 'label', Mage::helper('poll')->__('Save Answer')); $this->_updateButton('delete', 'label', Mage::helper('poll')->__('Delete Answer')); } + /** + * @return string + */ public function getHeaderText() { - return Mage::helper('poll')->__("Edit Answer '%s'", $this->escapeHtml(Mage::registry('answer_data')->getAnswerTitle())); + return Mage::helper('poll')->__( + "Edit Answer '%s'", + $this->escapeHtml(Mage::registry('answer_data')->getAnswerTitle()) + ); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php index 9da189dfd3f..d223d469ebd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php @@ -41,12 +41,14 @@ public function __construct() $this->setValidationUrl($this->getUrl('*/*/validate', ['id' => $this->getRequest()->getParam($this->_objectId)])); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('poll_data') && Mage::registry('poll_data')->getId()) { return Mage::helper('poll')->__("Edit Poll '%s'", $this->escapeHtml(Mage::registry('poll_data')->getPollTitle())); - } else { - return Mage::helper('poll')->__('New Poll'); } + return Mage::helper('poll')->__('New Poll'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php index bb3684b39dd..cdca3e6389e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php @@ -64,8 +64,7 @@ public function getHeaderText() $rule = Mage::registry('current_promo_catalog_rule'); if ($rule->getRuleId()) { return Mage::helper('catalogrule')->__("Edit Rule '%s'", $this->escapeHtml($rule->getName())); - } else { - return Mage::helper('catalogrule')->__('New Rule'); } + return Mage::helper('catalogrule')->__('New Rule'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php index 576eade2789..37b2a7a56df 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php index 277445231e6..46df8d24a78 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php @@ -57,9 +57,8 @@ public function getHeaderText() $rule = Mage::registry('current_promo_quote_rule'); if ($rule->getRuleId()) { return Mage::helper('salesrule')->__("Edit Rule '%s'", $this->escapeHtml($rule->getName())); - } else { - return Mage::helper('salesrule')->__('New Rule'); } + return Mage::helper('salesrule')->__('New Rule'); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php index b26fc2b722a..ecd4ab0943b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php index 898c8bea5d7..ee12b784a40 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Coupon codes grid * @@ -38,7 +40,7 @@ public function __construct() /** * Prepare collection for grid * - * @return Mage_Adminhtml_Block_Widget_Grid + * @inheritDoc */ protected function _prepareCollection() { @@ -114,10 +116,10 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setUseAjax(true); $this->getMassactionBlock()->setHideFormElement(true); - $this->getMassactionBlock()->addItem('delete', [ - 'label' => Mage::helper('adminhtml')->__('Delete'), - 'url' => $this->getUrl('*/*/couponsMassDelete', ['_current' => true]), - 'confirm' => Mage::helper('salesrule')->__('Are you sure you want to delete the selected coupon(s)?'), + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ + 'label' => Mage::helper('adminhtml')->__('Delete'), + 'url' => $this->getUrl('*/*/couponsMassDelete', ['_current' => true]), + 'confirm' => Mage::helper('salesrule')->__('Are you sure you want to delete the selected coupon(s)?'), 'complete' => 'refreshCouponCodesGrid' ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php index dbc4d649684..da0b38b2516 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php index 269c6be3d8a..1d40996b9d4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php index 78f75e9dae7..8de07887177 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php @@ -66,7 +66,8 @@ protected function _toHtml() $form = new Varien_Data_Form(); foreach ([ 'from' => Mage::helper('adminhtml')->__('From'), - 'to' => Mage::helper('adminhtml')->__('To')] as $key => $label) { + 'to' => Mage::helper('adminhtml')->__('To')] as $key => $label + ) { $id = "{$key}_{$idSuffix}"; $element = new Varien_Data_Form_Element_Date([ 'format' => Varien_Date::DATE_INTERNAL_FORMAT, // hardcode because hardcoded values delimiter diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php index 5feda0daca7..ffc5ffab1b3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php @@ -45,12 +45,14 @@ public function __construct() } } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('rating_data') && Mage::registry('rating_data')->getId()) { return Mage::helper('rating')->__("Edit Rating", $this->escapeHtml(Mage::registry('rating_data')->getRatingCode())); - } else { - return Mage::helper('rating')->__('New Rating'); } + return Mage::helper('rating')->__('New Rating'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php index 34c6b8af8f4..5836d22b59f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php @@ -34,10 +34,14 @@ public function __construct() $this->setId('gridAccounts'); } + /** + * @return $this + */ protected function _prepareCollection() { parent::_prepareCollection(); $this->getCollection()->initReport('reports/accounts_collection'); + return $this; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php index af27cd68b02..7371b05f7ac 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php @@ -34,12 +34,19 @@ public function __construct() $this->setId('gridOrdersCustomer'); } + /** + * @return $this + */ protected function _prepareCollection() { parent::_prepareCollection(); $this->getCollection()->initReport('reports/customer_orders_collection'); + return $this; } + /** + * @inheritDoc + */ protected function _prepareColumns() { $this->addColumn('name', [ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php index 3866e364302..211bece5cfd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php @@ -34,12 +34,19 @@ public function __construct() $this->setId('gridTotalsCustomer'); } + /** + * @return $this + */ protected function _prepareCollection() { parent::_prepareCollection(); $this->getCollection()->initReport('reports/customer_totals_collection'); + return $this; } + /** + * @inheritDoc + */ protected function _prepareColumns() { $this->addColumn('name', [ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php index d5d4f545e48..da1c84917c0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php @@ -78,6 +78,9 @@ public function __construct() $this->setCountTotals(true); } + /** + * @return $this + */ protected function _prepareLayout() { $this->setChild( @@ -114,7 +117,7 @@ protected function _prepareColumns() } /** - * @return void + * @return $this */ protected function _prepareCollection() { @@ -201,6 +204,8 @@ protected function _prepareCollection() 'adminhtml_widget_grid_filter_collection', ['collection' => $this->getCollection(), 'filter_values' => $this->_filterValues] ); + + return $this; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php index 544f9ff4325..dfa8fac9fd3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php @@ -62,7 +62,7 @@ public function getResourceCollectionName() } /** - * @return Mage_Reports_Model_Grouped_Collection + * @return Mage_Core_Model_Resource_Db_Collection_Abstract|Mage_Reports_Model_Grouped_Collection */ public function getCollection() { diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php index ff10f1d3447..71b71c0254c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php index a4c286c8885..bd456a6ae9e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -42,7 +43,7 @@ public function render(Varien_Object $row) return $data; } - $data = floatval($data) * $this->_getRate($row); + $data = (float) $data * $this->_getRate($row); $data = sprintf("%F", $data); $data = Mage::app()->getLocale()->currency($currency_code)->toCurrency($data); return $data; diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php index 7a858d9a508..ada2c539d3b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php index ddfdea0ddbe..742baf80865 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php @@ -51,12 +51,14 @@ protected function _prepareCollection() } /** - * @return void + * @inheritDoc */ protected function _afterLoadCollection() { $totalObj = new Mage_Reports_Model_Totals(); $this->setTotals($totalObj->countTotals($this)); + + return parent::_afterLoadCollection(); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered/Grid.php index e11c7b0d659..bf44e049065 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Ordered/Grid.php @@ -33,14 +33,18 @@ public function __construct() } /** - * @return void + * @return $this */ protected function _prepareCollection() { parent::_prepareCollection(); $this->getCollection()->initReport('reports/product_ordered_collection'); + return $this; } + /** + * @inheritDoc + */ protected function _prepareColumns() { $this->addColumn('name', [ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php index 075a8a6cc80..7397e4195e4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml sales report grid block * @@ -36,6 +38,11 @@ public function __construct() $this->setUseAjax(false); } + /** + * @param string $reportCode + * @return string + * @throws Zend_Date_Exception + */ protected function _getUpdatedAt($reportCode) { $flag = Mage::getModel('reports/flag')->setReportFlagCode($reportCode)->loadSelf(); @@ -48,6 +55,9 @@ protected function _getUpdatedAt($reportCode) : ''; } + /** + * @inheritDoc + */ protected function _prepareCollection() { $collection = new Varien_Data_Collection(); @@ -114,6 +124,9 @@ protected function _prepareCollection() return parent::_prepareCollection(); } + /** + * @inheritDoc + */ protected function _prepareColumns() { $this->addColumn('report', [ @@ -142,18 +155,21 @@ protected function _prepareColumns() return parent::_prepareColumns(); } + /** + * @return $this + */ protected function _prepareMassaction() { $this->setMassactionIdField('id'); $this->getMassactionBlock()->setFormFieldName('code'); - $this->getMassactionBlock()->addItem('refresh_lifetime', [ + $this->getMassactionBlock()->addItem(MassAction::REFRESH_LIFETIME, [ 'label' => Mage::helper('reports')->__('Refresh Lifetime Statistics'), 'url' => $this->getUrl('*/*/refreshLifetime'), 'confirm' => Mage::helper('reports')->__('Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation.') ]); - $this->getMassactionBlock()->addItem('refresh_recent', [ + $this->getMassactionBlock()->addItem(MassAction::REFRESH_RECENT, [ 'label' => Mage::helper('reports')->__('Refresh Statistics for the Last Day'), 'url' => $this->getUrl('*/*/refreshRecent'), 'confirm' => Mage::helper('reports')->__('Are you sure?'), diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php index 1581a118170..ab2ac20e7ea 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php index 0250b22e045..38ad68eb295 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php @@ -55,11 +55,12 @@ protected function _prepareCollection() } /** - * @return void + * @inheritDoc */ protected function _afterLoadCollection() { $this->getCollection()->addCartInfo(); + return parent::_afterLoadCollection(); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Add.php b/app/code/core/Mage/Adminhtml/Block/Review/Add.php index 3b61efb0c8c..d045aa490f4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Add.php @@ -110,6 +110,9 @@ public function __construct() '; } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('review')->__('Add New Review'); diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Edit.php b/app/code/core/Mage/Adminhtml/Block/Review/Edit.php index 71b2ca4ed1b..1aa8be6af32 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Edit.php @@ -43,12 +43,12 @@ public function __construct() $this->_updateButton( 'back', 'onclick', - 'setLocation(\'' - . $this->getUrl( + Mage::helper('core/js')->getSetLocationJs( + $this->getUrl( '*/catalog_product/edit', ['id' => $this->getRequest()->getParam('productId', false)] ) - . '\')' + ) ); } @@ -56,34 +56,33 @@ public function __construct() $this->_updateButton( 'back', 'onclick', - 'setLocation(\'' - . $this->getUrl( + Mage::helper('core/js')->getSetLocationJs( + $this->getUrl( '*/customer/edit', ['id' => $this->getRequest()->getParam('customerId', false)] ) - . '\')' + ) ); } if ($this->getRequest()->getParam('ret', false) == 'pending') { - $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/pending') . '\')'); + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/pending')) + ); $this->_updateButton( 'delete', 'onclick', - 'deleteConfirm(' - . '\'' - . Mage::helper('core')->jsQuoteEscape( - Mage::helper('review')->__('Are you sure you want to do this?') - ) - . '\', ' - . '\'' . $this->getUrl( + Mage::helper('core/js')->getDeleteConfirmJs( + $this->getUrl( '*/*/delete', [ $this->_objectId => $this->getRequest()->getParam($this->_objectId), 'ret' => 'pending', ] - ) . '\'' - . ')' + ) + ) ); Mage::register('ret', 'pending'); } @@ -119,12 +118,14 @@ public function __construct() '; } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('review_data') && Mage::registry('review_data')->getId()) { return Mage::helper('review')->__("Edit Review '%s'", $this->escapeHtml(Mage::registry('review_data')->getTitle())); - } else { - return Mage::helper('review')->__('New Review'); } + return Mage::helper('review')->__('New Review'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php index 7e0cd7814d4..f9f341765fd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml reviews grid * @@ -35,6 +37,10 @@ public function __construct() $this->setDefaultSort('created_at'); } + /** + * @inheritDoc + * @throws Exception + */ protected function _prepareCollection() { $model = Mage::getModel('review/review'); @@ -68,6 +74,10 @@ protected function _prepareCollection() return parent::_prepareCollection(); } + /** + * @inheritDoc + * @throws Mage_Core_Model_Store_Exception + */ protected function _prepareColumns() { $this->addColumn('review_id', [ @@ -200,7 +210,7 @@ protected function _prepareColumns() } /** - * @return void + * @inheritDoc */ protected function _prepareMassaction() { @@ -210,7 +220,7 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setFormFieldName('reviews'); $this->getMassactionBlock()->setUseSelectAll(false); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('review')->__('Delete'), 'url' => $this->getUrl( '*/*/massDelete', @@ -221,7 +231,7 @@ protected function _prepareMassaction() $statuses = Mage::helper('review')->getReviewStatusesOptionArray(); array_unshift($statuses, ['label' => '', 'value' => '']); - $this->getMassactionBlock()->addItem('update_status', [ + $this->getMassactionBlock()->addItem(MassAction::UPDATE_STATUS, [ 'label' => Mage::helper('review')->__('Update Status'), 'url' => $this->getUrl( '*/*/massUpdateStatus', @@ -237,6 +247,7 @@ protected function _prepareMassaction() ] ] ]); + return parent::_prepareMassaction(); } public function getRowUrl($row) @@ -249,6 +260,9 @@ public function getRowUrl($row) ]); } + /** + * @return string + */ public function getGridUrl() { if ($this->getProductId() || $this->getCustomerId()) { @@ -259,8 +273,7 @@ public function getGridUrl() 'customerId' => $this->getCustomerId(), ] ); - } else { - return $this->getCurrentUrl(); } + return $this->getCurrentUrl(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Main.php b/app/code/core/Mage/Adminhtml/Block/Review/Main.php index 2985eecf45f..fa31981711e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Main.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php index ad464dffb10..fc5da132361 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php @@ -37,7 +37,7 @@ public function __construct() } /** - * @return void + * @return $this */ protected function _prepareColumns() { @@ -103,6 +103,8 @@ protected function _prepareColumns() ] ); } + + return $this; } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php index e8c7c85fac8..1a239134a68 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php @@ -80,10 +80,10 @@ public function getRating() ->setPositionOrder() ->load() ->addOptionToItems(); - if (intval($this->getRequest()->getParam('id'))) { + if ((int) $this->getRequest()->getParam('id')) { $this->_voteCollection = Mage::getModel('rating/rating_option_vote') ->getResourceCollection() - ->setReviewFilter(intval($this->getRequest()->getParam('id'))) + ->setReviewFilter((int) $this->getRequest()->getParam('id')) ->addOptionInfo() ->load() ->addRatingOptions(); diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php index 8c2bde171a6..42d75a19908 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php index 8837dbacde2..9d53f2b0032 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml sales orders grid * @@ -143,7 +145,7 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setFormFieldName('creditmemo_ids'); $this->getMassactionBlock()->setUseSelectAll(false); - $this->getMassactionBlock()->addItem('pdfcreditmemos_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_CREDITMEMOS_ORDER, [ 'label' => Mage::helper('sales')->__('PDF Credit Memos'), 'url' => $this->getUrl('*/sales_creditmemo/pdfcreditmemos'), ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php index 69ebb198445..328e2372fd1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml sales orders grid * @@ -145,7 +147,7 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setFormFieldName('invoice_ids'); $this->getMassactionBlock()->setUseSelectAll(false); - $this->getMassactionBlock()->addItem('pdfinvoices_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_INVOICE_ORDER, [ 'label' => Mage::helper('sales')->__('PDF Invoices'), 'url' => $this->getUrl('*/sales_invoice/pdfinvoices'), ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php index 518151d7cd5..35be092b2b0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php @@ -349,7 +349,7 @@ public function displayPriceInclTax(Varien_Object $item) $basePriceTax = 0; $priceTax = 0; - if (floatval($qty)) { + if ((float) $qty) { $basePriceTax = $item->getBasePrice() + $baseTax / $qty; $priceTax = $item->getPrice() + $tax / $qty; } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php index 9eedcc6cc9a..e9d85cb8c1b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml sales order create * @@ -49,7 +50,7 @@ public function __construct() } $this->_updateButton('back', 'id', 'back_order_top_button'); - $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getBackUrl() . '\')'); + $this->_updateButton('back', 'onclick', Mage::helper('core/js')->getSetLocationJs($this->getBackUrl())); $this->_updateButton('reset', 'id', 'reset_order_top_button'); @@ -59,10 +60,16 @@ public function __construct() $this->_updateButton('back', 'style', 'display:none'); } - $confirm = Mage::helper('sales')->__('Are you sure you want to cancel this order?'); $this->_updateButton('reset', 'label', Mage::helper('sales')->__('Cancel')); $this->_updateButton('reset', 'class', 'cancel'); - $this->_updateButton('reset', 'onclick', 'deleteConfirm(\'' . $confirm . '\', \'' . $this->getCancelUrl() . '\')'); + $this->_updateButton( + 'reset', + 'onclick', + Mage::helper('core/js')->getDeleteConfirmJs( + $this->getCancelUrl(), + Mage::helper('sales')->__('Are you sure you want to cancel this order?') + ) + ); } /** @@ -99,6 +106,9 @@ public function getFormHtml() return $html; } + /** + * @return string + */ public function getHeaderWidth() { return 'width: 70%;'; @@ -114,6 +124,9 @@ protected function _getSession() return Mage::getSingleton('adminhtml/session_quote'); } + /** + * @return string + */ public function getCancelUrl() { if ($this->_getSession()->getOrder()->getId()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php index 76fa7a44099..ab60676aa5c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -71,7 +71,7 @@ public function getCustomer() /** * Retrieve customer identifier * - * @return int + * @return int|null */ public function getCustomerId() { @@ -91,7 +91,7 @@ public function getStore() /** * Retrieve store identifier * - * @return int + * @return int|null */ public function getStoreId() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php index 8f9c8e95b66..76874b48cd2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,11 +34,17 @@ public function __construct() $this->setId('sales_order_create_billing_method'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Payment Method'); } + /** + * @return string + */ public function getHeaderCssClass() { return 'head-payment-method'; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php index ce8c239797a..a8414204807 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,21 +30,33 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Comment extends Mage_Adminhtml_Blo { protected $_form; + /** + * @return string + */ public function getHeaderCssClass() { return 'head-comment'; } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Order Comment'); } + /** + * @return string + */ public function getCommentNote() { return $this->escapeHtml($this->getQuote()->getCustomerNote()); } + /** + * @return bool + */ public function getNoteNotify() { $notify = $this->getQuote()->getCustomerNoteNotify(); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php index ec49f86f5db..ca319181396 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,16 +34,25 @@ public function __construct() $this->setId('sales_order_create_coupons_form'); } + /** + * @return string + */ public function getCouponCode() { return $this->getQuote()->getCouponCode(); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Coupons'); } + /** + * @return string + */ public function getHeaderCssClass() { return 'head-promo-quote'; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php index 346e537750b..19ab2268fdb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php @@ -34,11 +34,17 @@ public function __construct() $this->setId('sales_order_create_customer'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Please Select a Customer'); } + /** + * @return string + */ public function getButtonsHtml() { $addButtonData = [ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php index 026b9efce11..ae22500dbf4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php @@ -52,6 +52,9 @@ public function getSaveUrl() return $this->getUrl('*/*/save'); } + /** + * @return string + */ public function getCustomerSelectorDisplay() { $customerId = $this->getCustomerId(); @@ -61,6 +64,9 @@ public function getCustomerSelectorDisplay() return 'none'; } + /** + * @return string + */ public function getStoreSelectorDisplay() { $storeId = $this->getStoreId(); @@ -71,6 +77,9 @@ public function getStoreSelectorDisplay() return 'none'; } + /** + * @return string + */ public function getDataSelectorDisplay() { $storeId = $this->getStoreId(); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php index 52f30ca6d37..07841c87909 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php @@ -31,7 +31,7 @@ abstract class Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract extends Mag /** * Data Form object * - * @var Varien_Data_Form + * @var Varien_Data_Form|null */ protected $_form; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php index 86a5a741bfb..cc64ff830ad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php @@ -99,7 +99,7 @@ protected function _prepareForm() * Add additional data to form element * * @param Varien_Data_Form_Element_Abstract $element - * @return Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract + * @return $this */ protected function _addAdditionalFormElementData(Varien_Data_Form_Element_Abstract $element) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php index 32ef8f83c70..112a2512303 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php @@ -31,7 +31,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address extends Mage_Adminhtm /** * Customer Address Form instance * - * @var Mage_Customer_Model_Form + * @var Mage_Customer_Model_Form|null */ protected $_addressForm; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php index 785065d035e..e2fec160314 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php @@ -59,7 +59,8 @@ public function getItems() foreach ($allItems as $item) { if ($this->_getGiftmessageSaveModel()->getIsAllowedQuoteItem($item) - && $helper->getIsMessagesAvailable('item', $item, $this->getStore())) { + && $helper->getIsMessagesAvailable('item', $item, $this->getStore()) + ) { // if item allowed $items[] = $item; } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php index 3d5a65e9b42..96f9f89ae3d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php @@ -38,7 +38,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Giftmessage_Form extends Mage_Admi /** * Giftmessage object * - * @var Mage_GiftMessage_Model_Message + * @var Mage_GiftMessage_Model_Message|null */ protected $_giftMessage; @@ -318,7 +318,8 @@ protected function _getFieldIdPrefix() protected function _applyPostData() { if (is_array($giftmessages = $this->getRequest()->getParam('giftmessage')) - && isset($giftmessages[$this->getEntity()->getId()])) { + && isset($giftmessages[$this->getEntity()->getId()]) + ) { $this->getMessage()->addData($giftmessages[$this->getEntity()->getId()]); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php index 1179caa23bd..46413024df0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2018 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2018-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ 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 6898ecb2f57..a3a8f8d2c14 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 @@ -196,7 +196,6 @@ public function getSubtotalWithDiscount() if ($this->displayTotalsIncludeTax()) { return $address->getSubtotal() + $address->getTaxAmount() + $address->getHiddenTaxAmount() + $this->getDiscountAmount(); - return $subtotalInclTax; } return $address->getSubtotal() + $this->getDiscountAmount(); @@ -291,6 +290,7 @@ public function getTierHtml($item) $html = ''; $prices = $item->getProduct()->getTierPrice(); if ($prices) { + $info = []; foreach ($prices as $data) { $qty = $data['price_qty'] * 1; $price = $this->convertPrice($data['price']); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php index 39ee6dc423b..533dba016dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -34,19 +34,28 @@ public function __construct() $this->setId('sales_order_create_newsletter'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Newsletter Subscription'); } + /** + * @return string + */ public function getHeaderCssClass() { return 'icon-head head-newsletter'; } + /** + * @return string + */ protected function _toHtml() { - if (! Mage::getSingleton('adminhtml/quote')->getIsOldCustomer()) { + if (!Mage::getSingleton('adminhtml/quote')->getIsOldCustomer()) { return parent::_toHtml(); } return ''; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php index 76e3c1716af..b2ee87066f4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php @@ -34,11 +34,17 @@ public function __construct() $this->setId('sales_order_create_search'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Please Select Products to Add'); } + /** + * @return string + */ public function getButtonsHtml() { $addButtonData = [ @@ -49,6 +55,9 @@ public function getButtonsHtml() return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml(); } + /** + * @return string + */ public function getHeaderCssClass() { return 'head-catalog-product'; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php index b47688fe0d0..1d5711bd80e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php index 5c91f2c4466..21d191dcd2a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php index 5bf0824115d..0eed7a67442 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,11 +34,17 @@ public function __construct() $this->setId('sales_order_create_shipping_method'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Shipping Method'); } + /** + * @return string + */ public function getHeaderCssClass() { return 'head-shipping-method'; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php index 1846ac654fe..1a0a1ddefe7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php @@ -42,6 +42,9 @@ protected function _construct() $this->setDataId('cart'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Shopping Cart'); @@ -62,6 +65,9 @@ public function getItemCollection() return $collection; } + /** + * @return bool + */ public function canDisplayItemQty() { return true; @@ -90,11 +96,7 @@ public function getProductId($item) } /** - * Prepare layout - * - * Add button that clears customer's shopping cart - * - * @return $this + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php index bc661f44971..620087a6b1d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -34,6 +35,9 @@ protected function _construct() $this->setDataId('compared'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Products in Comparison List'); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php index c0b1ddc4c13..81f4c2220d5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php @@ -35,6 +35,9 @@ protected function _construct() $this->setDataId('pcompared'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Recently Compared Products'); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php index eb61b7a7e63..cabefb0bc71 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php @@ -35,6 +35,9 @@ protected function _construct() $this->setDataId('pviewed'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Recently Viewed Products'); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php index 3cbc37629ae..39962be2dfe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php index 14e9ada3d9e..2b275a3f86f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,6 +34,9 @@ public function __construct() $this->setId('sales_order_create_store'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Please Select a Store'); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php index 98f31fb173e..8669d6c6103 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -41,11 +42,17 @@ public function getTotals() return $this->getQuote()->getTotals(); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__('Order Totals'); } + /** + * @return string + */ public function getHeaderCssClass() { return 'head-money'; @@ -92,6 +99,9 @@ public function renderTotals($area = null, $colspan = 1) return $html; } + /** + * @return bool + */ public function canSendNewOrderConfirmationEmail() { return Mage::helper('sales')->canSendNewOrderConfirmationEmail($this->getQuote()->getStoreId()); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php index bfde51e83ef..f0b13c49d6f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ 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 2ec8d308a11..52666a55f26 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 @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php index 9448ea4e759..e14e16995a5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php @@ -38,13 +38,6 @@ public function __construct() $this->_removeButton('delete'); $this->_removeButton('save'); - - /*$this->_addButton('submit_creditmemo', array( - 'label' => Mage::helper('sales')->__('Submit Credit Memo'), - 'class' => 'save submit-button', - 'onclick' => '$(\'edit_form\').submit()', - ) - );*/ } /** @@ -57,6 +50,9 @@ public function getCreditmemo() return Mage::registry('current_creditmemo'); } + /** + * @return string + */ public function getHeaderText() { if ($this->getCreditmemo()->getInvoice()) { @@ -74,6 +70,9 @@ public function getHeaderText() return $header; } + /** + * @return string + */ public function getBackUrl() { return $this->getUrl('*/sales_order/view', ['order_id' => $this->getCreditmemo()->getOrderId()]); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php index 00fbc461eaa..42028c5b7ee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml creditmemo view * @@ -47,17 +48,17 @@ public function __construct() $this->_addButton('cancel', [ 'label' => Mage::helper('sales')->__('Cancel'), 'class' => 'delete', - 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getCancelUrl()) + ]); } if ($this->_isAllowedAction('emails')) { - $confirmationMessage = Mage::helper('core')->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to send Creditmemo email to customer?') - ); $this->addButton('send_notification', [ 'label' => Mage::helper('sales')->__('Send Email'), - 'onclick' => 'confirmSetLocation(\'' . $confirmationMessage . '\', \'' . $this->getEmailUrl() . '\')' + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs( + $this->getEmailUrl(), + Mage::helper('sales')->__('Are you sure you want to send Creditmemo email to customer?') + ) ]); } @@ -65,24 +66,25 @@ public function __construct() $this->_addButton('refund', [ 'label' => Mage::helper('sales')->__('Refund'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getRefundUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getRefundUrl()) + ]); } if ($this->getCreditmemo()->canVoid()) { $this->_addButton('void', [ 'label' => Mage::helper('sales')->__('Void'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getVoidUrl()) + + ]); } if ($this->getCreditmemo()->getId()) { $this->_addButton('print', [ 'label' => Mage::helper('sales')->__('Print'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getPrintUrl()) + ]); } } @@ -108,7 +110,17 @@ public function getHeaderText() } else { $emailSent = Mage::helper('sales')->__('the credit memo email is not sent'); } - return Mage::helper('sales')->__('Credit Memo #%1$s | %3$s | %2$s (%4$s)', $this->getCreditmemo()->getIncrementId(), $this->formatDate($this->getCreditmemo()->getCreatedAtDate(), 'medium', true), $this->getCreditmemo()->getStateName(), $emailSent); + return Mage::helper('sales')->__( + 'Credit Memo #%1$s | %3$s | %2$s (%4$s)', + $this->getCreditmemo()->getIncrementId(), + $this->formatDate( + $this->getCreditmemo()->getCreatedAtDate(), + 'medium', + true + ), + $this->getCreditmemo()->getStateName(), + $emailSent + ); } /** @@ -185,7 +197,7 @@ public function getPrintUrl() /** * Update 'back' button url * - * @return Mage_Adminhtml_Block_Widget_Container | Mage_Adminhtml_Block_Sales_Order_Creditmemo_View + * @return Mage_Adminhtml_Block_Widget_Container|Mage_Adminhtml_Block_Sales_Order_Creditmemo_View */ public function updateBackButtonUrl($flag) { @@ -194,14 +206,14 @@ public function updateBackButtonUrl($flag) return $this->_updateButton( 'back', 'onclick', - 'setLocation(\'' . $this->getCreditmemo()->getBackUrl() . '\')' + Mage::helper('core/js')->getSetLocationJs($this->getCreditmemo()->getBackUrl()) ); } return $this->_updateButton( 'back', 'onclick', - 'setLocation(\'' . $this->getUrl('*/sales_creditmemo/') . '\')' + Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/sales_creditmemo/')) ); } return $this; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php index 456d4c9f26a..a3349f15ca3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml sales orders grid * @@ -163,47 +165,47 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setUseSelectAll(false); if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) { - $this->getMassactionBlock()->addItem('cancel_order', [ + $this->getMassactionBlock()->addItem(MassAction::CANCEL_ORDER, [ 'label' => Mage::helper('sales')->__('Cancel'), 'url' => $this->getUrl('*/sales_order/massCancel'), ]); } if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) { - $this->getMassactionBlock()->addItem('hold_order', [ + $this->getMassactionBlock()->addItem(MassAction::HOLD_ORDER, [ 'label' => Mage::helper('sales')->__('Hold'), 'url' => $this->getUrl('*/sales_order/massHold'), ]); } if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) { - $this->getMassactionBlock()->addItem('unhold_order', [ + $this->getMassactionBlock()->addItem(MassAction::UNHOLD_ORDER, [ 'label' => Mage::helper('sales')->__('Unhold'), 'url' => $this->getUrl('*/sales_order/massUnhold'), ]); } - $this->getMassactionBlock()->addItem('pdfinvoices_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_INVOICE_ORDER, [ 'label' => Mage::helper('sales')->__('Print Invoices'), 'url' => $this->getUrl('*/sales_order/pdfinvoices'), ]); - $this->getMassactionBlock()->addItem('pdfshipments_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_SHIPMENTS_ORDER, [ 'label' => Mage::helper('sales')->__('Print Packingslips'), 'url' => $this->getUrl('*/sales_order/pdfshipments'), ]); - $this->getMassactionBlock()->addItem('pdfcreditmemos_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_CREDITMEMOS_ORDER, [ 'label' => Mage::helper('sales')->__('Print Credit Memos'), 'url' => $this->getUrl('*/sales_order/pdfcreditmemos'), ]); - $this->getMassactionBlock()->addItem('pdfdocs_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_DOCS_ORDER, [ 'label' => Mage::helper('sales')->__('Print All'), 'url' => $this->getUrl('*/sales_order/pdfdocs'), ]); - $this->getMassactionBlock()->addItem('print_shipping_label', [ + $this->getMassactionBlock()->addItem(MassAction::PRINT_SHIPMENT_LABEL, [ 'label' => Mage::helper('sales')->__('Print Shipping Labels'), 'url' => $this->getUrl('*/sales_order_shipment/massPrintShippingLabel'), ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php index 4b1fee67a54..b9c73e09525 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml invoice create * @@ -54,18 +55,18 @@ public function __construct() if ($this->_isAllowedAction('cancel') && $this->getInvoice()->canCancel()) { $this->_addButton('cancel', [ 'label' => Mage::helper('sales')->__('Cancel'), - 'class' => 'delete', - 'onclick' => 'setLocation(\'' . $this->getCancelUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getCancelUrl()), + 'class' => 'delete' + ]); } if ($this->_isAllowedAction('emails')) { - $confirmationMessage = Mage::helper('core')->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to send Invoice email to customer?') - ); $this->addButton('send_notification', [ 'label' => Mage::helper('sales')->__('Send Email'), - 'onclick' => 'confirmSetLocation(\'' . $confirmationMessage . '\', \'' . $this->getEmailUrl() . '\')' + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs( + $this->getEmailUrl(), + Mage::helper('sales')->__('Are you sure you want to send Invoice email to customer?') + ) ]); } @@ -75,12 +76,13 @@ public function __construct() if (($orderPayment->canRefundPartialPerInvoice() && $this->getInvoice()->canRefund() && $orderPayment->getAmountPaid() > $orderPayment->getAmountRefunded()) - || ($orderPayment->canRefund() && !$this->getInvoice()->getIsUsedForRefund())) { + || ($orderPayment->canRefund() && !$this->getInvoice()->getIsUsedForRefund()) + ) { $this->_addButton('capture', [ // capture? 'label' => Mage::helper('sales')->__('Credit Memo'), 'class' => 'go', - 'onclick' => 'setLocation(\'' . $this->getCreditMemoUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getCreditMemoUrl()) + ]); } } @@ -88,24 +90,24 @@ public function __construct() $this->_addButton('capture', [ 'label' => Mage::helper('sales')->__('Capture'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getCaptureUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getCaptureUrl()) + ]); } if ($this->getInvoice()->canVoid()) { $this->_addButton('void', [ 'label' => Mage::helper('sales')->__('Void'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getVoidUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getVoidUrl()) + ]); } if ($this->getInvoice()->getId()) { $this->_addButton('print', [ 'label' => Mage::helper('sales')->__('Print'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getPrintUrl()) + ]); } } @@ -129,7 +131,17 @@ public function getHeaderText() } else { $emailSent = Mage::helper('sales')->__('the invoice email is not sent'); } - return Mage::helper('sales')->__('Invoice #%1$s | %2$s | %4$s (%3$s)', $this->getInvoice()->getIncrementId(), $this->getInvoice()->getStateName(), $emailSent, $this->formatDate($this->getInvoice()->getCreatedAtDate(), 'medium', true)); + return Mage::helper('sales')->__( + 'Invoice #%1$s | %2$s | %4$s (%3$s)', + $this->getInvoice()->getIncrementId(), + $this->getInvoice()->getStateName(), + $emailSent, + $this->formatDate( + $this->getInvoice()->getCreatedAtDate(), + 'medium', + true + ) + ); } /** @@ -210,10 +222,17 @@ public function updateBackButtonUrl($flag) { if ($flag) { if ($this->getInvoice()->getBackUrl()) { - return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getInvoice()->getBackUrl() - . '\')'); + return $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs($this->getInvoice()->getBackUrl()) + ); } - return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/sales_invoice/') . '\')'); + return $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/sales_invoice/')) + ); } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php index 6fca775aa2a..3409af9f311 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php @@ -36,7 +36,6 @@ public function __construct() parent::__construct(); - //$this->_updateButton('save', 'label', Mage::helper('sales')->__('Submit Shipment')); $this->_removeButton('save'); $this->_removeButton('delete'); } @@ -51,6 +50,9 @@ public function getShipment() return Mage::registry('current_shipment'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('sales')->__( @@ -59,6 +61,9 @@ public function getHeaderText() ); } + /** + * @return string + */ public function getBackUrl() { return $this->getUrl('*/sales_order/view', ['order_id' => $this->getShipment()->getOrderId()]); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php index 89109ef2dd8..8bb2f6f6a3a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml shipment packaging * @@ -272,7 +273,7 @@ public function getPrintButton() ->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('sales')->__('Print'), - 'onclick' => 'setLocation(\'' . $url . '\')' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($url) ]) ->toHtml(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php index 4aef8112d7a..af0eeefa342 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php index 908a4a96a88..6c465b59859 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml shipment create * @@ -43,13 +44,13 @@ public function __construct() $this->_removeButton('delete'); if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/emails')) { $this->_updateButton('save', 'label', Mage::helper('sales')->__('Send Tracking Information')); - $confirmationMessage = Mage::helper('core')->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to send Shipment email to customer?') - ); $this->_updateButton( 'save', 'onclick', - "deleteConfirm('" . $confirmationMessage . "', '" . $this->getEmailUrl() . "')" + Mage::helper('core/js')->getDeleteConfirmJs( + $this->getEmailUrl(), + Mage::helper('sales')->__('Are you sure you want to send Shipment email to customer?') + ) ); } @@ -57,8 +58,8 @@ public function __construct() $this->_addButton('print', [ 'label' => Mage::helper('sales')->__('Print'), 'class' => 'save', - 'onclick' => 'setLocation(\'' . $this->getPrintUrl() . '\')' - ]); + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getPrintUrl()) + ]); } } @@ -82,7 +83,16 @@ public function getHeaderText() } else { $emailSent = Mage::helper('sales')->__('the shipment email is not sent'); } - return Mage::helper('sales')->__('Shipment #%1$s | %3$s (%2$s)', $this->getShipment()->getIncrementId(), $emailSent, $this->formatDate($this->getShipment()->getCreatedAtDate(), 'medium', true)); + return Mage::helper('sales')->__( + 'Shipment #%1$s | %3$s (%2$s)', + $this->getShipment()->getIncrementId(), + $emailSent, + $this->formatDate( + $this->getShipment()->getCreatedAtDate(), + 'medium', + true + ) + ); } /** @@ -125,10 +135,18 @@ public function updateBackButtonUrl($flag) { if ($flag) { if ($this->getShipment()->getBackUrl()) { - return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getShipment()->getBackUrl() - . '\')'); + return $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs($this->getShipment()->getBackUrl()) + ); } - return $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/sales_shipment/') . '\')'); + + return $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/sales_shipment/')) + ); } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php index 8b03c8d37c6..195de379ea2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Shipment view form * @@ -89,7 +90,7 @@ public function getPrintLabelButton() ->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('sales')->__('Print Shipping Label'), - 'onclick' => 'setLocation(\'' . $url . '\')' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($url), ]) ->toHtml(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php index 938c44166e8..07671b51887 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php @@ -124,13 +124,15 @@ public function getCarriers() return $carriers; } + /** + * @param $code + * @return false|string + */ public function getCarrierTitle($code) { if ($carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($code)) { return $carrier->getConfigData('title'); - } else { - return Mage::helper('sales')->__('Custom Value'); } - return false; + return Mage::helper('sales')->__('Custom Value'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php index d52ccfe6a67..c3e5f6b73e9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml sales order's status namagement block * @@ -38,7 +39,7 @@ public function __construct() $this->_addButtonLabel = Mage::helper('sales')->__('Create New Status'); $this->_addButton('assign', [ 'label' => Mage::helper('sales')->__('Assign Status to State'), - 'onclick' => 'setLocation(\'' . $this->getAssignUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getAssignUrl()), 'class' => 'add', ]); parent::__construct(); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php index 7882e372e52..41fbd4e6740 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php @@ -48,10 +48,10 @@ public function __construct() $coreHelper = Mage::helper('core'); if ($this->_isAllowedAction('edit') && $order->canEdit()) { - $confirmationMessage = $coreHelper->jsQuoteEscape( + $onclickJs = Mage::helper('core/js')->getDeleteConfirmJs( + $this->getEditUrl(), Mage::helper('sales')->__('Are you sure? This order will be canceled and a new one will be created instead') ); - $onclickJs = 'deleteConfirm(\'' . $confirmationMessage . '\', \'' . $this->getEditUrl() . '\');'; $this->_addButton('order_edit', [ 'label' => Mage::helper('sales')->__('Edit'), 'onclick' => $onclickJs, @@ -81,73 +81,71 @@ public function __construct() } if ($this->_isAllowedAction('cancel') && $order->canCancel()) { - $confirmationMessage = $coreHelper->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to cancel this order?') - ); $this->_addButton('order_cancel', [ 'label' => Mage::helper('sales')->__('Cancel'), - 'onclick' => 'deleteConfirm(\'' . $confirmationMessage . '\', \'' . $this->getCancelUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getDeleteConfirmJs( + $this->getCancelUrl(), + Mage::helper('sales')->__('Are you sure you want to cancel this order?') + ) ]); } if ($this->_isAllowedAction('emails') && !$order->isCanceled()) { - $confirmationMessage = $coreHelper->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to send order email to customer?') - ); $this->addButton('send_notification', [ 'label' => Mage::helper('sales')->__('Send Email'), - 'onclick' => "confirmSetLocation('{$confirmationMessage}', '{$this->getEmailUrl()}')", + 'onclick' => Mage::helper('core/js')->getDeleteConfirmJs( + $this->getEmailUrl(), + Mage::helper('sales')->__('Are you sure you want to send order email to customer?') + ) ]); } // invoice action intentionally if ($this->_isAllowedAction('invoice') && $order->canVoidPayment()) { - $confirmationMessage = $coreHelper->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to void the payment?') - ); $this->addButton('void_payment', [ 'label' => Mage::helper('sales')->__('Void'), - 'onclick' => "confirmSetLocation('{$confirmationMessage}', '{$this->getVoidPaymentUrl()}')", + 'onclick' => Mage::helper('core/js')->getDeleteConfirmJs( + $this->getVoidPaymentUrl(), + Mage::helper('sales')->__('Are you sure you want to void the payment?') + ) ]); } if ($this->_isAllowedAction('hold') && $order->canHold()) { $this->_addButton('order_hold', [ 'label' => Mage::helper('sales')->__('Hold'), - 'onclick' => 'setLocation(\'' . $this->getHoldUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getHoldUrl()) ]); } if ($this->_isAllowedAction('unhold') && $order->canUnhold()) { $this->_addButton('order_unhold', [ 'label' => Mage::helper('sales')->__('Unhold'), - 'onclick' => 'setLocation(\'' . $this->getUnholdUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUnholdUrl()) ]); } if ($this->_isAllowedAction('review_payment')) { if ($order->canReviewPayment()) { - $confirmationMessage = $coreHelper->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to accept this payment?') - ); - $onClick = "confirmSetLocation('{$confirmationMessage}', '{$this->getReviewPaymentUrl('accept')}')"; $this->_addButton('accept_payment', [ 'label' => Mage::helper('sales')->__('Accept Payment'), - 'onclick' => $onClick, + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs( + $this->getReviewPaymentUrl('accept'), + Mage::helper('sales')->__('Are you sure you want to accept this payment?') + ) ]); - $confirmationMessage = $coreHelper->jsQuoteEscape( - Mage::helper('sales')->__('Are you sure you want to deny this payment?') - ); - $onClick = "confirmSetLocation('{$confirmationMessage}', '{$this->getReviewPaymentUrl('deny')}')"; $this->_addButton('deny_payment', [ 'label' => Mage::helper('sales')->__('Deny Payment'), - 'onclick' => $onClick, + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs( + $this->getReviewPaymentUrl('deny'), + Mage::helper('sales')->__('Are you sure you want to deny this payment?') + ) ]); } if ($order->canFetchPaymentReviewUpdate()) { $this->_addButton('get_review_payment_update', [ 'label' => Mage::helper('sales')->__('Get Payment Update'), - 'onclick' => 'setLocation(\'' . $this->getReviewPaymentUrl('update') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getReviewPaymentUrl('update')) ]); } } @@ -158,27 +156,28 @@ public function __construct() Mage::helper('sales')->__('Invoice'); $this->_addButton('order_invoice', [ 'label' => $_label, - 'onclick' => 'setLocation(\'' . $this->getInvoiceUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getInvoiceUrl()), 'class' => 'go' ]); } if ($this->_isAllowedAction('ship') && $order->canShip() - && !$order->getForcedDoShipmentWithInvoice()) { + && !$order->getForcedDoShipmentWithInvoice() + ) { $this->_addButton('order_ship', [ 'label' => Mage::helper('sales')->__('Ship'), - 'onclick' => 'setLocation(\'' . $this->getShipUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getShipUrl()), 'class' => 'go' ]); } if ($this->_isAllowedAction('creditmemo') && $order->canCreditmemo()) { - $onClick = "setLocation('{$this->getCreditmemoUrl()}')"; + $onClick = Mage::helper('core/js')->getSetLocationJs($this->getCreditmemoUrl()); if ($order->getPayment()->getMethodInstance()->isGateway()) { - $confirmationMessage = $coreHelper->jsQuoteEscape( + $onClick = Mage::helper('core/js')->getConfirmSetLocationJs( + $this->getCreditmemoUrl(), Mage::helper('sales')->__('This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you wish to proceed?') ); - $onClick = "confirmSetLocation('{$confirmationMessage}', '{$this->getCreditmemoUrl()}')"; } $this->_addButton('order_creditmemo', [ 'label' => Mage::helper('sales')->__('Credit Memo'), @@ -195,7 +194,7 @@ public function __construct() ) { $this->_addButton('order_reorder', [ 'label' => Mage::helper('sales')->__('Reorder'), - 'onclick' => 'setLocation(\'' . $this->getReorderUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getReorderUrl()), 'class' => 'go' ]); } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php index b69c02a713f..ca1f724c0b0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php @@ -31,7 +31,7 @@ class Mage_Adminhtml_Block_Sales_Order_View_Giftmessage extends Mage_Adminhtml_B /** * Entity for editing of gift message * - * @var Mage_Sales_Model_Order + * @var Mage_Sales_Model_Order|null */ protected $_entity; @@ -48,7 +48,7 @@ public function getOrder() /** * Giftmessage object * - * @var Mage_GiftMessage_Model_Message + * @var Mage_GiftMessage_Model_Message|null */ protected $_giftMessage; diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php index 2ea0a37d67b..fa927e2707a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php index f41681aedcf..e7fbc246a34 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml sales orders grid * @@ -156,12 +158,12 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setFormFieldName('shipment_ids'); $this->getMassactionBlock()->setUseSelectAll(false); - $this->getMassactionBlock()->addItem('pdfshipments_order', [ + $this->getMassactionBlock()->addItem(MassAction::PDF_SHIPMENTS_ORDER, [ 'label' => Mage::helper('sales')->__('PDF Packingslips'), 'url' => $this->getUrl('*/sales_shipment/pdfshipments'), ]); - $this->getMassactionBlock()->addItem('print_shipping_label', [ + $this->getMassactionBlock()->addItem(MassAction::PRINT_SHIPMENT_LABEL, [ 'label' => Mage::helper('sales')->__('Print Shipping Labels'), 'url' => $this->getUrl('*/sales_order_shipment/massPrintShippingLabel'), ]); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php index fad9fcafe8a..c9092e4ea27 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php index c280f038f0c..ab19914be76 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml transaction detail * @@ -37,7 +38,6 @@ class Mage_Adminhtml_Block_Sales_Transactions_Detail extends Mage_Adminhtml_Bloc /** * Add control buttons - * */ public function __construct() { @@ -48,16 +48,16 @@ public function __construct() $backUrl = ($this->_txn->getOrderUrl()) ? $this->_txn->getOrderUrl() : $this->getUrl('*/*/'); $this->_addButton('back', [ 'label' => Mage::helper('sales')->__('Back'), - 'onclick' => "setLocation('{$backUrl}')", + 'onclick' => Mage::helper('core/js')->getSetLocationJs($backUrl), 'class' => 'back' ]); if (Mage::getSingleton('admin/session')->isAllowed('sales/transactions/fetch') - && $this->_txn->getOrderPaymentObject()->getMethodInstance()->canFetchTransactionInfo()) { - $fetchUrl = $this->getUrl('*/*/fetch', ['_current' => true]); + && $this->_txn->getOrderPaymentObject()->getMethodInstance()->canFetchTransactionInfo() + ) { $this->_addButton('fetch', [ 'label' => Mage::helper('sales')->__('Fetch'), - 'onclick' => "setLocation('{$fetchUrl}')", + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/fetch', ['_current' => true])), 'class' => 'button' ]); } @@ -70,9 +70,20 @@ public function __construct() */ public function getHeaderText() { - return Mage::helper('sales')->__("Transaction # %s | %s", $this->_txn->getTxnId(), $this->formatDate($this->_txn->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true)); + return Mage::helper('sales')->__( + "Transaction # %s | %s", + $this->_txn->getTxnId(), + $this->formatDate( + $this->_txn->getCreatedAt(), + Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, + true + ) + ); } + /** + * @return string + */ protected function _toHtml() { $this->setTxnIdHtml(Mage::helper('adminhtml/sales')->escapeHtmlWithLinks( 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 3cb36005c95..cf30e1db97c 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 @@ -32,7 +32,7 @@ class Mage_Adminhtml_Block_Shipping_Carrier_Tablerate_Grid extends Mage_Adminhtm /** * Website filter * - * @var int + * @var int|null */ protected $_websiteId; diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php index 393ed2a0b33..663f4ab9765 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php @@ -54,8 +54,7 @@ public function getHeaderText() { if (Mage::registry('sitemap_sitemap')->getId()) { return Mage::helper('sitemap')->__('Edit Sitemap'); - } else { - return Mage::helper('sitemap')->__('New Sitemap'); } + return Mage::helper('sitemap')->__('New Sitemap'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php b/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php index bf3b24cde6c..4169e06f03c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php +++ b/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php @@ -40,13 +40,6 @@ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template */ protected $_storeVarName = 'store'; - /** - * Url for store switcher hint - * - * @var string - */ - protected $_hintUrl; - /** * @var bool */ @@ -62,6 +55,8 @@ public function __construct() } /** + * @return Mage_Core_Model_Resource_Website_Collection + * @throws Mage_Core_Exception * @deprecated */ public function getWebsiteCollection() @@ -95,6 +90,8 @@ public function getWebsites() } /** + * @param Mage_Core_Model_Website|int|string $website + * @return Mage_Core_Model_Resource_Store_Group_Collection * @deprecated */ public function getGroupCollection($website) @@ -108,7 +105,7 @@ public function getGroupCollection($website) /** * Get store groups for specified website * - * @param Mage_Core_Model_Website $website + * @param Mage_Core_Model_Website|int|string|null $website * @return array */ public function getStoreGroups($website) @@ -120,6 +117,8 @@ public function getStoreGroups($website) } /** + * @param Mage_Core_Model_Store_Group|int|string $group + * @return Mage_Core_Model_Resource_Store_Collection * @deprecated */ public function getStoreCollection($group) @@ -138,7 +137,7 @@ public function getStoreCollection($group) /** * Get store views for specified store group * - * @param Mage_Core_Model_Store_Group $group + * @param Mage_Core_Model_Store_Group|int|string|null $group * @return array */ public function getStores($group) @@ -157,6 +156,9 @@ public function getStores($group) return $stores; } + /** + * @return string + */ public function getSwitchUrl() { if ($url = $this->getData('switch_url')) { @@ -165,33 +167,54 @@ public function getSwitchUrl() return $this->getUrl('*/*/*', ['_current' => true, $this->_storeVarName => null]); } + /** + * @param string $varName + * @return $this + */ public function setStoreVarName($varName) { $this->_storeVarName = $varName; return $this; } + /** + * @return mixed + * @throws Exception + */ public function getStoreId() { return $this->getRequest()->getParam($this->_storeVarName); } + /** + * @param array $storeIds + * @return $this + */ public function setStoreIds($storeIds) { $this->_storeIds = $storeIds; return $this; } + /** + * @return array + */ public function getStoreIds() { return $this->_storeIds; } + /** + * @return bool + */ public function isShow() { return !Mage::app()->isSingleStoreMode(); } + /** + * @return string + */ protected function _toHtml() { if (!Mage::app()->isSingleStoreMode()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php index c20ce4c00aa..b592d3b6368 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php +++ b/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php index b7f41f715f0..3aa13095f30 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php index 51504afba0e..f1f494cc39a 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -37,6 +38,9 @@ public function __construct() $this->_removeButton('back'); } + /** + * @return string + */ public function getHeaderText() { return Mage::helper('adminhtml')->__('My Account'); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php index c3033f29868..dcd5bc85985 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php @@ -88,9 +88,9 @@ public function addColumn($name, $params) { $this->_columns[$name] = [ 'label' => empty($params['label']) ? 'Column' : $params['label'], - 'size' => empty($params['size']) ? false : $params['size'], - 'style' => empty($params['style']) ? null : $params['style'], - 'class' => empty($params['class']) ? null : $params['class'], + 'size' => empty($params['size']) ? false : $params['size'], + 'style' => empty($params['style']) ? null : $params['style'], + 'class' => empty($params['class']) ? null : $params['class'], 'renderer' => false, ]; if ((!empty($params['renderer'])) && ($params['renderer'] instanceof Mage_Core_Block_Abstract)) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php index ba506b342c7..1c4a2541605 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php @@ -31,6 +31,6 @@ class Mage_Adminhtml_Block_System_Config_Form_Field_Datetime extends Mage_Adminh protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); - return Mage::app()->getLocale()->date(intval($element->getValue()))->toString($format); + return Mage::app()->getLocale()->date((int) $element->getValue())->toString($format); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php index 3b45ade35d6..79f2e25a9fd 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php @@ -28,6 +28,9 @@ */ class Mage_Adminhtml_Block_System_Config_Form_Field_Export extends Varien_Data_Form_Element_Abstract { + /** + * @return string + */ public function getElementHtml() { $buttonBlock = $this->getForm()->getParent()->getLayout()->createBlock('adminhtml/widget_button'); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php index 6fd04a03fe5..ab8a2f0ee09 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php @@ -32,6 +32,6 @@ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { $element->setValue(Mage::app()->loadCache('admin_notifications_lastcheck')); $format = Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM); - return Mage::app()->getLocale()->date(intval($element->getValue()))->toString($format); + return Mage::app()->getLocale()->date((int) $element->getValue())->toString($format); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php index b2558e38787..826b528b4f7 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php @@ -49,12 +49,14 @@ public function getProfileId() return Mage::registry('current_convert_profile')->getId(); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('current_convert_profile')->getId()) { return $this->escapeHtml(Mage::registry('current_convert_profile')->getName()); - } else { - return Mage::helper('adminhtml')->__('New Profile'); } + return Mage::helper('adminhtml')->__('New Profile'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php index 7dddf28dc5b..cb9c38d63e8 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php index 30b6bbde94f..bbc2f80458b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php index 8610d5db29e..6099a72facd 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php @@ -49,12 +49,14 @@ public function getProfileId() return Mage::registry('current_convert_profile')->getId(); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('current_convert_profile')->getId()) { return $this->escapeHtml(Mage::registry('current_convert_profile')->getName()); - } else { - return Mage::helper('adminhtml')->__('New Profile'); } + return Mage::helper('adminhtml')->__('New Profile'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php index 3e78aa196af..452f9425c7c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php @@ -60,7 +60,8 @@ public function getImportedFiles() while (($entry = $dir->read()) !== false) { if ($entry != '.' && $entry != '..' - && strtolower(substr($entry, strrpos($entry, '.') + 1)) == $this->getParseType()) { + && strtolower(substr($entry, strrpos($entry, '.') + 1)) == $this->getParseType() + ) { $files[] = $entry; } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php index bc68ab341dc..e26fe764eab 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020-2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design.php b/app/code/core/Mage/Adminhtml/Block/System/Design.php index 020a9be2fc8..3136ba92b09 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * @category Mage * @package Mage_Adminhtml @@ -26,6 +27,9 @@ */ class Mage_Adminhtml_Block_System_Design extends Mage_Adminhtml_Block_Template { + /** + * @inheritDoc + */ protected function _prepareLayout() { $this->setTemplate('system/design/index.phtml'); @@ -35,8 +39,8 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('catalog')->__('Add Design Change'), - 'onclick' => "setLocation('" . $this->getUrl('*/*/new') . "')", - 'class' => 'add' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/new')), + 'class' => 'add' ]) ); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php index ddd285eb046..c4f2b922914 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * @category Mage * @package Mage_Adminhtml @@ -33,6 +34,9 @@ public function __construct() $this->setId('design_edit'); } + /** + * @inheritDoc + */ protected function _prepareLayout() { $this->setChild( @@ -40,8 +44,8 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('core')->__('Back'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/') . '\')', - 'class' => 'back' + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/')), + 'class' => 'back' ]) ); @@ -51,21 +55,17 @@ protected function _prepareLayout() ->setData([ 'label' => Mage::helper('core')->__('Save'), 'onclick' => 'designForm.submit()', - 'class' => 'save' + 'class' => 'save' ]) ); - $confirmationMessage = Mage::helper('core')->jsQuoteEscape( - Mage::helper('core')->__('Are you sure?') - ); $this->setChild( 'delete_button', $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('core')->__('Delete'), - 'onclick' => 'confirmSetLocation(\'' . $confirmationMessage . '\', \'' . $this->getDeleteUrl() - . '\')', - 'class' => 'delete' + 'onclick' => Mage::helper('core/js')->getConfirmSetLocationJs($this->getDeleteUrl()), + 'class' => 'delete' ]) ); return parent::_prepareLayout(); @@ -76,6 +76,9 @@ public function getDesignChangeId() return Mage::registry('design')->getId(); } + /** + * @return string + */ public function getDeleteUrl() { return $this->getUrlSecure('*/*/delete', [ @@ -84,24 +87,30 @@ public function getDeleteUrl() ]); } + /** + * @return string + */ public function getSaveUrl() { return $this->getUrl('*/*/save', ['_current' => true]); } + /** + * @return string + */ public function getValidationUrl() { return $this->getUrl('*/*/validate', ['_current' => true]); } + /** + * @return string + */ public function getHeader() { - $header = ''; if (Mage::registry('design')->getId()) { - $header = Mage::helper('core')->__('Edit Design Change'); - } else { - $header = Mage::helper('core')->__('New Design Change'); + return Mage::helper('core')->__('Edit Design Change'); } - return $header; + return Mage::helper('core')->__('New Design Change'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php index 690608cf815..e3609d21b4e 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php @@ -38,9 +38,7 @@ protected function _construct() } /** - * Create add button and grid blocks - * - * @return Mage_Core_Block_Abstract + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php index 17708559b9b..c8687ff9a61 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php @@ -34,6 +34,9 @@ public function __construct() $this->setTemplate('system/email/template/edit.phtml'); } + /** + * @inheritDoc + */ protected function _prepareLayout() { $this->setChild( @@ -151,46 +154,73 @@ protected function _prepareLayout() return parent::_prepareLayout(); } + /** + * @return string + */ public function getBackButtonHtml() { return $this->getChildHtml('back_button'); } + /** + * @return string + */ public function getToggleButtonHtml() { return $this->getChildHtml('toggle_button'); } + /** + * @return string + */ public function getResetButtonHtml() { return $this->getChildHtml('reset_button'); } + /** + * @return string + */ public function getToPlainButtonHtml() { return $this->getChildHtml('to_plain_button'); } + /** + * @return string + */ public function getToHtmlButtonHtml() { return $this->getChildHtml('to_html_button'); } + /** + * @return string + */ public function getSaveButtonHtml() { return $this->getChildHtml('save_button'); } + /** + * @return string + */ public function getPreviewButtonHtml() { return $this->getChildHtml('preview_button'); } + /** + * @return string + */ public function getDeleteButtonHtml() { return $this->getChildHtml('delete_button'); } + /** + * @return string + */ public function getLoadButtonHtml() { return $this->getChildHtml('load_button'); @@ -216,7 +246,6 @@ public function getHeaderText() if ($this->getEditMode()) { return Mage::helper('adminhtml')->__('Edit Email Template'); } - return Mage::helper('adminhtml')->__('New Email Template'); } @@ -250,6 +279,9 @@ public function getPreviewUrl() return $this->getUrl('*/*/preview'); } + /** + * @return bool + */ public function isTextType() { return $this->getEmailTemplate()->isPlain(); @@ -304,7 +336,7 @@ public function getLoadUrl() * Get paths of where current template is used as default * * @param bool $asJSON - * @return string + * @return string|array */ public function getUsedDefaultForPaths($asJSON = true) { @@ -320,7 +352,7 @@ public function getUsedDefaultForPaths($asJSON = true) * Get paths of where current template is currently used * * @param bool $asJSON - * @return string + * @return string|array */ public function getUsedCurrentlyForPaths($asJSON = true) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php index 4af5617686f..70ab72e6eb1 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php index 0a2bf82dd51..6563cab221e 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Store / store view / website delete form container * @@ -30,7 +31,6 @@ class Mage_Adminhtml_Block_System_Store_Delete extends Mage_Adminhtml_Block_Widg { /** * Class constructor - * */ public function __construct() { @@ -48,7 +48,7 @@ public function __construct() $this->_addButton('cancel', [ 'label' => Mage::helper('adminhtml')->__('Cancel'), - 'onclick' => 'setLocation(\'' . $this->getBackUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getBackUrl()), ], 2, 100, 'footer'); } @@ -59,7 +59,11 @@ public function __construct() */ public function getHeaderText() { - return Mage::helper('adminhtml')->__("Delete %s '%s'", $this->getStoreTypeTitle(), $this->escapeHtml($this->getChild('form')->getDataObject()->getName())); + return Mage::helper('adminhtml')->__( + "Delete %s '%s'", + $this->getStoreTypeTitle(), + $this->escapeHtml($this->getChild('form')->getDataObject()->getName()) + ); } /** @@ -83,8 +87,8 @@ public function setStoreTypeTitle($title) public function setBackUrl($url) { $this->setData('back_url', $url); - $this->_updateButton('cancel', 'onclick', "setLocation('" . $url . "')"); - $this->_updateButton('back', 'onclick', "setLocation('" . $url . "')"); + $this->_updateButton('cancel', 'onclick', Mage::helper('core/js')->getSetLocationJs($url)); + $this->_updateButton('back', 'onclick', Mage::helper('core/js')->getSetLocationJs($url)); return $this; } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php index 76febf5c08f..1937fc20fb0 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml store delete group block * @@ -28,6 +29,9 @@ */ class Mage_Adminhtml_Block_System_Store_Delete_Group extends Mage_Adminhtml_Block_Template { + /** + * @inheritDoc + */ protected function _prepareLayout() { $itemId = $this->getRequest()->getParam('group_id'); @@ -43,7 +47,7 @@ protected function _prepareLayout() 'class' => 'cancel' ]) ); - $onClick = "setLocation('" . $this->getUrl('*/*/editGroup', ['group_id' => $itemId]) . "')"; + $onClick = Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/editGroup', ['group_id' => $itemId])); $this->setChild( 'cancel_button', $this->getLayout()->createBlock('adminhtml/widget_button') diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php index 9c673784928..8d1b2e23c56 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml store delete group block * @@ -28,6 +29,9 @@ */ class Mage_Adminhtml_Block_System_Store_Delete_Website extends Mage_Adminhtml_Block_Template { + /** + * @inheritDoc + */ protected function _prepareLayout() { $itemId = $this->getRequest()->getParam('website_id'); @@ -43,7 +47,7 @@ protected function _prepareLayout() 'class' => 'cancel' ]) ); - $onClick = "setLocation('" . $this->getUrl('*/*/editWebsite', ['website_id' => $itemId]) . "')"; + $onClick = Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/editWebsite', ['website_id' => $itemId])); $this->setChild( 'cancel_button', $this->getLayout()->createBlock('adminhtml/widget_button') diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php index 2579c9a130a..fa4831766e5 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml store edit * @@ -60,9 +61,7 @@ public function __construct() $this->_updateButton('save', 'label', $saveLabel); $this->_updateButton('delete', 'label', $deleteLabel); - $this->_updateButton('delete', 'onclick', 'confirmSetLocation(\'' . - Mage::helper('core')->jsQuoteEscape(Mage::helper('core')->__('Are you sure?')) . - '\', \'' . $deleteUrl . '\');'); + $this->_updateButton('delete', 'onclick', Mage::helper('core/js')->getConfirmSetLocationJs($deleteUrl)); if (!Mage::registry('store_data')->isCanDelete()) { $this->_removeButton('delete'); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php index 7ff9043aa60..4de0a0d6b5c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php @@ -147,7 +147,8 @@ protected function _prepareForm() ]); if (Mage::registry('store_action') == 'edit' - || (Mage::registry('store_action') == 'add' && Mage::registry('store_type') == 'group')) { + || (Mage::registry('store_action') == 'add' && Mage::registry('store_type') == 'group') + ) { $websites = Mage::getModel('core/website')->getCollection()->toOptionArray(); $fieldset->addField('group_website_id', 'select', [ 'name' => 'group[website_id]', @@ -226,7 +227,8 @@ protected function _prepareForm() ]); if (Mage::registry('store_action') == 'edit' - || Mage::registry('store_action') == 'add' && Mage::registry('store_type') == 'store') { + || Mage::registry('store_action') == 'add' && Mage::registry('store_type') == 'store' + ) { $websites = Mage::getModel('core/website')->getCollection(); $allgroups = Mage::getModel('core/store_group')->getCollection(); $groups = []; diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php index 316839c49f8..bf93342319e 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml store content block * @@ -36,26 +37,29 @@ public function __construct() parent::__construct(); } + /** + * @inheritDoc + */ protected function _prepareLayout() { /* Add website button */ $this->_addButton('add', [ 'label' => Mage::helper('core')->__('Create Website'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/newWebsite') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/newWebsite')), 'class' => 'add', ]); /* Add Store Group button */ $this->_addButton('add_group', [ 'label' => Mage::helper('core')->__('Create Store'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/newGroup') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/newGroup')), 'class' => 'add', ]); /* Add Store button */ $this->_addButton('add_store', [ 'label' => Mage::helper('core')->__('Create Store View'), - 'onclick' => 'setLocation(\'' . $this->getUrl('*/*/newStore') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/newStore')), 'class' => 'add', ]); 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 da9433927e6..bdcc27fa810 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php @@ -84,9 +84,8 @@ public function getHeaderText() { if ($this->getVariable()->getId()) { return Mage::helper('adminhtml')->__('Custom Variable "%s"', $this->escapeHtml($this->getVariable()->getName())); - } else { - return Mage::helper('adminhtml')->__('New Custom Variable'); } + return Mage::helper('adminhtml')->__('New Custom Variable'); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php index e419c2b2900..e62e3d967d2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Admin tag edit block * @@ -43,7 +44,7 @@ public function __construct() $this->addButton('save_and_edit_button', [ 'label' => Mage::helper('tag')->__('Save and Continue Edit'), - 'onclick' => "saveAndContinueEdit('" . $this->getSaveAndContinueUrl() . "')", + 'onclick' => Mage::helper('core/js')->getSaveAndContinueEditJs($this->getSaveAndContinueUrl()), 'class' => 'save' ], 1); } @@ -72,7 +73,10 @@ protected function _prepareLayout() public function getHeaderText() { if (Mage::registry('current_tag')->getId()) { - return Mage::helper('tag')->__("Edit Tag '%s'", $this->escapeHtml(Mage::registry('current_tag')->getName())); + return Mage::helper('tag')->__( + "Edit Tag '%s'", + $this->escapeHtml(Mage::registry('current_tag')->getName()) + ); } return Mage::helper('tag')->__('New Tag'); } @@ -94,7 +98,16 @@ public function getAcordionsHtml() */ public function getDeleteUrl() { - return $this->getUrl('*/*/delete', ['tag_id' => $this->getRequest()->getParam($this->_objectId), 'ret' => $this->getRequest()->getParam('ret', 'index')]); + return $this->getUrl( + '*/*/delete', + [ + 'tag_id' => $this->getRequest()->getParam($this->_objectId), + 'ret' => $this->getRequest()->getParam( + 'ret', + 'index' + ) + ] + ); } /** @@ -144,7 +157,15 @@ public function getSaveUrl() */ public function getSaveAndContinueUrl() { - return $this->getUrl('*/*/save', ['_current' => true, 'ret' => 'edit', 'continue' => $this->getRequest()->getParam('ret', 'index'), 'store' => Mage::registry('current_tag')->getStoreId()]); + return $this->getUrl( + '*/*/save', + [ + '_current' => true, + 'ret' => 'edit', + 'continue' => $this->getRequest()->getParam('ret', 'index'), + 'store' => Mage::registry('current_tag')->getStoreId() + ] + ); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php index 0d44131cc96..347a30ca606 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml pending tags grid * @@ -137,10 +139,9 @@ protected function _prepareMassaction() $this->setMassactionIdField('tag_id'); $this->getMassactionBlock()->setFormFieldName('tag'); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('tag')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete', ['ret' => 'pending']), - 'confirm' => Mage::helper('tag')->__('Are you sure?') + 'url' => $this->getUrl('*/*/massDelete', ['ret' => 'pending']) ]); /** @var Mage_Tag_Helper_Data $helper */ @@ -149,7 +150,7 @@ protected function _prepareMassaction() array_unshift($statuses, ['label' => '', 'value' => '']); - $this->getMassactionBlock()->addItem('status', [ + $this->getMassactionBlock()->addItem(MassAction::STATUS, [ 'label' => Mage::helper('tag')->__('Change status'), 'url' => $this->getUrl('*/*/massStatus', ['_current' => true, 'ret' => 'pending']), 'additional' => [ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Product.php b/app/code/core/Mage/Adminhtml/Block/Tag/Product.php index 0c36a8dd9c8..e497f968e0c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Product.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php b/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php index 821bd5fa03d..5449cca9c10 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ 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 9b38a918da7..1df070534bb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Admin tag edit block * @@ -29,6 +30,9 @@ */ class Mage_Adminhtml_Block_Tag_Tag_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { + /** + * @throws Mage_Core_Exception + */ public function __construct() { $this->_objectId = 'tag_id'; @@ -37,26 +41,42 @@ public function __construct() parent::__construct(); if ($this->getRequest()->getParam('product_id')) { - $this->_updateButton('back', 'onclick', "setLocation('" . $this->getUrl('*/catalog_product/edit', ['id' => $this->getRequest()->getParam('product_id')]) . "')"); + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs( + $this->getUrl('*/catalog_product/edit', ['id' => $this->getRequest()->getParam('product_id')]) + ) + ); } if ($this->getRequest()->getParam('customer_id')) { - $this->_updateButton('back', 'onclick', "setLocation('" . $this->getUrl('*/customer/edit', ['id' => $this->getRequest()->getParam('customer_id')]) . "')"); + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs( + $this->getUrl('*/customer/edit', ['id' => $this->getRequest()->getParam('customer_id')]) + ) + ); } if ($this->getRequest()->getParam('ret', false) == 'pending') { - $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getUrl('*/*/pending') . '\')'); - $this->_updateButton('delete', 'onclick', 'deleteConfirm(\'' - . Mage::helper('core')->jsQuoteEscape( - Mage::helper('tag')->__('Are you sure you want to do this?') - ) - . '\', \'' - . $this->getUrl( - '*/*/delete', - [$this->_objectId => $this->getRequest()->getParam($this->_objectId), 'ret' => 'pending', - ] + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs($this->getUrl('*/*/pending')) + ); + + $this->_updateButton( + 'delete', + 'onclick', + Mage::helper('core/js')->getDeleteConfirmJs( + $this->getUrl( + '*/*/delete', + [$this->_objectId => $this->getRequest()->getParam($this->_objectId), 'ret' => 'pending'] + ) ) - . '\')'); + ); Mage::register('ret', 'pending'); } @@ -87,12 +107,14 @@ public function getFormHtml() return $html . $this->getChildHtml('accordion'); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('tag_tag')->getId()) { return Mage::helper('tag')->__("Edit Tag '%s'", $this->escapeHtml(Mage::registry('tag_tag')->getName())); - } else { - return Mage::helper('tag')->__('New Tag'); } + return Mage::helper('tag')->__('New Tag'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php index 9bce3f20b16..6c27dff5282 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Adminhtml all tags grid * @@ -126,10 +128,9 @@ protected function _prepareMassaction() $this->setMassactionIdField('tag_id'); $this->getMassactionBlock()->setFormFieldName('tag'); - $this->getMassactionBlock()->addItem('delete', [ + $this->getMassactionBlock()->addItem(MassAction::DELETE, [ 'label' => Mage::helper('tag')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete'), - 'confirm' => Mage::helper('tag')->__('Are you sure?') + 'url' => $this->getUrl('*/*/massDelete') ]); /** @var Mage_Tag_Helper_Data $helper */ @@ -138,7 +139,7 @@ protected function _prepareMassaction() array_unshift($statuses, ['label' => '', 'value' => '']); - $this->getMassactionBlock()->addItem('status', [ + $this->getMassactionBlock()->addItem(MassAction::STATUS, [ 'label' => Mage::helper('tag')->__('Change status'), 'url' => $this->getUrl('*/*/massStatus', ['_current' => true]), 'additional' => [ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Class.php b/app/code/core/Mage/Adminhtml/Block/Tax/Class.php index baeb5173cb2..facd90ad173 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Class.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Class.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php index 6e3d0cb403e..8d27ed2f0bc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -38,15 +39,21 @@ public function __construct() $this->_updateButton('delete', 'label', Mage::helper('tax')->__('Delete Class')); } + /** + * @return string + */ public function getHeaderText() { if (Mage::registry('tax_class')->getId()) { return Mage::helper('tax')->__("Edit Class '%s'", $this->escapeHtml(Mage::registry('tax_class')->getClassName())); - } else { - return Mage::helper('tax')->__('New Class'); } + return Mage::helper('tax')->__('New Class'); } + /** + * @param string $classType + * @return $this + */ public function setClassType($classType) { $this->getChild('form')->setClassType($classType); diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php index eb9c3af4767..37b0c276440 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php @@ -44,6 +44,20 @@ protected function _prepareCollection() return parent::_prepareCollection(); } + protected function _setCollectionOrder($column) + { + $collection = $this->getCollection(); + if ($collection) { + $columnIndex = $column->getFilterIndex() ?: $column->getIndex(); + $collection->setOrder($columnIndex, strtoupper($column->getDir())); + + if ($columnIndex === 'region_table.code') { + $collection->addOrder('code', strtoupper($column->getDir())); + } + } + return $this; + } + protected function _prepareColumns() { $this->addColumn('code', [ @@ -95,6 +109,10 @@ protected function _prepareColumns() return parent::_prepareColumns(); } + /** + * @param Mage_Tax_Model_Calculation_Rate $row + * @return string + */ public function getRowUrl($row) { return $this->getUrl('*/*/edit', ['rate' => $row->getTaxCalculationRateId()]); diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php index 583492bdd6b..6a91e14fb7d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php index 9e43271c657..8ef8e306049 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -30,7 +31,7 @@ class Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Data extends Mage_Adminhtml_Bl protected function _getValue(Varien_Object $row) { $data = parent::_getValue($row); - if (intval($data) == $data) { + if ((int) $data == $data) { return (string) number_format($data, 2); } if (!is_null($data)) { diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php index f41040fdcf5..bc0c8aa974f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Admin tax rate save toolbar * @@ -50,7 +51,7 @@ protected function _prepareLayout() ->setData([ 'label' => Mage::helper('tax')->__('Back'), 'onclick' => 'window.location.href=\'' . $this->getUrl('*/*/') . '\'', - 'class' => 'back' + 'class' => 'back' ]) ); @@ -69,7 +70,7 @@ protected function _prepareLayout() ->setData([ 'label' => Mage::helper('tax')->__('Save Rate'), 'onclick' => 'wigetForm.submit();return false;', - 'class' => 'save' + 'class' => 'save' ]) ); @@ -78,14 +79,10 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button') ->setData([ 'label' => Mage::helper('tax')->__('Delete Rate'), - 'onclick' => 'deleteConfirm(\'' - . Mage::helper('core')->jsQuoteEscape( - Mage::helper('tax')->__('Are you sure you want to do this?') - ) - . '\', \'' - . $this->getUrl('*/*/delete', ['rate' => $this->getRequest()->getParam('rate')]) - . '\')', - 'class' => 'delete' + 'onclick' => Mage::helper('core/js')->getDeleteConfirmJs( + $this->getUrl('*/*/delete', ['rate' => $this->getRequest()->getParam('rate')]) + ), + 'class' => 'delete' ]) ); return parent::_prepareLayout(); @@ -121,7 +118,7 @@ public function getSaveButtonHtml() */ public function getDeleteButtonHtml() { - if (intval($this->getRequest()->getParam('rate')) == 0) { + if ((int) $this->getRequest()->getParam('rate') == 0) { return; } return $this->getChildHtml('deleteButton'); diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php index f1bd2534a53..79d92d8e166 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php @@ -56,8 +56,7 @@ public function getHeaderText() { if (Mage::registry('tax_rule')->getId()) { return Mage::helper('tax')->__("Edit Rule"); - } else { - return Mage::helper('tax')->__('New Rule'); } + return Mage::helper('tax')->__('New Rule'); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php index 03751e742ac..47a2bbe8d8c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Block for Urlrewrites edit form and selectors container * @@ -50,7 +51,7 @@ protected function _prepareLayout() $this->setTemplate('urlrewrite/edit.phtml'); $this->_addButton('back', [ 'label' => Mage::helper('adminhtml')->__('Back'), - 'onclick' => 'setLocation(\'' . Mage::helper('adminhtml')->getUrl('*/*/') . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs(Mage::helper('adminhtml')->getUrl('*/*/')), 'class' => 'back', 'level' => -1 ]); @@ -105,7 +106,11 @@ protected function _prepareLayout() 'level' => -1 ]) ); - $this->_updateButton('back', 'onclick', 'setLocation(\'' . Mage::helper('adminhtml')->getUrl('*/*/edit') . 'product\')'); + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs(Mage::helper('adminhtml')->getUrl('*/*/edit') . 'product') + ); } } elseif ($this->getCategoryId()) { // edit form for category $this->_headerText = Mage::helper('adminhtml')->__('Add URL Rewrite for a Category'); @@ -175,7 +180,11 @@ protected function _setFormChild() $suffix = 'category'; } } - $this->_updateButton('back', 'onclick', 'setLocation(\'' . Mage::helper('adminhtml')->getUrl('*/*/' . $action, $params) . $suffix . '\')'); + $this->_updateButton( + 'back', + 'onclick', + Mage::helper('core/js')->getSetLocationJs(Mage::helper('adminhtml')->getUrl('*/*/' . $action, $params) . $suffix) + ); return $this; } @@ -267,6 +276,9 @@ public function updateModeLayout($mode = null) return $this; } + /** + * @return string + */ public function getHeaderCssClass() { return 'icon-head head-urlrewrite'; diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/Container.php index f64aeddd07c..809c42c3067 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Container.php @@ -166,9 +166,7 @@ public function updateButton($id, $key, $data) } /** - * Preparing child blocks for each added button - * - * @return Mage_Core_Block_Abstract + * @inheritDoc */ protected function _prepareLayout() { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php index ce46284dd80..84b6a1dd24f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml form container block * @@ -44,7 +45,7 @@ public function __construct() $this->_addButton('back', [ 'label' => Mage::helper('adminhtml')->__('Back'), - 'onclick' => 'setLocation(\'' . $this->getBackUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getBackUrl()), 'class' => 'back', ], -1); $this->_addButton('reset', [ @@ -54,17 +55,11 @@ public function __construct() $objId = $this->getRequest()->getParam($this->_objectId); - if (! empty($objId)) { + if (!empty($objId)) { $this->_addButton('delete', [ 'label' => Mage::helper('adminhtml')->__('Delete'), 'class' => 'delete', - 'onclick' => 'deleteConfirm(\'' - . Mage::helper('core')->jsQuoteEscape( - Mage::helper('adminhtml')->__('Are you sure you want to do this?') - ) - . '\', \'' - . $this->getDeleteUrl() - . '\')', + 'onclick' => Mage::helper('core/js')->getDeleteConfirmJs($this->getDeleteUrl()) ]); } @@ -75,6 +70,9 @@ public function __construct() ], 1); } + /** + * @inheritDoc + */ protected function _prepareLayout() { if ($this->_blockGroup && $this->_controller && $this->_mode) { @@ -98,6 +96,10 @@ public function getBackUrl() return $this->getUrl('*/*/'); } + /** + * @return string + * @throws Exception + */ public function getDeleteUrl() { return $this->getUrl('*/*/delete', [ @@ -131,12 +133,18 @@ public function getFormActionUrl() return $this->getUrl('*/' . $this->_controller . '/save'); } + /** + * @return string + */ public function getFormHtml() { $this->getChild('form')->setData('action', $this->getSaveUrl()); return $this->getChildHtml('form'); } + /** + * @return string + */ public function getFormInitScripts() { if (!empty($this->_formInitScripts) && is_array($this->_formInitScripts)) { @@ -145,6 +153,9 @@ public function getFormInitScripts() return ''; } + /** + * @return string + */ public function getFormScripts() { if (!empty($this->_formScripts) && is_array($this->_formScripts)) { @@ -153,16 +164,25 @@ public function getFormScripts() return ''; } + /** + * @return string + */ public function getHeaderWidth() { return ''; } + /** + * @return string + */ public function getHeaderCssClass() { return 'icon-head head-' . strtr($this->_controller, '_', '-'); } + /** + * @return string + */ public function getHeaderHtml() { return '

' . $this->getHeaderText() . '

'; diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php index e4eb7caaffe..a1205cedb2a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index ac761cd0c7a..5441800c834 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -52,7 +52,7 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget /** * Collection object * - * @var Varien_Data_Collection + * @var Mage_Core_Model_Resource_Db_Collection_Abstract|null */ protected $_collection = null; @@ -313,7 +313,7 @@ public function getMainButtonsHtml() /** * set collection object * - * @param Varien_Data_Collection|Varien_Data_Collection_Db $collection + * @param Mage_Core_Model_Resource_Db_Collection_Abstract $collection */ public function setCollection($collection) { @@ -323,7 +323,7 @@ public function setCollection($collection) /** * get collection object * - * @return Varien_Data_Collection|Varien_Data_Collection_Db + * @return Mage_Core_Model_Resource_Db_Collection_Abstract */ public function getCollection() { @@ -1710,7 +1710,7 @@ public function setSubTotals(array $items) * Retrieve subtotal item * * @param Varien_Object $item - * @return Varien_Object + * @return Varien_Object|string */ public function getSubTotalItem($item) { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php index 74176c25c54..9c9f03fa1ee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php @@ -31,14 +31,21 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Date extends Mage_Adminhtml { protected $_locale; + /** + * @inheritDoc + */ protected function _prepareLayout() { if ($head = $this->getLayout()->getBlock('head')) { $head->setCanLoadCalendarJs(true); } - return $this; + return parent::_prepareLayout(); } + /** + * @return string + * @throws Exception + */ public function getHtml() { $htmlId = $this->_getHtmlId() . microtime(true); @@ -170,7 +177,7 @@ public function getLocale() * * @param string $date * @param string $locale - * @return Zend_Date + * @return Zend_Date|null */ protected function _convertDate($date, $locale) { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php index 1ccc033c26d..a3f3e3b6d4c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php @@ -62,7 +62,7 @@ public function getValue($index = null) * * @param string $date * @param string $locale - * @return Zend_Date + * @return Zend_Date|null */ protected function _convertDate($date, $locale) { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php index 1436466b1b6..775cccb1845 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php @@ -56,7 +56,7 @@ protected function _getOptions() * Render an option with selected value * * @param array $option - * @param string $value + * @param string|null $value * @return string */ protected function _renderOption($option, $value) diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php index 1dc5b898f44..6b1803c71ff 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php index 4a85d9e3203..f95dc42d8b9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php @@ -50,7 +50,7 @@ public function render(Varien_Object $row) return $data; } - $data = floatval($data) * $this->_getRate($row); + $data = (float) $data * $this->_getRate($row); $sign = (bool)(int)$this->getColumn()->getShowNumberSign() && ($data > 0) ? '+' : ''; $data = sprintf("%F", $data); $data = Mage::app()->getLocale()->currency($currency_code)->toCurrency($data); @@ -85,10 +85,10 @@ protected function _getCurrencyCode($row) protected function _getRate($row) { if ($rate = $this->getColumn()->getRate()) { - return floatval($rate); + return (float) $rate; } if ($rate = $row->getData($this->getColumn()->getRateField())) { - return floatval($rate); + return (float) $rate; } return 1; } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php index ade000dbcda..bd870af7a3a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php index 8812e64a7c3..ec7ec218edb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php index fd4575f11ef..8faa2b88bf1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,6 +33,8 @@ class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Ip extends Mage_Adminhtml * * @param Varien_Object $row * @return string + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function render(Varien_Object $row) { diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php index c64cab22d34..da7a31e5ade 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php index 2a7b9f414ac..cd6c7022d6e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php @@ -49,7 +49,7 @@ public function render(Varien_Object $row) return $data; } - $data = floatval($data) * $this->_getRate($row); + $data = (float) $data * $this->_getRate($row); $data = sprintf("%F", $data); $data = Mage::app()->getLocale()->currency($currency_code)->toCurrency($data); return $data; @@ -83,10 +83,10 @@ protected function _getCurrencyCode($row) protected function _getRate($row) { if ($rate = $this->getColumn()->getRate()) { - return floatval($rate); + return (float) $rate; } if ($rate = $row->getData($this->getColumn()->getRateField())) { - return floatval($rate); + return (float) $rate; } return 1; } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php index 4445f27248c..1c6396f7257 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php index b8d506ec0ed..a70b083979c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2018 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2018-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Theme.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Theme.php index fe580c527e8..8f943b57853 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Theme.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Theme.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php index 10f8a621ac0..7377068f05d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php @@ -19,6 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** * Adminhtml grid container block * @@ -55,7 +56,7 @@ public function __construct() $this->_addButton('add', [ 'label' => $this->getAddButtonLabel(), - 'onclick' => 'setLocation(\'' . $this->getCreateUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getCreateUrl()), 'class' => 'add', ]); } @@ -111,7 +112,7 @@ protected function _addBackButton() { $this->_addButton('back', [ 'label' => $this->getBackButtonLabel(), - 'onclick' => 'setLocation(\'' . $this->getBackUrl() . '\')', + 'onclick' => Mage::helper('core/js')->getSetLocationJs($this->getBackUrl()), 'class' => 'back', ]); } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php index d29ab5de16f..b0c50bb2b36 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract as MassAction; + /** * Grid widget massaction block * @@ -32,6 +34,48 @@ */ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage_Adminhtml_Block_Widget { + /**#@+ + * Current massactions + * @var string + */ + public const ASSIGN_GROUP = 'assign_group'; + public const ATTRIBUTES = 'attributes'; + public const CANCEL_ORDER = 'cancel_order'; + public const CHANGE_MODE = 'change_mode'; + public const ENABLE = 'enable'; + public const DELETE = 'delete'; + public const DISABLE = 'disable'; + public const HOLD_ORDER = 'hold_order'; + public const MARK_AS_READ = 'mark_as_read'; + public const NEWSLETTER_SUBSCRIBE = 'newsletter_subscribe'; + public const NEWSLETTER_UNSUBSCRIBE = 'newsletter_unsubscribe'; + public const PDF_CREDITMEMOS_ORDER = 'pdfcreditmemos_order'; + public const PDF_DOCS_ORDER = 'pdfdocs_order'; + public const PDF_INVOICE_ORDER = 'pdfinvoices_order'; + public const PDF_SHIPMENTS_ORDER = 'pdfshipments_order'; + public const PRINT_SHIPMENT_LABEL = 'print_shipping_label'; + public const REFRESH = 'refresh'; + public const REFRESH_LIFETIME = 'refresh_lifetime'; + public const REFRESH_RECENT = 'refresh_recent'; + public const REINDEX = 'reindex'; + public const REMOVE = 'remove'; + public const STATUS = 'status'; + public const UNHOLD_ORDER = 'unhold_order'; + public const UNSUBSCRIBE = 'unsubscribe'; + public const UPDATE_STATUS = 'update_status'; + /**#@-*/ + + /** + * @var string[] + */ + protected static $needsConfirm = [ + self::CANCEL_ORDER, + self::HOLD_ORDER, + self::UNHOLD_ORDER, + self::DELETE, + self::REMOVE + ]; + /** * Massaction items * @@ -66,6 +110,10 @@ public function __construct() */ public function addItem($itemId, array $item) { + if (is_string($itemId) && $this->isConfirmMassAction($itemId) && !isset($item['confirm'])) { + $item['confirm'] = Mage::helper('core')->__('Are you sure?'); + } + $this->_items[$itemId] = $this->getLayout()->createBlock('adminhtml/widget_grid_massaction_item') ->setData($item) ->setMassaction($this) @@ -83,7 +131,7 @@ public function addItem($itemId, array $item) * Retrieve massaction item with id $itemId * * @param string $itemId - * @return Mage_Adminhtml_Block_Widget_Grid_Massaction_Item + * @return Mage_Adminhtml_Block_Widget_Grid_Massaction_Item|null */ public function getItem($itemId) { @@ -215,6 +263,9 @@ public function getApplyButtonHtml() return $this->getButtonHtml($this->__('Submit'), $this->getJsObjectName() . ".apply()"); } + /** + * @return string + */ public function getJavaScript() { return " var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', " @@ -227,6 +278,9 @@ public function getJavaScript() . "{$this->getJsObjectName()}.errorText = '{$this->getErrorText()}';"; } + /** + * @return string + */ public function getGridIdsJson() { if (!$this->getUseSelectAll()) { @@ -241,6 +295,9 @@ public function getGridIdsJson() return ''; } + /** + * @return string + */ public function getHtmlId() { return $this->getParentBlock()->getHtmlId() . '_massaction'; @@ -304,4 +361,13 @@ public function getGroupedItems(): array return $groupedItems; } + + /** + * @param string $itemId + * @return bool + */ + protected function isConfirmMassAction(string $itemId): bool + { + return in_array($itemId, static::$needsConfirm); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php index 631c149fe9e..4fc01e8a3ee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php @@ -172,7 +172,8 @@ public function getActiveTabId() public function setActiveTab($tabId) { if (isset($this->_tabs[$tabId]) && $this->canShowTab($this->_tabs[$tabId]) - && !$this->getTabIsHidden($this->_tabs[$tabId])) { + && !$this->getTabIsHidden($this->_tabs[$tabId]) + ) { $this->_activeTab = $tabId; } return $this; diff --git a/app/code/core/Mage/Adminhtml/Controller/Action.php b/app/code/core/Mage/Adminhtml/Controller/Action.php index 8409cb0a29e..3a1392a2636 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Action.php +++ b/app/code/core/Mage/Adminhtml/Controller/Action.php @@ -209,7 +209,8 @@ public function preDispatch() if ($this->getRequest()->isDispatched() && $this->getRequest()->getActionName() !== 'denied' - && !$this->_isAllowed()) { + && !$this->_isAllowed() + ) { $this->_forward('denied'); $this->setFlag('', self::FLAG_NO_DISPATCH, true); return $this; @@ -218,7 +219,8 @@ public function preDispatch() if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED) && !$this->getRequest()->getParam('forwarded') && !$this->_getSession()->getIsUrlNotice(true) - && !Mage::getConfig()->getNode('global/can_use_base_url')) { + && !Mage::getConfig()->getNode('global/can_use_base_url') + ) { //$this->_checkUrlSettings(); $this->setFlag('', self::FLAG_IS_URLS_CHECKED, true); } @@ -402,7 +404,8 @@ protected function _validateSecretKey() } if (!($secretKey = $this->getRequest()->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME, null)) - || !hash_equals(Mage::getSingleton('adminhtml/url')->getSecretKey(), $secretKey)) { + || !hash_equals(Mage::getSingleton('adminhtml/url')->getSecretKey(), $secretKey) + ) { return false; } return true; diff --git a/app/code/core/Mage/Adminhtml/Helper/Addresses.php b/app/code/core/Mage/Adminhtml/Helper/Addresses.php index eeab29a8dbf..54f1dc6bb7f 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Addresses.php +++ b/app/code/core/Mage/Adminhtml/Helper/Addresses.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Catalog.php b/app/code/core/Mage/Adminhtml/Helper/Catalog.php index 7643a566fb9..2e2bc36b03d 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Catalog.php +++ b/app/code/core/Mage/Adminhtml/Helper/Catalog.php @@ -35,7 +35,7 @@ class Mage_Adminhtml_Helper_Catalog extends Mage_Core_Helper_Abstract /** * Attribute Tab block name for product edit * - * @var string + * @var string|null */ protected $_attributeTabBlock = null; @@ -49,7 +49,7 @@ class Mage_Adminhtml_Helper_Catalog extends Mage_Core_Helper_Abstract /** * Retrieve Attribute Tab Block Name for Product Edit * - * @return string + * @return string|null */ public function getAttributeTabBlock() { diff --git a/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php b/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php index c6c60da9df5..008e688fb64 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php @@ -31,14 +31,14 @@ class Mage_Adminhtml_Helper_Catalog_Product_Edit_Action_Attribute extends Mage_C /** * Selected products for mass-update * - * @var Mage_Catalog_Model_Resource_Product_Collection + * @var Mage_Catalog_Model_Resource_Product_Collection|null */ protected $_products; /** * Array of same attributes for selected products * - * @var Mage_Eav_Model_Resource_Entity_Attribute_Collection + * @var Mage_Eav_Model_Resource_Entity_Attribute_Collection|null */ protected $_attributes; @@ -75,7 +75,7 @@ public function getProducts() /** * Return array of selected product ids from post or session * - * @return string|null + * @return array|string|null */ public function getProductIds() { diff --git a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php index 3ab6578a0df..1ec0dde3d4f 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php @@ -31,7 +31,7 @@ abstract class Mage_Adminhtml_Helper_Dashboard_Abstract extends Mage_Core_Helper /** * Helper collection * - * @var Mage_Core_Model_Resource_Db_Collection_Abstract|Mage_Eav_Model_Entity_Collection_Abstract|array + * @var Mage_Core_Model_Resource_Db_Collection_Abstract|Mage_Eav_Model_Entity_Collection_Abstract|array|null */ protected $_collection; diff --git a/app/code/core/Mage/Adminhtml/Helper/Data.php b/app/code/core/Mage/Adminhtml/Helper/Data.php index 4daea40f1bc..38517ce708e 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Data.php +++ b/app/code/core/Mage/Adminhtml/Helper/Data.php @@ -69,11 +69,32 @@ public function setPageHelpUrl($url = null, $suffix = null) return $this; } + /** + * Add suffix for help page url + * + * @param string $suffix + * @return $this + * @deprecated + */ + public function addPageHelpUrl($suffix) + { + $this->_pageHelpUrl = $this->getPageHelpUrl(null, $suffix); + return $this; + } + + /** + * @param string $route + * @param array $params + * @return string + */ public static function getUrl($route = '', $params = []) { return Mage::getModel('adminhtml/url')->getUrl($route, $params); } + /** + * @return false|int + */ public function getCurrentUserId() { if (Mage::getSingleton('admin/session')->getUser()) { diff --git a/app/code/core/Mage/Adminhtml/Helper/Rss.php b/app/code/core/Mage/Adminhtml/Helper/Rss.php index 0633d6c8a45..d9ace1c56ce 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Rss.php +++ b/app/code/core/Mage/Adminhtml/Helper/Rss.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Config.php b/app/code/core/Mage/Adminhtml/Model/Config.php index 9528265aba1..e2870684187 100644 --- a/app/code/core/Mage/Adminhtml/Model/Config.php +++ b/app/code/core/Mage/Adminhtml/Model/Config.php @@ -143,7 +143,7 @@ protected function _initSectionsAndTabs() * @param string $sectionCode * @param string $websiteCode * @param string $storeCode - * @return Varien_Simplexml_Element + * @return Varien_Simplexml_Element|void */ public function getSection($sectionCode = null, $websiteCode = null, $storeCode = null) { diff --git a/app/code/core/Mage/Adminhtml/Model/Config/Data.php b/app/code/core/Mage/Adminhtml/Model/Config/Data.php index 731161f688f..4b31b79f733 100644 --- a/app/code/core/Mage/Adminhtml/Model/Config/Data.php +++ b/app/code/core/Mage/Adminhtml/Model/Config/Data.php @@ -50,14 +50,14 @@ class Mage_Adminhtml_Model_Config_Data extends Varien_Object /** * Config data for sections * - * @var array + * @var array|null */ protected $_configData; /** * Root config node * - * @var Mage_Core_Model_Config_Element + * @var Mage_Core_Model_Config_Element|null */ protected $_configRoot; @@ -468,13 +468,10 @@ protected function _isValidField($field) switch ($this->getScope()) { case self::SCOPE_DEFAULT: return (bool)(int)$field->show_in_default; - break; case self::SCOPE_WEBSITES: return (bool)(int)$field->show_in_website; - break; case self::SCOPE_STORES: return (bool)(int)$field->show_in_store; - break; } return true; diff --git a/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php b/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php index 0c82cebd513..16ca2bc1609 100644 --- a/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php +++ b/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php @@ -59,7 +59,7 @@ public function render(Varien_Data_Form_Element_Abstract $element) $regionCollection = self::$_regionCollections[$countryId]; } - $regionId = intval($element->getForm()->getElement('region_id')->getValue()); + $regionId = (int) $element->getForm()->getElement('region_id')->getValue(); $htmlAttributes = $element->getHtmlAttributes(); foreach ($htmlAttributes as $key => $attribute) { diff --git a/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php b/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php index 74a68691dca..0f7c642323a 100644 --- a/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php +++ b/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php @@ -271,10 +271,12 @@ public function importAllowQuoteItemsFromProducts($products) } if (in_array($item->getId(), $allowedItems) - && !isset($data['giftmessage'])) { + && !isset($data['giftmessage']) + ) { $deleteAllowedItems[] = $item->getId(); } elseif (!in_array($item->getId(), $allowedItems) - && isset($data['giftmessage'])) { + && isset($data['giftmessage']) + ) { $allowedItems[] = $item->getId(); } } @@ -299,10 +301,12 @@ public function importAllowQuoteItemsFromItems($items) } if (in_array($item->getId(), $allowedItems) - && !isset($data['giftmessage'])) { + && !isset($data['giftmessage']) + ) { $deleteAllowedItems[] = $item->getId(); } elseif (!in_array($item->getId(), $allowedItems) - && isset($data['giftmessage'])) { + && isset($data['giftmessage']) + ) { $allowedItems[] = $item->getId(); } } diff --git a/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php b/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php index 68acf6d6f45..0854e868100 100644 --- a/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php +++ b/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php index b9d17736636..e6245c719d2 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php @@ -40,21 +40,21 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object implements M /** * Quote customer wishlist model object * - * @var Mage_Wishlist_Model_Wishlist + * @var Mage_Wishlist_Model_Wishlist|false|null */ protected $_wishlist; /** * Sales Quote instance * - * @var Mage_Sales_Model_Quote + * @var Mage_Sales_Model_Quote|null */ protected $_cart; /** * Catalog Compare List instance * - * @var Mage_Catalog_Model_Product_Compare_List + * @var Mage_Catalog_Model_Product_Compare_List|false|null */ protected $_compareList; @@ -89,14 +89,14 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object implements M /** * Customer Address Form instance * - * @var Mage_Customer_Model_Form + * @var Mage_Customer_Model_Form|null */ protected $_customerAddressForm; /** * Customer Form instance * - * @var Mage_Customer_Model_Form + * @var Mage_Customer_Model_Form|null */ protected $_customerForm; @@ -292,10 +292,13 @@ public function initFromOrder(Mage_Sales_Model_Order $order) * Initialize catalog rule data with new session values */ $this->initRuleData(); - foreach ($order->getItemsCollection( + + $itemsCollection = $order->getItemsCollection( array_keys(Mage::getConfig()->getNode('adminhtml/sales/order/create/available_product_types')->asArray()), true - ) as $orderItem) { + ); + + foreach ($itemsCollection as $orderItem) { /** @var Mage_Sales_Model_Order_Item $orderItem */ if (!$orderItem->getParentItem()) { if ($order->getReordered()) { @@ -1703,7 +1706,7 @@ protected function _putCustomerIntoQuote() protected function _saveCustomerAfterOrder($order) { if ($this->_customer) { - if (! $this->_customer->getId()) { + if (!$this->_customer->getId()) { $billing = $this->getBillingAddress(); $customerBilling = $billing->exportCustomerAddress(); $shipping = $this->getShippingAddress(); @@ -1711,7 +1714,7 @@ protected function _saveCustomerAfterOrder($order) $this->_customer->addAddress($customerBilling); - if (! $shipping->getSameAsBilling()) { + if (!$shipping->getSameAsBilling()) { $this->_customer->addAddress($customerShipping); } // preliminary save to find addresses id diff --git a/app/code/core/Mage/Adminhtml/Model/Session.php b/app/code/core/Mage/Adminhtml/Model/Session.php index 26d4ccdb7c3..5bfb2fbd4c8 100644 --- a/app/code/core/Mage/Adminhtml/Model/Session.php +++ b/app/code/core/Mage/Adminhtml/Model/Session.php @@ -26,8 +26,8 @@ * @package Mage_Adminhtml * @author Magento Core Team * - * @method string getProductIds() - * @method $this setProductIds(string $value) + * @method array|string getProductIds() + * @method $this setProductIds(array|string $value) */ class Mage_Adminhtml_Model_Session extends Mage_Core_Model_Session_Abstract { diff --git a/app/code/core/Mage/Adminhtml/Model/Session/Quote.php b/app/code/core/Mage/Adminhtml/Model/Session/Quote.php index 5cf0315555e..010203188d4 100644 --- a/app/code/core/Mage/Adminhtml/Model/Session/Quote.php +++ b/app/code/core/Mage/Adminhtml/Model/Session/Quote.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -50,28 +50,28 @@ class Mage_Adminhtml_Model_Session_Quote extends Mage_Core_Model_Session_Abstrac /** * Quote model object * - * @var Mage_Sales_Model_Quote + * @var Mage_Sales_Model_Quote|null */ protected $_quote = null; /** * Customer mofrl object * - * @var Mage_Customer_Model_Customer + * @var Mage_Customer_Model_Customer|null */ protected $_customer = null; /** * Store model object * - * @var Mage_Core_Model_Store + * @var Mage_Core_Model_Store|null */ protected $_store = null; /** * Order model object * - * @var Mage_Sales_Model_Order + * @var Mage_Sales_Model_Order|null */ protected $_order = null; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php index ca9ff2f8b4a..3dc868876a7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php index 46473ba290a..93033227375 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php @@ -26,9 +26,18 @@ */ class Mage_Adminhtml_Model_System_Config_Backend_Baseurl extends Mage_Core_Model_Config_Data { + /** + * @return $this + * @throws Mage_Core_Exception + */ protected function _beforeSave() { - $value = $this->getValue(); + $value = str_replace(' ', '', $this->getValue()); + + if ($value === '') { + $label = $this->getFieldConfig()->descend('label'); + Mage::throwException(Mage::helper('core')->__('"%s" is a required value.', $label)); + } if (!preg_match('#^{{((un)?secure_)?base_url}}#', $value)) { $value = Mage::helper('core/url')->encodePunycode($value); @@ -64,9 +73,7 @@ protected function _afterSave() } /** - * Processing object after load data - * - * @return Mage_Core_Model_Abstract + * @inheritDoc */ protected function _afterLoad() { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php index 1dd550608e3..805d12df486 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php @@ -67,7 +67,7 @@ protected function _getCurrencyBase() $this->getScopeId() ); } - return strval($value); + return (string) $value; } /** @@ -84,6 +84,6 @@ protected function _getCurrencyDefault() $this->getScopeId() ); } - return strval($value); + return (string) $value; } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php index 2050cb4f33c..45ef5c929da 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php @@ -39,8 +39,8 @@ protected function _afterSave() $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; $cronExprArray = [ - intval($time[1]), # Minute - intval($time[0]), # Hour + (int) $time[1], # Minute + (int) $time[0], # Hour ($frequency == $frequencyMonthly) ? '1' : '*', # Day of the Month '*', # Month of the Year ($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php index a0d125e5c05..fd5adc5b2d4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php index 35757772efa..1e8ad471696 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php @@ -59,7 +59,6 @@ protected function _beforeSave() $result = $uploader->save($uploadDir); } catch (Exception $e) { Mage::throwException($e->getMessage()); - return $this; } $filename = $result['file']; diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php index b797f6adc58..9b40da97c93 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php @@ -47,8 +47,8 @@ protected function _afterSave() if ($enabled) { $cronExprArray = [ - intval($time[1]), # Minute - intval($time[0]), # Hour + (int) $time[1], # Minute + (int) $time[0], # Hour ($frequency == $frequencyMonthly) ? '1' : '*', # Day of the Month '*', # Month of the Year ($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Passwordlength.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Passwordlength.php index b3d12e0abcf..e88d0d3f0e5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Passwordlength.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Passwordlength.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php index 3518fbed969..17a3edb2f6e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php @@ -40,8 +40,8 @@ protected function _afterSave() $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; $cronExprArray = [ - intval($time[1]), # Minute - intval($time[0]), # Hour + (int) $time[1], # Minute + (int) $time[0], # Hour ($frequency == $frequencyMonthly) ? '1' : '*', # Day of the Month '*', # Month of the Year ($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php index 7c32143f733..6ef1edf3891 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php @@ -40,8 +40,8 @@ protected function _afterSave() $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; $cronExprArray = [ - intval($time[1]), # Minute - intval($time[0]), # Hour + (int) $time[1], # Minute + (int) $time[0], # Hour ($frequency == $frequencyMonthly) ? '1' : '*', # Day of the Month '*', # Month of the Year ($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php index df842b42e91..3358beaaaad 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Url.php b/app/code/core/Mage/Adminhtml/Model/Url.php index d0c0dc94388..6b3ae640dcd 100644 --- a/app/code/core/Mage/Adminhtml/Model/Url.php +++ b/app/code/core/Mage/Adminhtml/Model/Url.php @@ -44,7 +44,7 @@ public function getSecure() if ($this->hasData('secure_is_forced')) { return $this->getData('secure'); } - return Mage::getStoreConfigFlag('web/secure/use_in_adminhtml'); + return Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_SECURE_IN_ADMINHTML); } /** diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php index d2c1688ae2f..dd5a6f8ea2f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php @@ -85,7 +85,7 @@ public function editRoleAction() $this->_initAction(); $roleId = $this->getRequest()->getParam('rid'); - if (intval($roleId) > 0) { + if ((int) $roleId > 0) { $breadCrumb = $this->__('Edit Role'); $breadCrumbTitle = $this->__('Edit Role'); $this->_title($this->__('Edit Role')); @@ -221,7 +221,6 @@ protected function _deleteUserFromRole($userId, $roleId) ->deleteFromRole(); } catch (Exception $e) { throw $e; - return false; } return true; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php index 8867a4f95bf..14c779a6fac 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php @@ -81,7 +81,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError($this->__('This user no longer exists.')); $this->_redirect('*/*/'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index 8f6dbe537cc..eb4f2eee64c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -118,7 +118,8 @@ public function editAction() if ($_prevCategoryId && !$this->getRequest()->getQuery('isAjax') - && !$this->getRequest()->getParam('clear')) { + && !$this->getRequest()->getParam('clear') + ) { $this->getRequest()->setParam('id', $_prevCategoryId); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php index ec5156b0e1f..ac11e0cee6a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -100,7 +100,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError( Mage::helper('catalog')->__('This attribute no longer exists') ); @@ -120,7 +120,7 @@ public function editAction() // set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getAttributeData(true); - if (! empty($data)) { + if (!empty($data)) { $model->addData($data); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php index da2b82c533f..39a816db2bf 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php @@ -132,7 +132,7 @@ public function saveAction() if (($data = $this->getRequest()->getPost()) && ($reviewId = $this->getRequest()->getParam('id'))) { $review = Mage::getModel('review/review')->load($reviewId); $session = Mage::getSingleton('adminhtml/session'); - if (! $review->getId()) { + if (!$review->getId()) { $session->addError(Mage::helper('catalog')->__('The review was removed by another user or does not exist.')); } else { try { @@ -300,7 +300,7 @@ public function jsonProductInfoAction() { $response = new Varien_Object(); $id = $this->getRequest()->getParam('id'); - if (intval($id) > 0) { + if ((int) $id > 0) { $product = Mage::getModel('catalog/product') ->load($id); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index cb5a942042c..f40a75ee9f1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -111,7 +111,8 @@ protected function _initProduct() // Required attributes of simple product for configurable creation if ($this->getRequest()->getParam('popup') - && $requiredAttributes = $this->getRequest()->getParam('required')) { + && $requiredAttributes = $this->getRequest()->getParam('required') + ) { $requiredAttributes = explode(",", $requiredAttributes); foreach ($product->getAttributes() as $attribute) { if (in_array($attribute->getId(), $requiredAttributes)) { @@ -123,7 +124,8 @@ protected function _initProduct() if ($this->getRequest()->getParam('popup') && $this->getRequest()->getParam('product') && !is_array($this->getRequest()->getParam('product')) - && $this->getRequest()->getParam('id', false) === false) { + && $this->getRequest()->getParam('id', false) === false + ) { $configProduct = Mage::getModel('catalog/product') ->setStoreId(0) ->load($this->getRequest()->getParam('product')) @@ -138,7 +140,8 @@ protected function _initProduct() && $attribute->getFrontend()->getInputType() != 'gallery' && $attribute->getAttributeCode() != 'required_options' && $attribute->getAttributeCode() != 'has_options' - && $attribute->getAttributeCode() != $configProduct->getIdFieldName()) { + && $attribute->getAttributeCode() != $configProduct->getIdFieldName() + ) { $data[$attribute->getAttributeCode()] = $configProduct->getData($attribute->getAttributeCode()); } } @@ -1032,7 +1035,8 @@ public function quickCreateAction() || $attribute->getAttributeCode() == 'url_key' || $attribute->getFrontend()->getInputType() == 'gallery' || $attribute->getFrontend()->getInputType() == 'media_image' - || !$attribute->getIsVisible()) { + || !$attribute->getIsVisible() + ) { continue; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php index dc28a8bf48a..902194e815f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php @@ -65,7 +65,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('This search no longer exists.')); $this->_redirect('*/*'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php b/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php index e102015e66e..cdafdb4e31c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php @@ -88,7 +88,7 @@ public function editAction() Mage::register('checkout_agreement', $agreementModel); $this->_initAction() - ->_addBreadcrumb($id ? Mage::helper('checkout')->__('Edit Condition') : Mage::helper('checkout')->__('New Condition'), $id ? Mage::helper('checkout')->__('Edit Condition') : Mage::helper('checkout')->__('New Condition')) + ->_addBreadcrumb($id ? Mage::helper('checkout')->__('Edit Condition') : Mage::helper('checkout')->__('New Condition'), $id ? Mage::helper('checkout')->__('Edit Condition') : Mage::helper('checkout')->__('New Condition')) ->_addContent($this->getLayout()->createBlock('adminhtml/checkout_agreement_edit')->setData('action', $this->getUrl('*/*/save'))) ->renderLayout(); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php index 734fb2dba9f..81d6ed06977 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php @@ -95,7 +95,7 @@ public function editAction() // 2. Initial checking if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('cms')->__('This block no longer exists.')); $this->_redirect('*/*/'); return; @@ -106,7 +106,7 @@ public function editAction() // 3. Set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getFormData(true); - if (! empty($data)) { + if (!empty($data)) { $model->setData($data); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php index a6ed376f339..122de047bb1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php @@ -82,7 +82,7 @@ public function editAction() // 2. Initial checking if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError( Mage::helper('cms')->__('This page no longer exists.') ); @@ -95,7 +95,7 @@ public function editAction() // 3. Set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getFormData(true); - if (! empty($data)) { + if (!empty($data)) { $data['store_id'] = $data['stores']; $model->setData($data); } @@ -268,7 +268,8 @@ protected function _validatePostData($data) $errorNo = false; } if (!empty($data['custom_layout_update_xml']) - && !$validatorCustomLayout->isValid($data['custom_layout_update_xml'])) { + && !$validatorCustomLayout->isValid($data['custom_layout_update_xml']) + ) { $errorNo = false; } foreach ($validatorCustomLayout->getMessages() as $message) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php index 16cc507b947..57654f05446 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php @@ -19,6 +19,8 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Newsletter_Model_Queue as Queue; + /** * Adminhtml newsletter queue controller * @@ -104,17 +106,13 @@ public function startAction() $queue = Mage::getModel('newsletter/queue') ->load($this->getRequest()->getParam('id')); if ($queue->getId()) { - if (!in_array( - $queue->getQueueStatus(), - [Mage_Newsletter_Model_Queue::STATUS_NEVER, - Mage_Newsletter_Model_Queue::STATUS_PAUSE] - )) { + if (!in_array($queue->getQueueStatus(), [Queue::STATUS_NEVER, Queue::STATUS_PAUSE])) { $this->_redirect('*/*'); return; } $queue->setQueueStartAt(Mage::getSingleton('core/date')->gmtDate()) - ->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_SENDING) + ->setQueueStatus(Queue::STATUS_SENDING) ->save(); } @@ -126,12 +124,12 @@ public function pauseAction() $queue = Mage::getSingleton('newsletter/queue') ->load($this->getRequest()->getParam('id')); - if ($queue->getQueueStatus() != Mage_Newsletter_Model_Queue::STATUS_SENDING) { + if ($queue->getQueueStatus() != Queue::STATUS_SENDING) { $this->_redirect('*/*'); return; } - $queue->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_PAUSE); + $queue->setQueueStatus(Queue::STATUS_PAUSE); $queue->save(); $this->_redirect('*/*'); @@ -142,12 +140,12 @@ public function resumeAction() $queue = Mage::getSingleton('newsletter/queue') ->load($this->getRequest()->getParam('id')); - if ($queue->getQueueStatus() != Mage_Newsletter_Model_Queue::STATUS_PAUSE) { + if ($queue->getQueueStatus() != Queue::STATUS_PAUSE) { $this->_redirect('*/*'); return; } - $queue->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_SENDING); + $queue->setQueueStatus(Queue::STATUS_SENDING); $queue->save(); $this->_redirect('*/*'); @@ -158,12 +156,12 @@ public function cancelAction() $queue = Mage::getSingleton('newsletter/queue') ->load($this->getRequest()->getParam('id')); - if ($queue->getQueueStatus() != Mage_Newsletter_Model_Queue::STATUS_SENDING) { + if ($queue->getQueueStatus() != Queue::STATUS_SENDING) { $this->_redirect('*/*'); return; } - $queue->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_CANCEL); + $queue->setQueueStatus(Queue::STATUS_CANCEL); $queue->save(); $this->_redirect('*/*'); @@ -219,7 +217,7 @@ public function editAction() public function saveAction() { try { - /** @var Mage_Newsletter_Model_Queue $queue */ + /** @var Queue $queue */ $queue = Mage::getModel('newsletter/queue'); $templateId = $this->getRequest()->getParam('template_id'); @@ -232,22 +230,17 @@ public function saveAction() } $queue->setTemplateId($template->getId()) - ->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_NEVER); + ->setQueueStatus(Queue::STATUS_NEVER); } else { $queue->load($this->getRequest()->getParam('id')); } - if (!in_array( - $queue->getQueueStatus(), - [Mage_Newsletter_Model_Queue::STATUS_NEVER, - Mage_Newsletter_Model_Queue::STATUS_PAUSE] - ) - ) { + if (!in_array($queue->getQueueStatus(), [Queue::STATUS_NEVER, Queue::STATUS_PAUSE])) { $this->_redirect('*/*'); return; } - if ($queue->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_NEVER) { + if ($queue->getQueueStatus() == Queue::STATUS_NEVER) { $queue->setQueueStartAtByString($this->getRequest()->getParam('start_at')); } @@ -258,9 +251,10 @@ public function saveAction() ->setNewsletterText($this->getRequest()->getParam('text')) ->setNewsletterStyles($this->getRequest()->getParam('styles')); - if ($queue->getQueueStatus() == Mage_Newsletter_Model_Queue::STATUS_PAUSE - && $this->getRequest()->getParam('_resume', false)) { - $queue->setQueueStatus(Mage_Newsletter_Model_Queue::STATUS_SENDING); + if ($queue->getQueueStatus() == Queue::STATUS_PAUSE + && $this->getRequest()->getParam('_resume', false) + ) { + $queue->setQueueStatus(Queue::STATUS_SENDING); } $queue->save(); diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php index 19e859f89e0..0445e2364f3 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php @@ -85,7 +85,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError($this->__('This block no longer exists.')); $this->_redirect('*/*/'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php index 533fcb972bb..b108b958d87 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php @@ -272,7 +272,7 @@ public function editrolegridAction() * * @param int $userId * @param int $roleId - * @return bool + * @return true */ protected function _deleteUserFromRole($userId, $roleId) { @@ -283,7 +283,6 @@ protected function _deleteUserFromRole($userId, $roleId) ->deleteFromRole(); } catch (Exception $e) { throw $e; - return false; } return true; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php index b386938f9d7..9e32be34ef2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php @@ -81,7 +81,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError($this->__('This user no longer exists.')); $this->_redirect('*/*/'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/PollController.php b/app/code/core/Mage/Adminhtml/controllers/PollController.php index 6a76241169d..7a785dc2603 100644 --- a/app/code/core/Mage/Adminhtml/controllers/PollController.php +++ b/app/code/core/Mage/Adminhtml/controllers/PollController.php @@ -175,7 +175,7 @@ public function validateAction() $_titles[] = $answer['title']; $answerModel = Mage::getModel('poll/poll_answer'); - if (intval($key) > 0) { + if ((int) $key > 0) { $answerModel->setId($key); } $answerModel->setAnswerTitle($answer['title']) diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php index 8d1a57eb37e..fdcfc8fd043 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php @@ -94,7 +94,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getRuleId()) { + if (!$model->getRuleId()) { Mage::getSingleton('adminhtml/session')->addError( Mage::helper('catalogrule')->__('This rule no longer exists.') ); diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php index f2cbe3ab269..ba0dc6071d6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php @@ -89,7 +89,7 @@ public function editAction() if ($id) { $model->load($id); - if (! $model->getRuleId()) { + if (!$model->getRuleId()) { Mage::getSingleton('adminhtml/session')->addError( Mage::helper('salesrule')->__('This rule no longer exists.') ); @@ -164,7 +164,8 @@ public function saveAction() } if (isset($data['simple_action']) && $data['simple_action'] == 'by_percent' - && isset($data['discount_amount'])) { + && isset($data['discount_amount']) + ) { $data['discount_amount'] = min(100, $data['discount_amount']); } if (isset($data['rule']['conditions'])) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php index 868b2e3c297..4b81a630227 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php index 61349362e09..e19f58f4e19 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php @@ -427,7 +427,8 @@ protected function _needToAddDummy($item, $qtys) foreach ($item->getChildrenItems() as $child) { if (isset($qtys[$child->getId()]) && isset($qtys[$child->getId()]['qty']) - && $qtys[$child->getId()]['qty'] > 0) { + && $qtys[$child->getId()]['qty'] > 0 + ) { return true; } } @@ -437,7 +438,8 @@ protected function _needToAddDummy($item, $qtys) if ($item->getParentItem()) { if (isset($qtys[$item->getParentItem()->getId()]) && isset($qtys[$item->getParentItem()->getId()]['qty']) - && $qtys[$item->getParentItem()->getId()]['qty'] > 0) { + && $qtys[$item->getParentItem()->getId()]['qty'] > 0 + ) { return true; } return false; diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php index f163fb035e5..85d3c87f923 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php @@ -473,7 +473,8 @@ protected function _needToAddDummy($item, $qtys) continue; } if ((isset($qtys[$child->getId()]) && $qtys[$child->getId()] > 0) - || (!isset($qtys[$child->getId()]) && $child->getQtyToShip())) { + || (!isset($qtys[$child->getId()]) && $child->getQtyToShip()) + ) { return true; } } @@ -485,7 +486,8 @@ protected function _needToAddDummy($item, $qtys) return false; } if ((isset($qtys[$item->getParentItem()->getId()]) && $qtys[$item->getParentItem()->getId()] > 0) - || (!isset($qtys[$item->getParentItem()->getId()]) && $item->getParentItem()->getQtyToShip())) { + || (!isset($qtys[$item->getParentItem()->getId()]) && $item->getParentItem()->getQtyToShip()) + ) { return true; } return false; diff --git a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php index 590f113107c..5ffd27ed2e8 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php +++ b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php @@ -107,7 +107,7 @@ public function editAction() // 2. Initial checking if ($id) { $model->load($id); - if (! $model->getId()) { + if (!$model->getId()) { Mage::getSingleton('adminhtml/session')->addError( Mage::helper('sitemap')->__('This sitemap no longer exists.') ); @@ -120,7 +120,7 @@ public function editAction() // 3. Set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getFormData(true); - if (! empty($data)) { + if (!empty($data)) { $model->setData($data); } diff --git a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php index b2b7c9e6f56..f3554922703 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php @@ -237,7 +237,8 @@ public function stateAction() { if ($this->getRequest()->getParam('isAjax') == 1 && $this->getRequest()->getParam('container') != '' - && $this->getRequest()->getParam('value') != '') { + && $this->getRequest()->getParam('value') != '' + ) { $configState = [ $this->getRequest()->getParam('container') => $this->getRequest()->getParam('value') ]; diff --git a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php index 5f79a38bfa1..7fde1c22ac1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php @@ -453,7 +453,7 @@ public function deleteStorePostAction() */ protected function _backupDatabase($failPath, $arguments = []) { - if (! $this->getRequest()->getParam('create_backup')) { + if (!$this->getRequest()->getParam('create_backup')) { return $this; } try { diff --git a/app/code/core/Mage/Adminhtml/controllers/TagController.php b/app/code/core/Mage/Adminhtml/controllers/TagController.php index c2a21ddfd81..44a0901b7e9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/TagController.php @@ -117,18 +117,18 @@ public function editAction() $this->_title($this->__('Catalog')) ->_title($this->__('Tags')); - if (! (int) $this->getRequest()->getParam('store')) { + if (!(int) $this->getRequest()->getParam('store')) { return $this->_redirect('*/*/*/', ['store' => Mage::app()->getAnyStoreView()->getId(), '_current' => true]); } - if (! ($model = $this->_initTag())) { + if (!($model = $this->_initTag())) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Wrong tag was specified.')); return $this->_redirect('*/*/index', ['store' => $this->getRequest()->getParam('store')]); } // set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getTagData(true); - if (! empty($data)) { + if (!empty($data)) { $model->addData($data); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php index 9e12f1f6a9b..dc615139a0b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php @@ -91,8 +91,8 @@ public function editAction() $this->_initAction() ->_addBreadcrumb( - $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class'), - $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class') + $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class'), + $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class') ) ->_addContent( $this->getLayout() diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php index eadc7cc18c1..9ec812b18cf 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php @@ -92,8 +92,8 @@ public function editAction() $this->_initAction() ->_addBreadcrumb( - $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class'), - $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class') + $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class'), + $classId ? Mage::helper('tax')->__('Edit Class') : Mage::helper('tax')->__('New Class') ) ->_addContent( $this->getLayout()->createBlock('adminhtml/tax_class_edit') diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index 1f1d7029cb0..0922b154ea6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -426,7 +426,7 @@ public function exportPostAction() foreach (Mage::getModel('tax/calculation_rate_title')->getCollection() as $title) { $rateId = $title->getTaxCalculationRateId(); - if (! array_key_exists($rateId, $taxCalculationRateTitleDict)) { + if (!array_key_exists($rateId, $taxCalculationRateTitleDict)) { $taxCalculationRateTitleDict[$rateId] = $storeTaxTitleTemplate; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php index 647f6c7ce55..70724f6fd41 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php @@ -92,8 +92,8 @@ public function editAction() $this->_initAction() ->_addBreadcrumb( - $taxRuleId ? Mage::helper('tax')->__('Edit Rule') : Mage::helper('tax')->__('New Rule'), - $taxRuleId ? Mage::helper('tax')->__('Edit Rule') : Mage::helper('tax')->__('New Rule') + $taxRuleId ? Mage::helper('tax')->__('Edit Rule') : Mage::helper('tax')->__('New Rule'), + $taxRuleId ? Mage::helper('tax')->__('Edit Rule') : Mage::helper('tax')->__('New Rule') ) ->_addContent($this->getLayout()->createBlock('adminhtml/tax_rule_edit') ->setData('action', $this->getUrl('*/tax_rule/save'))) @@ -102,8 +102,6 @@ public function editAction() /** * Save action - * - * @return Mage_Core_Controller_Response_Http|Mage_Core_Controller_Varien_Action */ public function saveAction() { diff --git a/app/code/core/Mage/Adminhtml/etc/jstranslator.xml b/app/code/core/Mage/Adminhtml/etc/jstranslator.xml index 0aa523a0397..36d04040d02 100644 --- a/app/code/core/Mage/Adminhtml/etc/jstranslator.xml +++ b/app/code/core/Mage/Adminhtml/etc/jstranslator.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Adminhtml * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api/Model/Config.php b/app/code/core/Mage/Api/Model/Config.php index 5f33336e75e..408175a83c4 100644 --- a/app/code/core/Mage/Api/Model/Config.php +++ b/app/code/core/Mage/Api/Model/Config.php @@ -230,7 +230,8 @@ public function getFaults($resourceName = null) { if (is_null($resourceName) || !isset($this->getResources()->$resourceName) - || !isset($this->getResources()->$resourceName->faults)) { + || !isset($this->getResources()->$resourceName->faults) + ) { $faultsNode = $this->getNode('faults'); } else { $faultsNode = $this->getResources()->$resourceName->faults; diff --git a/app/code/core/Mage/Api/Model/Resource/Role.php b/app/code/core/Mage/Api/Model/Resource/Role.php index 203c3220944..f26909de3d5 100644 --- a/app/code/core/Mage/Api/Model/Resource/Role.php +++ b/app/code/core/Mage/Api/Model/Resource/Role.php @@ -54,7 +54,7 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) */ public function load(Mage_Core_Model_Abstract $object, $value, $field = null) { - if (!intval($value) && is_string($value)) { + if (!(int) $value && is_string($value)) { $field = 'role_id'; } return parent::load($object, $value, $field); diff --git a/app/code/core/Mage/Api/Model/Resource/User.php b/app/code/core/Mage/Api/Model/Resource/User.php index 0c0abff63e2..b23582c7f33 100644 --- a/app/code/core/Mage/Api/Model/Resource/User.php +++ b/app/code/core/Mage/Api/Model/Resource/User.php @@ -268,7 +268,7 @@ public function _saveRelations(Mage_Core_Model_Abstract $user) ['user_id = ?' => (int) $user->getId()] ); foreach ($rolesIds as $rid) { - $rid = intval($rid); + $rid = (int) $rid; if ($rid > 0) { //$row = $this->load($user, $rid); $row = ['tree_level' => 0]; diff --git a/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php index db0999acd87..600e19e393f 100644 --- a/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php @@ -271,11 +271,7 @@ protected function _instantiateServer() ['encoding' => $apiConfigCharset] ); } catch (SoapFault $e) { - if (strpos( - $e->getMessage(), - "can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'" - ) !== false - ) { + if (strpos($e->getMessage(), "can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'") !== false) { $retry = true; sleep(1); } else { diff --git a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php index d25559ad7ca..7d05b35b8f8 100644 --- a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php +++ b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php @@ -251,19 +251,22 @@ public function call($sessionId, $apiPath, $args = []) } if (!isset($resources->$resourceName) - || !isset($resources->$resourceName->methods->$methodName)) { + || !isset($resources->$resourceName->methods->$methodName) + ) { return $this->_fault('resource_path_invalid'); } if (!isset($resources->$resourceName->public) && isset($resources->$resourceName->acl) - && !$this->_isAllowed((string)$resources->$resourceName->acl)) { + && !$this->_isAllowed((string)$resources->$resourceName->acl) + ) { return $this->_fault('access_denied'); } if (!isset($resources->$resourceName->methods->$methodName->public) && isset($resources->$resourceName->methods->$methodName->acl) - && !$this->_isAllowed((string)$resources->$resourceName->methods->$methodName->acl)) { + && !$this->_isAllowed((string)$resources->$resourceName->methods->$methodName->acl) + ) { return $this->_fault('access_denied'); } @@ -353,7 +356,8 @@ public function multiCall($sessionId, array $calls = [], $options = []) } if (!isset($resources->$resourceName) - || !isset($resources->$resourceName->methods->$methodName)) { + || !isset($resources->$resourceName->methods->$methodName) + ) { $result[] = $this->_faultAsArray('resource_path_invalid'); if (isset($options['break']) && $options['break'] == 1) { break; @@ -364,7 +368,8 @@ public function multiCall($sessionId, array $calls = [], $options = []) if (!isset($resources->$resourceName->public) && isset($resources->$resourceName->acl) - && !$this->_isAllowed((string)$resources->$resourceName->acl)) { + && !$this->_isAllowed((string)$resources->$resourceName->acl) + ) { $result[] = $this->_faultAsArray('access_denied'); if (isset($options['break']) && $options['break'] == 1) { break; @@ -375,7 +380,8 @@ public function multiCall($sessionId, array $calls = [], $options = []) if (!isset($resources->$resourceName->methods->$methodName->public) && isset($resources->$resourceName->methods->$methodName->acl) - && !$this->_isAllowed((string)$resources->$resourceName->methods->$methodName->acl)) { + && !$this->_isAllowed((string)$resources->$resourceName->methods->$methodName->acl) + ) { $result[] = $this->_faultAsArray('access_denied'); if (isset($options['break']) && $options['break'] == 1) { break; @@ -516,12 +522,14 @@ public function resourceFaults($sessionId, $resourceName) } if (empty($resourceName) - || !isset($resources->$resourceName)) { + || !isset($resources->$resourceName) + ) { return $this->_fault('resource_path_invalid'); } if (isset($resources->$resourceName->acl) - && !$this->_isAllowed((string)$resources->$resourceName->acl)) { + && !$this->_isAllowed((string)$resources->$resourceName->acl) + ) { return $this->_fault('access_denied'); } diff --git a/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php index 0eb57e5b4d0..6675fbb3e69 100644 --- a/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Api * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/User.php b/app/code/core/Mage/Api/Model/User.php index a42dbc10a9f..6dc78a152d1 100644 --- a/app/code/core/Mage/Api/Model/User.php +++ b/app/code/core/Mage/Api/Model/User.php @@ -106,7 +106,7 @@ public function save() } if (!is_null($this->getIsActive())) { - $data['is_active'] = intval($this->getIsActive()); + $data['is_active'] = (int) $this->getIsActive(); } $this->setData($data); diff --git a/app/code/core/Mage/Api/etc/api.xml b/app/code/core/Mage/Api/etc/api.xml index a545837df52..fcc10872fd4 100644 --- a/app/code/core/Mage/Api/etc/api.xml +++ b/app/code/core/Mage/Api/etc/api.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Api * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api/etc/config.xml b/app/code/core/Mage/Api/etc/config.xml index 204b363d48d..80d9071b82e 100644 --- a/app/code/core/Mage/Api/etc/config.xml +++ b/app/code/core/Mage/Api/etc/config.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_Api * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php b/app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php index f32df29e915..912cb7bc880 100644 --- a/app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php +++ b/app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php @@ -41,7 +41,7 @@ public function __construct($attributes = []) /** * Collection object set up - * @return void + * @return $this */ protected function _prepareCollection() { @@ -54,6 +54,8 @@ protected function _prepareCollection() } $this->setCollection($collection); + + return $this; } /** diff --git a/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php b/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php index 4f5479cd2f3..c966bc2d2a5 100644 --- a/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php +++ b/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Buttons.php @@ -112,7 +112,8 @@ public function getSaveButtonHtml() public function getDeleteButtonHtml() { if (!$this->getRole() || !$this->getRole()->getId() - || Mage_Api2_Model_Acl_Global_Role::isSystemRole($this->getRole())) { + || Mage_Api2_Model_Acl_Global_Role::isSystemRole($this->getRole()) + ) { return ''; } diff --git a/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tabs.php b/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tabs.php index cfd0d7a3163..3f1a577a614 100644 --- a/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tabs.php +++ b/app/code/core/Mage/Api2/Block/Adminhtml/Roles/Tabs.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019-2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api2/Model/Acl/Global/Role.php b/app/code/core/Mage/Api2/Model/Acl/Global/Role.php index a10a62514ce..3a14c30a250 100644 --- a/app/code/core/Mage/Api2/Model/Acl/Global/Role.php +++ b/app/code/core/Mage/Api2/Model/Acl/Global/Role.php @@ -80,9 +80,8 @@ protected function _beforeSave() } //check and protect guest role - if (self::isSystemRole($this) - && $this->getRoleName() != $this->getOrigData('role_name')) { + if (self::isSystemRole($this) && $this->getRoleName() != $this->getOrigData('role_name')) { /** @var Mage_Core_Helper_Data $helper */ $helper = Mage::helper('core'); diff --git a/app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php b/app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php index a48f3535ef9..e13055b4e1e 100644 --- a/app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php +++ b/app/code/core/Mage/Api2/Model/Acl/Global/Rule/ResourcePermission.php @@ -101,11 +101,14 @@ public function getResourcesPermissions() * Set filter value * * @param Mage_Api2_Model_Acl_Global_Role $role + * @return $this */ public function setFilterValue($role) { if ($role && $role->getId()) { $this->_role = $role; } + + return $this; } } diff --git a/app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php b/app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php index 1e76852a1e4..705fbe17afd 100644 --- a/app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php +++ b/app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php @@ -136,7 +136,6 @@ public function __construct($options) default: throw new Exception(sprintf('Unknown tree type "%s".', $this->_type)); - break; } } diff --git a/app/code/core/Mage/Api2/Model/Auth.php b/app/code/core/Mage/Api2/Model/Auth.php index 3f320db6bd1..dcaa3f754a9 100644 --- a/app/code/core/Mage/Api2/Model/Auth.php +++ b/app/code/core/Mage/Api2/Model/Auth.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api2/Model/Auth/User/Admin.php b/app/code/core/Mage/Api2/Model/Auth/User/Admin.php index ba146656b5e..25971e03eb7 100644 --- a/app/code/core/Mage/Api2/Model/Auth/User/Admin.php +++ b/app/code/core/Mage/Api2/Model/Auth/User/Admin.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019-2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api2/Model/Auth/User/Customer.php b/app/code/core/Mage/Api2/Model/Auth/User/Customer.php index 4c0ad3bcd75..6f059e5b7d3 100644 --- a/app/code/core/Mage/Api2/Model/Auth/User/Customer.php +++ b/app/code/core/Mage/Api2/Model/Auth/User/Customer.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api2/Model/Auth/User/Guest.php b/app/code/core/Mage/Api2/Model/Auth/User/Guest.php index 1c03091225b..0e56de43fb5 100644 --- a/app/code/core/Mage/Api2/Model/Auth/User/Guest.php +++ b/app/code/core/Mage/Api2/Model/Auth/User/Guest.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api2/Model/Observer.php b/app/code/core/Mage/Api2/Model/Observer.php index 4e36760ede7..5e2df5bddef 100644 --- a/app/code/core/Mage/Api2/Model/Observer.php +++ b/app/code/core/Mage/Api2/Model/Observer.php @@ -62,7 +62,8 @@ public function catalogAttributeSaveAfter(Varien_Event_Observer $observer) /** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */ $attribute = $observer->getEvent()->getAttribute(); if ($attribute->getIsUserDefined() && $attribute->dataHasChangedFor('is_visible_on_front') - && !$attribute->getIsVisibleOnFront()) { + && !$attribute->getIsVisibleOnFront() + ) { /** @var Mage_Api2_Model_Resource_Acl_Filter_Attribute_Collection $collection */ $collection = Mage::getResourceModel('api2/acl_filter_attribute_collection'); /** @var Mage_Api2_Model_Acl_Filter_Attribute $aclFilter */ diff --git a/app/code/core/Mage/Api2/Model/Renderer/Json.php b/app/code/core/Mage/Api2/Model/Renderer/Json.php index e152e03afc3..df2ef4305a1 100644 --- a/app/code/core/Mage/Api2/Model/Renderer/Json.php +++ b/app/code/core/Mage/Api2/Model/Renderer/Json.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api2/Model/Resource.php b/app/code/core/Mage/Api2/Model/Resource.php index b885c8e990d..200dbbf1a22 100644 --- a/app/code/core/Mage/Api2/Model/Resource.php +++ b/app/code/core/Mage/Api2/Model/Resource.php @@ -201,7 +201,8 @@ public function dispatch() case self::ACTION_TYPE_ENTITY . self::OPERATION_CREATE: // Creation of objects is possible only when working with collection $this->_critical(self::RESOURCE_METHOD_NOT_IMPLEMENTED); - break; + // exception thrown + // no break case self::ACTION_TYPE_COLLECTION . self::OPERATION_CREATE: // If no of the methods(multi or single) is implemented, request body is not checked if (!$this->_checkMethodExist('_create') && !$this->_checkMethodExist('_multiCreate')) { @@ -282,7 +283,6 @@ public function dispatch() break; default: $this->_critical(self::RESOURCE_METHOD_NOT_IMPLEMENTED); - break; } } diff --git a/app/code/core/Mage/Api2/etc/adminhtml.xml b/app/code/core/Mage/Api2/etc/adminhtml.xml index 8b238de165c..fb071b237c8 100644 --- a/app/code/core/Mage/Api2/etc/adminhtml.xml +++ b/app/code/core/Mage/Api2/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api2/etc/config.xml b/app/code/core/Mage/Api2/etc/config.xml index d5a45ffb3fd..82560d02e42 100644 --- a/app/code/core/Mage/Api2/etc/config.xml +++ b/app/code/core/Mage/Api2/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Api2 * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php b/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php index 47d00c04b50..acaca08142f 100644 --- a/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php +++ b/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Authorizenet * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost.php b/app/code/core/Mage/Authorizenet/Model/Directpost.php index 70090387b01..0476c5298e7 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost.php @@ -101,7 +101,8 @@ public function capture(Varien_Object $payment, $amount) case self::RESPONSE_CODE_APPROVED: if ($result->getResponseReasonCode() == self::RESPONSE_REASON_CODE_APPROVED) { if (!$payment->getParentTransactionId() || - $result->getTransactionId() != $payment->getParentTransactionId()) { + $result->getTransactionId() != $payment->getParentTransactionId() + ) { $payment->setTransactionId($result->getTransactionId()); } $payment @@ -351,6 +352,8 @@ public function initialize($paymentAction, $stateObject) default: break; } + + return $this; } /** diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php b/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php index 7a02c47f86e..97786c6278d 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php @@ -129,37 +129,37 @@ public function setDataFromOrder(Mage_Sales_Model_Order $order, Mage_Authorizene //need to use strval() because NULL values IE6-8 decodes as "null" in JSON in JavaScript, but we need "" for null values. $billing = $order->getBillingAddress(); if (!empty($billing)) { - $this->setXFirstName(strval($billing->getFirstname())) - ->setXLastName(strval($billing->getLastname())) - ->setXCompany(strval($billing->getCompany())) - ->setXAddress(strval($billing->getStreet(1))) - ->setXCity(strval($billing->getCity())) - ->setXState(strval($billing->getRegion())) - ->setXZip(strval($billing->getPostcode())) - ->setXCountry(strval($billing->getCountry())) - ->setXPhone(strval($billing->getTelephone())) - ->setXFax(strval($billing->getFax())) - ->setXCustId(strval($billing->getCustomerId())) - ->setXCustomerIp(strval($order->getRemoteIp())) - ->setXCustomerTaxId(strval($billing->getTaxId())) - ->setXEmail(strval($order->getCustomerEmail())) - ->setXEmailCustomer(strval($paymentMethod->getConfigData('email_customer'))) - ->setXMerchantEmail(strval($paymentMethod->getConfigData('merchant_email'))); + $this->setXFirstName((string) $billing->getFirstname()) + ->setXLastName((string) $billing->getLastname()) + ->setXCompany((string) $billing->getCompany()) + ->setXAddress((string) $billing->getStreet(1)) + ->setXCity((string) $billing->getCity()) + ->setXState((string) $billing->getRegion()) + ->setXZip((string) $billing->getPostcode()) + ->setXCountry((string) $billing->getCountry()) + ->setXPhone((string) $billing->getTelephone()) + ->setXFax((string) $billing->getFax()) + ->setXCustId((string) $billing->getCustomerId()) + ->setXCustomerIp((string) $order->getRemoteIp()) + ->setXCustomerTaxId((string) $billing->getTaxId()) + ->setXEmail((string) $order->getCustomerEmail()) + ->setXEmailCustomer((string) $paymentMethod->getConfigData('email_customer')) + ->setXMerchantEmail((string) $paymentMethod->getConfigData('merchant_email')); } $shipping = $order->getShippingAddress(); if (!empty($shipping)) { - $this->setXShipToFirstName(strval($shipping->getFirstname())) - ->setXShipToLastName(strval($shipping->getLastname())) - ->setXShipToCompany(strval($shipping->getCompany())) - ->setXShipToAddress(strval($shipping->getStreet(1))) - ->setXShipToCity(strval($shipping->getCity())) - ->setXShipToState(strval($shipping->getRegion())) - ->setXShipToZip(strval($shipping->getPostcode())) - ->setXShipToCountry(strval($shipping->getCountry())); + $this->setXShipToFirstName((string) $shipping->getFirstname()) + ->setXShipToLastName((string) $shipping->getLastname()) + ->setXShipToCompany((string) $shipping->getCompany()) + ->setXShipToAddress((string) $shipping->getStreet(1)) + ->setXShipToCity((string) $shipping->getCity()) + ->setXShipToState((string) $shipping->getRegion()) + ->setXShipToZip((string) $shipping->getPostcode()) + ->setXShipToCountry((string) $shipping->getCountry()); } - $this->setXPoNum(strval($payment->getPoNumber())); + $this->setXPoNum((string) $payment->getPoNumber()); return $this; } diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php b/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php index c4c6fe64631..00d9af65394 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php @@ -124,28 +124,28 @@ public function generateSha2Hash($signatureKey) $order = Mage::getModel('sales/order')->loadByIncrementId($this->getData('x_invoice_num')); $billing = $order->getBillingAddress(); if (!empty($billing)) { - $this->setXFirstName(strval($billing->getFirstname())) - ->setXLastName(strval($billing->getLastname())) - ->setXCompany(strval($billing->getCompany())) - ->setXAddress(strval($billing->getStreet(1))) - ->setXCity(strval($billing->getCity())) - ->setXState(strval($billing->getRegion())) - ->setXZip(strval($billing->getPostcode())) - ->setXCountry(strval($billing->getCountry())) - ->setXPhone(strval($billing->getTelephone())) - ->setXFax(strval($billing->getFax())) - ->setXEmail(strval($order->getCustomerEmail())); + $this->setXFirstName((string) $billing->getFirstname()) + ->setXLastName((string) $billing->getLastname()) + ->setXCompany((string) $billing->getCompany()) + ->setXAddress((string) $billing->getStreet(1)) + ->setXCity((string) $billing->getCity()) + ->setXState((string) $billing->getRegion()) + ->setXZip((string) $billing->getPostcode()) + ->setXCountry((string) $billing->getCountry()) + ->setXPhone((string) $billing->getTelephone()) + ->setXFax((string) $billing->getFax()) + ->setXEmail((string) $order->getCustomerEmail()); } $shipping = $order->getShippingAddress(); if (!empty($shipping)) { - $this->setXShipToFirstName(strval($shipping->getFirstname())) - ->setXShipToLastName(strval($shipping->getLastname())) - ->setXShipToCompany(strval($shipping->getCompany())) - ->setXShipToAddress(strval($shipping->getStreet(1))) - ->setXShipToCity(strval($shipping->getCity())) - ->setXShipToState(strval($shipping->getRegion())) - ->setXShipToZip(strval($shipping->getPostcode())) - ->setXShipToCountry(strval($shipping->getCountry())); + $this->setXShipToFirstName((string) $shipping->getFirstname()) + ->setXShipToLastName((string) $shipping->getLastname()) + ->setXShipToCompany((string) $shipping->getCompany()) + ->setXShipToAddress((string) $shipping->getStreet(1)) + ->setXShipToCity((string) $shipping->getCity()) + ->setXShipToState((string) $shipping->getRegion()) + ->setXShipToZip((string) $shipping->getPostcode()) + ->setXShipToCountry((string) $shipping->getCountry()); } $message = '^'; diff --git a/app/code/core/Mage/Authorizenet/etc/config.xml b/app/code/core/Mage/Authorizenet/etc/config.xml index 17640b39e66..a6010235b56 100644 --- a/app/code/core/Mage/Authorizenet/etc/config.xml +++ b/app/code/core/Mage/Authorizenet/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Authorizenet * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Backup/Helper/Data.php b/app/code/core/Mage/Backup/Helper/Data.php index 40dc1cdff69..efb2d23a301 100644 --- a/app/code/core/Mage/Backup/Helper/Data.php +++ b/app/code/core/Mage/Backup/Helper/Data.php @@ -207,6 +207,8 @@ public function turnOnMaintenanceMode() /** * Turn off store maintenance mode + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function turnOffMaintenanceMode() { diff --git a/app/code/core/Mage/Backup/Model/Backup.php b/app/code/core/Mage/Backup/Model/Backup.php index e169ed8cf72..31f67d6a9b5 100644 --- a/app/code/core/Mage/Backup/Model/Backup.php +++ b/app/code/core/Mage/Backup/Model/Backup.php @@ -168,6 +168,8 @@ public function setFile(&$content) * @todo rewrite to Varien_IO, but there no possibility read part of files. * @return string * @throws Mage_Backup_Exception + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function &getFile() { @@ -227,6 +229,8 @@ public function deleteFile() * * @param bool $write * @return $this + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function open($write = false) { @@ -312,6 +316,8 @@ public function write($string) * Close open backup file * * @return $this + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function close() { diff --git a/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php b/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php index cd689925679..e80a8bb9b24 100644 --- a/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php +++ b/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php @@ -51,8 +51,8 @@ protected function _afterSave() if ($enabled) { $cronExprArray = [ - intval($time[1]), # Minute - intval($time[0]), # Hour + (int) $time[1], # Minute + (int) $time[0], # Hour ($frequency == $frequencyMonthly) ? '1' : '*', # Day of the Month '*', # Month of the Year ($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week diff --git a/app/code/core/Mage/Backup/Model/Fs/Collection.php b/app/code/core/Mage/Backup/Model/Fs/Collection.php index 1dffd66a952..fa3818932fe 100644 --- a/app/code/core/Mage/Backup/Model/Fs/Collection.php +++ b/app/code/core/Mage/Backup/Model/Fs/Collection.php @@ -77,7 +77,8 @@ protected function _generateRow($filename) { $row = parent::_generateRow($filename); foreach (Mage::getSingleton('backup/backup')->load($row['basename'], $this->_baseDir) - ->getData() as $key => $value) { + ->getData() as $key => $value + ) { $row[$key] = $value; } $row['size'] = filesize($filename); diff --git a/app/code/core/Mage/Backup/etc/adminhtml.xml b/app/code/core/Mage/Backup/etc/adminhtml.xml index 13b4829ecdd..a4a09edfb29 100644 --- a/app/code/core/Mage/Backup/etc/adminhtml.xml +++ b/app/code/core/Mage/Backup/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Backup * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Backup/etc/config.xml b/app/code/core/Mage/Backup/etc/config.xml index 839b5335a38..43bac442572 100644 --- a/app/code/core/Mage/Backup/etc/config.xml +++ b/app/code/core/Mage/Backup/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Backup * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php index 1057855e458..e8d0a05b145 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Bundle * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,7 +33,7 @@ class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Attributes extends Ma /** * Prepare attributes form of bundle product * - * @return void + * @return $this */ protected function _prepareForm() { @@ -155,6 +155,8 @@ function changePriceTypeMap() { . '' ); } + + return $this; } /** diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php index df28449bb0d..39834694581 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Bundle * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php index 58e36597b49..0d144049999 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php @@ -48,7 +48,7 @@ public function getHeaderText() } /** - * @return Mage_Adminhtml_Block_Widget + * @inheritDoc */ protected function _prepareLayout() { @@ -63,7 +63,7 @@ protected function _prepareLayout() } /** - * @return Mage_Adminhtml_Block_Widget + * @inheritDoc */ protected function _beforeToHtml() { 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 5114cd72f5b..b6570d1aed2 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 @@ -31,7 +31,7 @@ class Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tabs extends Mage_Adminht protected $_attributeTabBlock = 'bundle/adminhtml_catalog_product_edit_tab_attributes'; /** - * @return void + * @return $this * @throws Exception */ protected function _prepareLayout() @@ -44,5 +44,7 @@ protected function _prepareLayout() 'class' => 'ajax', ]); $this->bindShadowTabs('bundle_items', 'customer_options'); + + return $this; } } diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php index 65a9d475fc7..c5b6ebd77f3 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php @@ -163,7 +163,7 @@ public function getSelectionAttributes($item) } /** - * @param null $item + * @param null $item deprecated * @return array */ public function getOrderOptions($item = null) @@ -221,7 +221,8 @@ public function getValueHtml($item) public function canShowPriceInfo($item) { if (($item->getOrderItem()->getParentItem() && $this->isChildCalculated()) - || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated())) { + || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated()) + ) { return true; } return false; diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php index 0237d6587ef..17e3ecbeaf1 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php @@ -172,7 +172,8 @@ public function getValueHtml($item) public function canShowPriceInfo($item) { if (($item->getParentItem() && $this->isChildCalculated()) - || (!$item->getParentItem() && !$this->isChildCalculated())) { + || (!$item->getParentItem() && !$this->isChildCalculated()) + ) { return true; } return false; diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/List/Partof.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/List/Partof.php index 7084dce8b9e..81f42cdb3fe 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/List/Partof.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/List/Partof.php @@ -106,8 +106,8 @@ public function getRowCount() */ public function setColumnCount($columns) { - if (intval($columns) > 0) { - $this->_columnCount = intval($columns); + if ((int) $columns > 0) { + $this->_columnCount = (int) $columns; } return $this; } diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php index dac4c190d17..60e53d5e084 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php @@ -45,7 +45,7 @@ public function isRatesGraterThenZero() $_request->setProductClassId($this->getProduct()->getTaxClassId()); $currentTax = Mage::getSingleton('tax/calculation')->getRate($_request); - return (floatval($defaultTax) > 0 || floatval($currentTax) > 0); + return ((float) $defaultTax > 0 || (float) $currentTax > 0); } /** @@ -59,7 +59,8 @@ public function displayBothPrices() { $product = $this->getProduct(); if ($product->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC && - $product->getPriceModel()->getIsPricesCalculatedByIndex() !== false) { + $product->getPriceModel()->getIsPricesCalculatedByIndex() !== false + ) { return false; } diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php index d6723ff6d5c..1be4542c360 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -35,14 +35,14 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option extends Mage_Bun /** * Store preconfigured options * - * @var int|array|string + * @var int|array|string|null */ protected $_selectedOptions = null; /** * Show if option has a single selection * - * @var bool + * @var bool|null */ protected $_showSingle = null; diff --git a/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php b/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php index 1dd42375a6f..a149ce5ae84 100644 --- a/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php @@ -29,7 +29,7 @@ class Mage_Bundle_Block_Sales_Order_Items_Renderer extends Mage_Sales_Block_Order_Item_Renderer_Default { /** - * @param null $item + * @param Varien_Object|null $item * @return bool */ public function isShipmentSeparately($item = null) @@ -72,7 +72,7 @@ public function isShipmentSeparately($item = null) } /** - * @param null $item + * @param Varien_Object|null $item * @return bool */ public function isChildCalculated($item = null) @@ -184,7 +184,8 @@ public function getChilds($item) public function canShowPriceInfo($item) { if (($item->getOrderItem()->getParentItem() && $this->isChildCalculated()) - || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated())) { + || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated()) + ) { return true; } return false; diff --git a/app/code/core/Mage/Bundle/Helper/Data.php b/app/code/core/Mage/Bundle/Helper/Data.php index a7a9a2ec751..b9e26fa643e 100644 --- a/app/code/core/Mage/Bundle/Helper/Data.php +++ b/app/code/core/Mage/Bundle/Helper/Data.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Bundle * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Product/Price.php b/app/code/core/Mage/Bundle/Model/Product/Price.php index 184ec405b85..ccc0ec5d520 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Price.php +++ b/app/code/core/Mage/Bundle/Model/Product/Price.php @@ -59,14 +59,13 @@ public function getIsPricesCalculatedByIndex() * Return product base price * * @param Mage_Catalog_Model_Product $product - * @return string + * @return string|float|int */ public function getPrice($product) { if ($product->getPriceType() == self::PRICE_TYPE_FIXED) { return $product->getData('price'); } - return 0; } @@ -117,7 +116,7 @@ public function getTotalBundleItemsPrice($product, $qty = null) * * @param float|null $qty * @param Mage_Catalog_Model_Product $product - * @return double + * @return float * @throws Mage_Core_Model_Store_Exception */ public function getFinalPrice($qty, $product) diff --git a/app/code/core/Mage/Bundle/Model/Product/Type.php b/app/code/core/Mage/Bundle/Model/Product/Type.php index 107c4052950..d9e24adc668 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Type.php +++ b/app/code/core/Mage/Bundle/Model/Product/Type.php @@ -445,7 +445,7 @@ public function updateQtyOption($options, Varien_Object $option, $value, $produc foreach ($options as &$option) { if ($option->getCode() == 'selection_qty_' . $selection->getSelectionId()) { if ($optionUpdateFlag) { - $option->setValue(intval($option->getValue())); + $option->setValue((int) $option->getValue()); } else { $option->setValue($value); } @@ -466,7 +466,7 @@ public function updateQtyOption($options, Varien_Object $option, $value, $produc */ public function prepareQuoteItemQty($qty, $product = null) { - return intval($qty); + return (int) $qty; } /** diff --git a/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php b/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php index 52e7e72a7b7..c4aa15a7899 100644 --- a/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php @@ -34,7 +34,7 @@ class Mage_Bundle_Model_Resource_Option_Collection extends Mage_Core_Model_Resou /** * All item ids cache * - * @var array + * @var array|null */ protected $_itemIds; diff --git a/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php b/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php index b22f6f78a2e..45bf782509a 100644 --- a/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php @@ -38,14 +38,14 @@ class Mage_Bundle_Model_Resource_Price_Index extends Mage_Core_Model_Resource_Db /** * Websites cache * - * @var array + * @var array|null */ protected $_websites; /** * Customer Groups cache * - * @var array + * @var array|null */ protected $_customerGroups; @@ -833,11 +833,7 @@ public function _calculateSpecialPrice($finalPrice, array $priceData, Mage_Core_ $specialPrice = $priceData['special_price']; if (!is_null($specialPrice) && $specialPrice != false) { - if (Mage::app()->getLocale()->isStoreDateInInterval( - $store, - $priceData['special_from_date'], - $priceData['special_to_date'] - )) { + if (Mage::app()->getLocale()->isStoreDateInInterval($store, $priceData['special_from_date'], $priceData['special_to_date'])) { $specialPrice = ($finalPrice * $specialPrice) / 100; $finalPrice = min($finalPrice, $specialPrice); } diff --git a/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php b/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php index e6e14a5c412..8366b71025a 100644 --- a/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php @@ -49,7 +49,7 @@ protected function _construct() /** * Set store id for each collection item when collection was loaded * - * @return Mage_Bundle_Model_Resource_Selection_Collection + * @return $this */ public function _afterLoad() { @@ -74,6 +74,8 @@ protected function _initSelect() 'selection.product_id = e.entity_id', ['*'] ); + + return $this; } /** diff --git a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php index f2995af3f28..34be34b2fc4 100644 --- a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php +++ b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php @@ -78,7 +78,8 @@ public function isShipmentSeparately($item = null) $options = $parentItem->getProductOptions(); if ($options) { if (isset($options['shipment_type']) - && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) { + && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY + ) { return true; } else { return false; @@ -88,7 +89,8 @@ public function isShipmentSeparately($item = null) $options = $item->getProductOptions(); if ($options) { if (isset($options['shipment_type']) - && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) { + && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY + ) { return false; } else { return true; @@ -100,7 +102,8 @@ public function isShipmentSeparately($item = null) $options = $this->getOrderItem()->getProductOptions(); if ($options) { if (isset($options['shipment_type']) - && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY) { + && $options['shipment_type'] == Mage_Catalog_Model_Product_Type_Abstract::SHIPMENT_SEPARATELY + ) { return true; } } @@ -149,7 +152,8 @@ public function isChildCalculated($item = null) $options = $this->getOrderItem()->getProductOptions(); if ($options) { if (isset($options['product_calculations']) - && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD) { + && $options['product_calculations'] == Mage_Catalog_Model_Product_Type_Abstract::CALCULATE_CHILD + ) { return true; } } @@ -261,7 +265,8 @@ public function getValueHtml($item) public function canShowPriceInfo($item) { if (($item->getOrderItem()->getParentItem() && $this->isChildCalculated()) - || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated())) { + || (!$item->getOrderItem()->getParentItem() && !$this->isChildCalculated()) + ) { return true; } return false; diff --git a/app/code/core/Mage/Bundle/etc/config.xml b/app/code/core/Mage/Bundle/etc/config.xml index f3ca1b0d469..91fadac9de3 100644 --- a/app/code/core/Mage/Bundle/etc/config.xml +++ b/app/code/core/Mage/Bundle/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Bundle * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-data-upgrade-0.1.13-0.1.14.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-data-upgrade-0.1.13-0.1.14.php index 4595eddcdc7..665b021a0ae 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-data-upgrade-0.1.13-0.1.14.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-data-upgrade-0.1.13-0.1.14.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $priceTypeAttribute = $installer->getAttribute('catalog_product', 'price_type'); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php index 9f3b132dc25..16df72c6f0c 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-install-0.1.0.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.10-0.1.11.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.10-0.1.11.php index 267ff72b311..1057c3ee92a 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.10-0.1.11.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.10-0.1.11.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.11-0.1.12.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.11-0.1.12.php index 077ca55968b..2176d65be57 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.11-0.1.12.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.11-0.1.12.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.12-0.1.13.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.12-0.1.13.php index c2c015f2fde..782bf1a9c35 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.12-0.1.13.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.12-0.1.13.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run(" diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.2-0.1.3.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.2-0.1.3.php index ae61edafded..666fbaf3387 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.2-0.1.3.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.2-0.1.3.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.3-0.1.4.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.3-0.1.4.php index efbad910e2e..e79e3f37d2d 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.3-0.1.4.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.3-0.1.4.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.4-0.1.5.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.4-0.1.5.php index 6bbf13fdcb8..a7c28b39b15 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.4-0.1.5.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.4-0.1.5.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->updateAttribute('catalog_product', 'price_type', 'used_in_product_listing', 1); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.5-0.1.6.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.5-0.1.6.php index 22f71dacb49..1b7ae7698b1 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.5-0.1.6.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.5-0.1.6.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->updateAttribute('catalog_product', 'price_view', 'used_in_product_listing', 1); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.6-0.1.7.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.6-0.1.7.php index 9956f21e2a4..82f13d95c49 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.6-0.1.7.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.6-0.1.7.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.7-0.1.8.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.7-0.1.8.php index 6a235ca0126..1a1371c4524 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.7-0.1.8.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.7-0.1.8.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->getConnection()->addKey( diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.8-0.1.9.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.8-0.1.9.php index f09cc98aa3d..d82943a1f0f 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.8-0.1.9.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.8-0.1.9.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.9-0.1.10.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.9-0.1.10.php index 1f73fa35c8a..c7b3a186679 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.9-0.1.10.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-0.1.9-0.1.10.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Captcha/Block/Captcha.php b/app/code/core/Mage/Captcha/Block/Captcha.php index 07dfc9d097a..c687fdc38aa 100644 --- a/app/code/core/Mage/Captcha/Block/Captcha.php +++ b/app/code/core/Mage/Captcha/Block/Captcha.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Captcha * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Captcha/Model/Zend.php b/app/code/core/Mage/Captcha/Model/Zend.php index 47fcdf1493f..b46a08c577f 100644 --- a/app/code/core/Mage/Captcha/Model/Zend.php +++ b/app/code/core/Mage/Captcha/Model/Zend.php @@ -68,6 +68,13 @@ class Mage_Captcha_Model_Zend extends Zend_Captcha_Image implements Mage_Captcha */ protected $_formId; + /** + * Generated word + * + * @var string|null + */ + protected $_word; + /** * Zend captcha constructor * @@ -448,11 +455,14 @@ protected function _getTargetForms() /** * Get captcha word * - * @return string + * @return string|null */ public function getWord() { $sessionData = $this->getSession()->getData($this->_getFormIdKey(self::SESSION_WORD)); + if (!is_array($sessionData)) { + return null; + } return time() < $sessionData['expires'] ? $sessionData['data'] : null; } diff --git a/app/code/core/Mage/Captcha/etc/config.xml b/app/code/core/Mage/Captcha/etc/config.xml index 65bd8fc8733..c898ecba9fc 100644 --- a/app/code/core/Mage/Captcha/etc/config.xml +++ b/app/code/core/Mage/Captcha/etc/config.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_Captcha * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/Block/Navigation.php b/app/code/core/Mage/Catalog/Block/Navigation.php index dd4e2d6c3cf..c1ceb2a1a52 100644 --- a/app/code/core/Mage/Catalog/Block/Navigation.php +++ b/app/code/core/Mage/Catalog/Block/Navigation.php @@ -31,7 +31,7 @@ class Mage_Catalog_Block_Navigation extends Mage_Core_Block_Template /** * Category instance * - * @var Mage_Catalog_Model_Category + * @var Mage_Catalog_Model_Category|null */ protected $_categoryInstance; diff --git a/app/code/core/Mage/Catalog/Block/Product/Compare/List.php b/app/code/core/Mage/Catalog/Block/Product/Compare/List.php index f84f41bf94c..e8ba5497160 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Compare/List.php +++ b/app/code/core/Mage/Catalog/Block/Product/Compare/List.php @@ -31,14 +31,14 @@ class Mage_Catalog_Block_Product_Compare_List extends Mage_Catalog_Block_Product /** * Product Compare items collection * - * @var Mage_Catalog_Model_Resource_Product_Compare_Item_Collection + * @var Mage_Catalog_Model_Resource_Product_Compare_Item_Collection|null */ protected $_items; /** * Compare Products comparable attributes cache * - * @var array + * @var array|null */ protected $_attributes; diff --git a/app/code/core/Mage/Catalog/Block/Product/List.php b/app/code/core/Mage/Catalog/Block/Product/List.php index d3359346a12..3df3b7f5e9f 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List.php +++ b/app/code/core/Mage/Catalog/Block/Product/List.php @@ -51,7 +51,7 @@ class Mage_Catalog_Block_Product_List extends Mage_Catalog_Block_Product_Abstrac /** * Product Collection * - * @var Mage_Eav_Model_Entity_Collection_Abstract + * @var Mage_Eav_Model_Entity_Collection_Abstract|null */ protected $_productCollection; diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php b/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php index b4b06ec02eb..0430d1aac5c 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php index 8f82b1039a8..0827c33311c 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php @@ -128,8 +128,8 @@ public function getRowCount() */ public function setColumnCount($columns) { - if (intval($columns) > 0) { - $this->_columnCount = intval($columns); + if ((int) $columns > 0) { + $this->_columnCount = (int) $columns; } return $this; } @@ -168,8 +168,8 @@ public function getIterableItem() */ public function setItemLimit($type, $limit) { - if (intval($limit) > 0) { - $this->_itemLimits[$type] = intval($limit); + if ((int) $limit > 0) { + $this->_itemLimits[$type] = (int) $limit; } return $this; } diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php index d831316e7c3..dd47312b16a 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php @@ -160,11 +160,11 @@ public function getTimeHtml() /** * Return drop-down html with range of values * - * @param string $name Id/name of html select element - * @param int $from Start position - * @param int $to End position - * @param int $value Value selected - * @return string Formatted Html + * @param string $name Id/name of html select element + * @param string|int $from Start position + * @param string|int $to End position + * @param string $value Value selected + * @return string Formatted Html */ protected function _getSelectFromToHtml($name, $from, $to, $value = null) { @@ -183,14 +183,13 @@ protected function _getSelectFromToHtml($name, $from, $to, $value = null) * HTML select element * * @param string $name Id/name of html select element - * @param null $value + * @param string|null $value * @return Mage_Core_Block_Html_Select */ protected function _getHtmlSelect($name, $value = null) { $option = $this->getOption(); - // $require = $this->getOption()->getIsRequire() ? ' required-entry' : ''; $require = ''; $select = $this->getLayout()->createBlock('core/html_select') ->setId('options_' . $this->getOption()->getId() . '_' . $name) diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php index d65234bbfa5..fbc87a22573 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php @@ -42,7 +42,8 @@ public function getValuesHtml() $store = $this->getProduct()->getStore(); if ($_option->getType() === Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN - || $_option->getType() === Mage_Catalog_Model_Product_Option::OPTION_TYPE_MULTIPLE) { + || $_option->getType() === Mage_Catalog_Model_Product_Option::OPTION_TYPE_MULTIPLE + ) { $require = ($_option->getIsRequire()) ? ' required-entry' : ''; $extraParams = ''; /** @var Mage_Core_Block_Html_Select $block */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php b/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php index 5b3850471bb..5b418e4b6f7 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php @@ -102,7 +102,8 @@ public function getAllowProducts() if ($product->isSaleable() || $skipSaleableCheck || (!$product->getStockItem()->getIsInStock() - && Mage::helper('cataloginventory')->isShowOutOfStock())) { + && Mage::helper('cataloginventory')->isShowOutOfStock()) + ) { $products[] = $product; } } diff --git a/app/code/core/Mage/Catalog/Block/Product/Widget/New.php b/app/code/core/Mage/Catalog/Block/Product/Widget/New.php index 05eb8f6f1c6..8dee0444447 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Widget/New.php +++ b/app/code/core/Mage/Catalog/Block/Product/Widget/New.php @@ -120,7 +120,7 @@ public function getCacheKeyInfo() return array_merge(parent::getCacheKeyInfo(), [ $this->getDisplayType(), $this->getProductsPerPage(), - intval($this->getRequest()->getParam(self::PAGE_VAR_NAME)) + (int) $this->getRequest()->getParam(self::PAGE_VAR_NAME) ]); } diff --git a/app/code/core/Mage/Catalog/Helper/Category/Flat.php b/app/code/core/Mage/Catalog/Helper/Category/Flat.php index 3833451cc34..323c5e6c0a8 100644 --- a/app/code/core/Mage/Catalog/Helper/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Helper/Category/Flat.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Data.php b/app/code/core/Mage/Catalog/Helper/Data.php index 781f878d6ac..45d0f8de5d3 100644 --- a/app/code/core/Mage/Catalog/Helper/Data.php +++ b/app/code/core/Mage/Catalog/Helper/Data.php @@ -432,15 +432,9 @@ public function canApplyMsrpToProductType($product) public function getMsrpPriceMessage($product) { $message = ""; - if ($this->canApplyMsrp( - $product, - Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_IN_CART - )) { + if ($this->canApplyMsrp($product, Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_IN_CART)) { $message = $this->__('To see product price, add this item to your cart. You can always remove it later.'); - } elseif ($this->canApplyMsrp( - $product, - Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM - )) { + } elseif ($this->canApplyMsrp($product, Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM)) { $message = $this->__('See price before order confirmation.'); } return $message; diff --git a/app/code/core/Mage/Catalog/Helper/Flat/Abstract.php b/app/code/core/Mage/Catalog/Helper/Flat/Abstract.php index 3811973c64b..45517aa162f 100644 --- a/app/code/core/Mage/Catalog/Helper/Flat/Abstract.php +++ b/app/code/core/Mage/Catalog/Helper/Flat/Abstract.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -44,14 +45,14 @@ abstract class Mage_Catalog_Helper_Flat_Abstract extends Mage_Core_Helper_Abstra /** * Flag for accessibility * - * @var bool + * @var bool|null */ protected $_isAccessible = null; /** * Flag for availability * - * @var bool + * @var bool|null */ protected $_isAvailable = null; diff --git a/app/code/core/Mage/Catalog/Helper/Image.php b/app/code/core/Mage/Catalog/Helper/Image.php index 462b6c5a193..4b44a3745ba 100644 --- a/app/code/core/Mage/Catalog/Helper/Image.php +++ b/app/code/core/Mage/Catalog/Helper/Image.php @@ -37,7 +37,7 @@ class Mage_Catalog_Helper_Image extends Mage_Core_Helper_Abstract /** * Current model * - * @var Mage_Catalog_Model_Product_Image + * @var Mage_Catalog_Model_Product_Image|null */ protected $_model; @@ -58,49 +58,49 @@ class Mage_Catalog_Helper_Image extends Mage_Core_Helper_Abstract /** * Angle * - * @var int + * @var int|null */ protected $_angle; /** * Watermark file name * - * @var string + * @var string|null */ protected $_watermark; /** * Watermark Position * - * @var string + * @var string|null */ protected $_watermarkPosition; /** * Watermark Size * - * @var string + * @var string|null */ protected $_watermarkSize; /** * Watermark Image opacity * - * @var int + * @var int|null */ protected $_watermarkImageOpacity; /** * Current Product * - * @var Mage_Catalog_Model_Product + * @var Mage_Catalog_Model_Product|null */ protected $_product; /** * Image File * - * @var string + * @var string|null */ protected $_imageFile; diff --git a/app/code/core/Mage/Catalog/Helper/Output.php b/app/code/core/Mage/Catalog/Helper/Output.php index 04856aa7ff0..ea759134114 100644 --- a/app/code/core/Mage/Catalog/Helper/Output.php +++ b/app/code/core/Mage/Catalog/Helper/Output.php @@ -124,7 +124,8 @@ public function productAttribute($product, $attributeHtml, $attributeName) /** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */ $attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Product::ENTITY, $attributeName); if ($attribute && $attribute->getId() && ($attribute->getFrontendInput() != 'media_image') - && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) { + && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled()) + ) { if ($attribute->getFrontendInput() != 'price') { $attributeHtml = $this->escapeHtml($attributeHtml); } @@ -160,7 +161,8 @@ public function categoryAttribute($category, $attributeHtml, $attributeName) $attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Category::ENTITY, $attributeName); if ($attribute && ($attribute->getFrontendInput() != 'image') - && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) { + && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled()) + ) { $attributeHtml = $this->escapeHtml($attributeHtml); } if ($attribute->getIsHtmlAllowedOnFront() && $attribute->getIsWysiwygEnabled()) { diff --git a/app/code/core/Mage/Catalog/Helper/Product/Configuration.php b/app/code/core/Mage/Catalog/Helper/Product/Configuration.php index 4f2010e0f94..1fec7bf816c 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Configuration.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Configuration.php @@ -161,10 +161,8 @@ public function getOptions(Mage_Catalog_Model_Product_Configuration_Item_Interfa switch ($typeId) { case Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE: return $this->getConfigurableOptions($item); - break; case Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE: return $this->getGroupedOptions($item); - break; } return $this->getCustomOptions($item); } diff --git a/app/code/core/Mage/Catalog/Helper/Product/Flat.php b/app/code/core/Mage/Catalog/Helper/Product/Flat.php index dcff4b0511a..e522795b5d5 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Flat.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Flat.php @@ -73,7 +73,7 @@ class Mage_Catalog_Helper_Product_Flat extends Mage_Catalog_Helper_Flat_Abstract /** * Catalog Product Flat Flag object * - * @var Mage_Catalog_Model_Product_Flat_Flag + * @var Mage_Catalog_Model_Product_Flat_Flag|null */ protected $_flagObject; @@ -155,7 +155,7 @@ public function isBuiltAllStores() */ public function isAddFilterableAttributes() { - return intval(Mage::getConfig()->getNode(self::XML_NODE_ADD_FILTERABLE_ATTRIBUTES)); + return (int) Mage::getConfig()->getNode(self::XML_NODE_ADD_FILTERABLE_ATTRIBUTES); } /** @@ -165,7 +165,7 @@ public function isAddFilterableAttributes() */ public function isAddChildData() { - return intval(Mage::getConfig()->getNode(self::XML_NODE_ADD_CHILD_DATA)); + return (int) Mage::getConfig()->getNode(self::XML_NODE_ADD_CHILD_DATA); } /** diff --git a/app/code/core/Mage/Catalog/Helper/Product/Url.php b/app/code/core/Mage/Catalog/Helper/Product/Url.php index c860954f234..0ec6aa1506a 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Url.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Url.php @@ -99,7 +99,7 @@ public function __construct() $convertNode = Mage::getConfig()->getNode('default/url/convert'); if ($convertNode) { foreach ($convertNode->children() as $node) { - $this->_convertTable[strval($node->from)] = strval($node->to); + $this->_convertTable[(string) $node->from] = (string) $node->to; } } } diff --git a/app/code/core/Mage/Catalog/Model/Abstract.php b/app/code/core/Mage/Catalog/Model/Abstract.php index 6f0a7a261e5..6d9d2e77ad4 100644 --- a/app/code/core/Mage/Catalog/Model/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Abstract.php @@ -186,7 +186,8 @@ public function setData($key, $value = null) public function unsetData($key = null) { if ((!is_null($key) && $this->isLockedAttribute($key)) || - $this->isReadonly()) { + $this->isReadonly() + ) { return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Api/Resource.php b/app/code/core/Mage/Catalog/Model/Api/Resource.php index 2eb17d669e2..9c4df665264 100644 --- a/app/code/core/Mage/Catalog/Model/Api/Resource.php +++ b/app/code/core/Mage/Catalog/Model/Api/Resource.php @@ -71,7 +71,8 @@ protected function _isAllowedAttribute($attribute, $attributes = null) if (is_array($attributes) && !(in_array($attribute->getAttributeCode(), $attributes) - || in_array($attribute->getAttributeId(), $attributes))) { + || in_array($attribute->getAttributeId(), $attributes)) + ) { return false; } diff --git a/app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php b/app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php index 22eb73e8fa0..83fc1109880 100644 --- a/app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php +++ b/app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php @@ -34,6 +34,8 @@ class Mage_Catalog_Model_Api2_Product_Image_Rest_Admin_V1 extends Mage_Catalog_M * @throws Mage_Api2_Exception * @param array $data * @return string|void + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ protected function _create(array $data) { diff --git a/app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php b/app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php index f5223168519..fab549d8ad6 100644 --- a/app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php +++ b/app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php @@ -31,7 +31,7 @@ abstract class Mage_Catalog_Model_Api2_Product_Rest extends Mage_Catalog_Model_A /** * Current loaded product * - * @var Mage_Catalog_Model_Product + * @var Mage_Catalog_Model_Product|null */ protected $_product; diff --git a/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php b/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php index aa6333bc35d..b985096657d 100644 --- a/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php +++ b/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Admin/V1.php @@ -281,7 +281,8 @@ protected function _prepareDataForSave($product, $productData) if (isset($productData['use_config_gift_message_available'])) { $product->setData('use_config_gift_message_available', $productData['use_config_gift_message_available']); if (!$productData['use_config_gift_message_available'] - && ($product->getData('gift_message_available') === null)) { + && ($product->getData('gift_message_available') === null) + ) { $product->setData('gift_message_available', (int) Mage::getStoreConfig( Mage_GiftMessage_Helper_Message::XPATH_CONFIG_GIFT_MESSAGE_ALLOW_ITEMS, $product->getStoreId() diff --git a/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Customer/V1.php b/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Customer/V1.php index 59bd41a4403..a8ad2a766a6 100644 --- a/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Customer/V1.php +++ b/app/code/core/Mage/Catalog/Model/Api2/Product/Rest/Customer/V1.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,7 @@ class Mage_Catalog_Model_Api2_Product_Rest_Customer_V1 extends Mage_Catalog_Mode /** * Current logged in customer * - * @var Mage_Customer_Model_Customer + * @var Mage_Customer_Model_Customer|null */ protected $_customer; diff --git a/app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php b/app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php index 27d10484930..f01bb09fabd 100644 --- a/app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php +++ b/app/code/core/Mage/Catalog/Model/Api2/Product/Validator/Product.php @@ -140,7 +140,8 @@ protected function _validateAttributes($data, $productEntity) } // Validate weight if (isset($data['weight']) && !empty($data['weight']) && $data['weight'] > 0 - && !Zend_Validate::is($data['weight'], 'Between', [0, self::MAX_DECIMAL_VALUE])) { + && !Zend_Validate::is($data['weight'], 'Between', [0, self::MAX_DECIMAL_VALUE]) + ) { $this->_addError('The "weight" value is not within the specified range.'); } // msrp_display_actual_price_type attribute values needs to be a string to pass validation @@ -177,7 +178,8 @@ protected function _validateAttributes($data, $productEntity) // Validate dropdown attributes if ($attribute->usesSource() // skip check when field will be validated later as a required one - && !(empty($value) && $attribute->getIsRequired())) { + && !(empty($value) && $attribute->getIsRequired()) + ) { $allowedValues = $this->_getAttributeAllowedValues($attribute->getSource()->getAllOptions()); if (!is_array($value)) { // make validation of select and multiselect identical @@ -186,7 +188,8 @@ protected function _validateAttributes($data, $productEntity) foreach ($value as $selectValue) { $useStrictMode = !is_numeric($selectValue); if (!in_array($selectValue, $allowedValues, $useStrictMode) - && !$this->_isConfigValueUsed($data, $attributeCode)) { + && !$this->_isConfigValueUsed($data, $attributeCode) + ) { $this->_addError(sprintf( 'Invalid value "%s" for attribute "%s".', $selectValue, diff --git a/app/code/core/Mage/Catalog/Model/Attribute/Backend/Urlkey/Abstract.php b/app/code/core/Mage/Catalog/Model/Attribute/Backend/Urlkey/Abstract.php index 7efdc0880a7..203ef7138d9 100644 --- a/app/code/core/Mage/Catalog/Model/Attribute/Backend/Urlkey/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Attribute/Backend/Urlkey/Abstract.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php index 57860d82c4d..7d0116414da 100644 --- a/app/code/core/Mage/Catalog/Model/Category.php +++ b/app/code/core/Mage/Catalog/Model/Category.php @@ -157,7 +157,7 @@ class Mage_Catalog_Model_Category extends Mage_Catalog_Model_Abstract /** * Category tree model * - * @var Mage_Catalog_Model_Resource_Category_Tree + * @var Mage_Catalog_Model_Resource_Category_Tree|null */ protected $_treeModel = null; @@ -589,7 +589,7 @@ public function getParentCategory() public function getParentId() { $parentIds = $this->getParentIds(); - return intval(array_pop($parentIds)); + return (int) array_pop($parentIds); } /** diff --git a/app/code/core/Mage/Catalog/Model/Category/Api.php b/app/code/core/Mage/Catalog/Model/Category/Api.php index b54a269e109..50c7b88c2cb 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Api.php +++ b/app/code/core/Mage/Catalog/Model/Category/Api.php @@ -116,7 +116,7 @@ public function level($website = null, $store = null, $categoryId = null) /** * Retrieve category tree * - * @param null $parentId + * @param int|null $parentId * @param string|int $store * @return array * @throws Mage_Core_Model_Store_Exception @@ -311,7 +311,8 @@ public function update($categoryId, $categoryData, $store = null) foreach ($category->getAttributes() as $attribute) { if ($this->_isAllowedAttribute($attribute) - && isset($categoryData[$attribute->getAttributeCode()])) { + && isset($categoryData[$attribute->getAttributeCode()]) + ) { $category->setData( $attribute->getAttributeCode(), $categoryData[$attribute->getAttributeCode()] @@ -477,8 +478,8 @@ public function assignProduct($categoryId, $productId, $position = null, $identi * * @param int $categoryId * @param int $productId - * @param int $position - * @param null $identifierType + * @param int|null $position + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ @@ -506,8 +507,8 @@ public function updateProduct($categoryId, $productId, $position = null, $identi * Remove product assignment from category * * @param int $categoryId - * @param int $productId - * @param null $identifierType + * @param int|null $productId + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Api/V2.php b/app/code/core/Mage/Catalog/Model/Category/Api/V2.php index 1a36e0f7213..e84ed79890c 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Category/Api/V2.php @@ -65,7 +65,7 @@ public function info($categoryId, $store = null, $attributes = null) * * @param int $parentId * @param array $categoryData - * @param null $store + * @param int|string|null $store * @return int * @throws Mage_Api_Exception * @throws Mage_Eav_Model_Entity_Attribute_Exception @@ -85,7 +85,8 @@ public function create($parentId, $categoryData, $store = null) foreach ($category->getAttributes() as $attribute) { $_attrCode = $attribute->getAttributeCode(); if ($this->_isAllowedAttribute($attribute) - && isset($categoryData->$_attrCode)) { + && isset($categoryData->$_attrCode) + ) { $category->setData( $attribute->getAttributeCode(), $categoryData->$_attrCode @@ -128,7 +129,8 @@ public function update($categoryId, $categoryData, $store = null) foreach ($category->getAttributes() as $attribute) { $_attrCode = $attribute->getAttributeCode(); if ($this->_isAllowedAttribute($attribute) - && isset($categoryData->$_attrCode)) { + && isset($categoryData->$_attrCode) + ) { $category->setData( $attribute->getAttributeCode(), $categoryData->$_attrCode diff --git a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php index 562979fce20..84f1afa660f 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php @@ -19,6 +19,11 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +use Mage_Catalog_Model_Category as Category; +use Mage_Core_Model_Store as Store; +use Mage_Core_Model_Store_Group as StoreGroup; +use Mage_Index_Model_Event as Event; + /** * Catalog Category Flat Indexer Model * @@ -39,15 +44,15 @@ class Mage_Catalog_Model_Category_Indexer_Flat extends Mage_Index_Model_Indexer_ * @var array */ protected $_matchedEntities = [ - Mage_Catalog_Model_Category::ENTITY => [ - Mage_Index_Model_Event::TYPE_SAVE + Category::ENTITY => [ + Event::TYPE_SAVE ], - Mage_Core_Model_Store::ENTITY => [ - Mage_Index_Model_Event::TYPE_SAVE, - Mage_Index_Model_Event::TYPE_DELETE + Store::ENTITY => [ + Event::TYPE_SAVE, + Event::TYPE_DELETE ], - Mage_Core_Model_Store_Group::ENTITY => [ - Mage_Index_Model_Event::TYPE_SAVE + StoreGroup::ENTITY => [ + Event::TYPE_SAVE ], ]; @@ -98,10 +103,10 @@ protected function _getIndexer() * Overwrote for check is flat catalog category is enabled and specific save * category, store, store_group * - * @param Mage_Index_Model_Event $event + * @param Event $event * @return bool */ - public function matchEvent(Mage_Index_Model_Event $event) + public function matchEvent(Event $event) { /** @var Mage_Catalog_Helper_Category_Flat $categoryFlatHelper */ $categoryFlatHelper = Mage::helper('catalog/category_flat'); @@ -115,17 +120,19 @@ public function matchEvent(Mage_Index_Model_Event $event) } $entity = $event->getEntity(); - if ($entity == Mage_Core_Model_Store::ENTITY) { - if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { + if ($entity == Store::ENTITY) { + if ($event->getType() == Event::TYPE_DELETE) { $result = true; - } elseif ($event->getType() == Mage_Index_Model_Event::TYPE_SAVE) { - /** @var Mage_Core_Model_Store $store */ + } elseif ($event->getType() == Event::TYPE_SAVE) { + /** @var Store $store */ $store = $event->getDataObject(); - if ($store && ( - $store->isObjectNew() - || $store->dataHasChangedFor('group_id') - || $store->dataHasChangedFor('root_category_id') - )) { + if ($store + && ( + $store->isObjectNew() + || $store->dataHasChangedFor('group_id') + || $store->dataHasChangedFor('root_category_id') + ) + ) { $result = true; } else { $result = false; @@ -133,8 +140,8 @@ public function matchEvent(Mage_Index_Model_Event $event) } else { $result = false; } - } elseif ($entity == Mage_Core_Model_Store_Group::ENTITY) { - /** @var Mage_Core_Model_Store_Group $storeGroup */ + } elseif ($entity == StoreGroup::ENTITY) { + /** @var StoreGroup $storeGroup */ $storeGroup = $event->getDataObject(); if ($storeGroup && ($storeGroup->dataHasChangedFor('website_id') || $storeGroup->dataHasChangedFor('root_category_id')) @@ -155,23 +162,23 @@ public function matchEvent(Mage_Index_Model_Event $event) /** * Register data required by process in event object * - * @param Mage_Index_Model_Event $event + * @param Event $event */ - protected function _registerEvent(Mage_Index_Model_Event $event) + protected function _registerEvent(Event $event) { $event->addNewData(self::EVENT_MATCH_RESULT_KEY, true); switch ($event->getEntity()) { - case Mage_Catalog_Model_Category::ENTITY: + case Category::ENTITY: $this->_registerCatalogCategoryEvent($event); break; - case Mage_Core_Model_Store::ENTITY: - if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { + case Store::ENTITY: + if ($event->getType() == Event::TYPE_DELETE) { $this->_registerCoreStoreEvent($event); break; } // no break - case Mage_Core_Model_Store_Group::ENTITY: + case StoreGroup::ENTITY: $event->addNewData('catalog_category_flat_skip_call_event_handler', true); $process = $event->getProcess(); $process->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); @@ -182,14 +189,14 @@ protected function _registerEvent(Mage_Index_Model_Event $event) /** * Register data required by catalog category process in event object * - * @param Mage_Index_Model_Event $event + * @param Event $event * @return $this */ - protected function _registerCatalogCategoryEvent(Mage_Index_Model_Event $event) + protected function _registerCatalogCategoryEvent(Event $event) { switch ($event->getType()) { - case Mage_Index_Model_Event::TYPE_SAVE: - /** @var Mage_Catalog_Model_Category $category */ + case Event::TYPE_SAVE: + /** @var Category $category */ $category = $event->getDataObject(); /** @@ -210,13 +217,13 @@ protected function _registerCatalogCategoryEvent(Mage_Index_Model_Event $event) /** * Register core store delete process * - * @param Mage_Index_Model_Event $event + * @param Event $event * @return $this */ - protected function _registerCoreStoreEvent(Mage_Index_Model_Event $event) + protected function _registerCoreStoreEvent(Event $event) { - if ($event->getType() == Mage_Index_Model_Event::TYPE_DELETE) { - /** @var Mage_Core_Model_Store $store */ + if ($event->getType() == Event::TYPE_DELETE) { + /** @var Store $store */ $store = $event->getDataObject(); $event->addNewData('catalog_category_flat_delete_store_id', $store->getId()); } @@ -226,9 +233,9 @@ protected function _registerCoreStoreEvent(Mage_Index_Model_Event $event) /** * Process event * - * @param Mage_Index_Model_Event $event + * @param Event $event */ - protected function _processEvent(Mage_Index_Model_Event $event) + protected function _processEvent(Event $event) { $data = $event->getNewData(); diff --git a/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php index 40cf83af4f5..5f0e37bc876 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php @@ -191,7 +191,8 @@ protected function _registerProductEvent(Mage_Index_Model_Event $event) * Check if product categories data was changed */ if ($product->getIsChangedCategories() || $product->dataHasChangedFor('status') - || $product->dataHasChangedFor('visibility') || $product->getIsChangedWebsites()) { + || $product->dataHasChangedFor('visibility') || $product->getIsChangedWebsites() + ) { $event->addNewData('category_ids', $product->getCategoryIds()); } } elseif ($eventType == Mage_Index_Model_Event::TYPE_MASS_ACTION) { diff --git a/app/code/core/Mage/Catalog/Model/Config.php b/app/code/core/Mage/Catalog/Model/Config.php index 3fd671578de..3241fab17df 100644 --- a/app/code/core/Mage/Catalog/Model/Config.php +++ b/app/code/core/Mage/Catalog/Model/Config.php @@ -43,21 +43,21 @@ class Mage_Catalog_Model_Config extends Mage_Eav_Model_Config /** * Array of attributes codes needed for product load * - * @var array + * @var array|null */ protected $_productAttributes; /** * Product Attributes used in product listing * - * @var array + * @var array|null */ protected $_usedInProductListing; /** * Product Attributes For Sort By * - * @var array + * @var array|null */ protected $_usedForSortBy; diff --git a/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php b/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php index 268b1198a67..7516964b3b3 100644 --- a/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php +++ b/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php @@ -38,14 +38,14 @@ class Mage_Catalog_Model_Convert_Adapter_Product extends Mage_Eav_Model_Convert_ /** * Product model * - * @var Mage_Catalog_Model_Product + * @var Mage_Catalog_Model_Product|string|null */ protected $_productModel; /** * product types collection array * - * @var array + * @var array|null */ protected $_productTypes; @@ -59,7 +59,7 @@ class Mage_Catalog_Model_Convert_Adapter_Product extends Mage_Eav_Model_Convert_ /** * product attribute set collection array * - * @var array + * @var array|null */ protected $_productAttributeSets; diff --git a/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php b/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php index 744b38d3789..8f7af02f7c1 100644 --- a/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php +++ b/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php @@ -49,7 +49,7 @@ class Mage_Catalog_Model_Convert_Parser_Product extends Mage_Eav_Model_Convert_P /** * Product Type cache * - * @var array + * @var array|null */ protected $_productTypes; diff --git a/app/code/core/Mage/Catalog/Model/Design.php b/app/code/core/Mage/Catalog/Model/Design.php index bdd23cee8f9..ec4d57c9cb6 100644 --- a/app/code/core/Mage/Catalog/Model/Design.php +++ b/app/code/core/Mage/Catalog/Model/Design.php @@ -214,7 +214,8 @@ protected function _inheritDesign($object, $calledFrom = 0) if ($category && $category->getId() && $category->getLevel() > 1 && - $category->getId() != Mage_Catalog_Model_Category::TREE_ROOT_ID) { + $category->getId() != Mage_Catalog_Model_Category::TREE_ROOT_ID + ) { return $this->_inheritDesign($category, $calledFrom); } } @@ -373,7 +374,8 @@ protected function _extractSettings($object) } $date = $object->getCustomDesignDate(); if (array_key_exists('from', $date) && array_key_exists('to', $date) - && Mage::app()->getLocale()->isStoreDateInInterval(null, $date['from'], $date['to'])) { + && Mage::app()->getLocale()->isStoreDateInInterval(null, $date['from'], $date['to']) + ) { $customLayout = $object->getCustomLayoutUpdate(); if ($customLayout) { try { diff --git a/app/code/core/Mage/Catalog/Model/Entity/Attribute.php b/app/code/core/Mage/Catalog/Model/Entity/Attribute.php index 360876e7258..d2d02f8c5fa 100644 --- a/app/code/core/Mage/Catalog/Model/Entity/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Entity/Attribute.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -53,8 +54,7 @@ * @method $this setUsedForSortBy(int $value) * @method int getIsConfigurable() * @method $this setIsConfigurable(int $value) - * @method string getApplyTo() - * @method $this setApplyTo(string $value) + * @method $this setApplyTo(string|array $value) * @method int getIsVisibleInAdvancedSearch() * @method $this setIsVisibleInAdvancedSearch(int $value) * @method int getPosition() diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php index 79c3098c674..979f03c62ca 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php @@ -38,7 +38,7 @@ abstract class Mage_Catalog_Model_Layer_Filter_Abstract extends Varien_Object /** * Array of filter items * - * @var array + * @var array|null */ protected $_items; @@ -88,7 +88,7 @@ public function getCleanValue() * Apply filter to collection * * @param Zend_Controller_Request_Abstract $request - * @param null $filterBlock + * @param null $filterBlock deprecated * @return $this */ public function apply(Zend_Controller_Request_Abstract $request, $filterBlock) diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php index 706c39f24da..e45217892e4 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php @@ -33,7 +33,7 @@ class Mage_Catalog_Model_Layer_Filter_Attribute extends Mage_Catalog_Model_Layer /** * Resource instance * - * @var Mage_Catalog_Model_Resource_Layer_Filter_Attribute + * @var Mage_Catalog_Model_Resource_Layer_Filter_Attribute|null */ protected $_resource; diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php index 610c9badbca..beb1b75804b 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php @@ -31,7 +31,7 @@ class Mage_Catalog_Model_Layer_Filter_Category extends Mage_Catalog_Model_Layer_ /** * Active Category Id * - * @var int + * @var int|null */ protected $_categoryId; diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php index d2ce4547089..79d8d8d9cf5 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php @@ -35,7 +35,7 @@ class Mage_Catalog_Model_Layer_Filter_Decimal extends Mage_Catalog_Model_Layer_F /** * Resource instance * - * @var Mage_Catalog_Model_Resource_Layer_Filter_Decimal + * @var Mage_Catalog_Model_Resource_Layer_Filter_Decimal|null */ protected $_resource; @@ -184,7 +184,7 @@ public function getRange() * Retrieve information about products count in range * * @param int $range - * @return int + * @return array */ public function getRangeItemCounts($range) { 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 a17f6c921fc..af1f3f45f43 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php @@ -57,7 +57,7 @@ class Mage_Catalog_Model_Layer_Filter_Price extends Mage_Catalog_Model_Layer_Fil /** * Resource instance * - * @var Mage_Catalog_Model_Resource_Layer_Filter_Price + * @var Mage_Catalog_Model_Resource_Layer_Filter_Price|null */ protected $_resource; @@ -142,7 +142,7 @@ public function getMaxPriceInt() * Get information about products count in range * * @param int $range - * @return int + * @return array */ public function getRangeItemCounts($range) { @@ -364,7 +364,7 @@ protected function _validateFilter($filter) * Apply price range filter * * @param Zend_Controller_Request_Abstract $request - * @param null $filterBlock + * @param null $filterBlock deprecated * * @return $this */ diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index 92dd947d09f..ad34c4dc617 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -596,7 +596,7 @@ public function setCategoryIds($ids) */ public function getCategoryIds() { - if (! $this->hasData('category_ids')) { + if (!$this->hasData('category_ids')) { $wasLocked = false; if ($this->isLockedAttribute('category_ids')) { $wasLocked = true; @@ -891,8 +891,8 @@ public function getGroupPrice() /** * Get product tier price by qty * - * @param double $qty - * @return double + * @param float $qty + * @return float|array */ public function getTierPrice($qty = null) { @@ -961,7 +961,7 @@ public function getFinalPrice($qty = null) /** * Returns calculated final price * - * @return float + * @return float|null */ public function getCalculatedFinalPrice() { diff --git a/app/code/core/Mage/Catalog/Model/Product/Api.php b/app/code/core/Mage/Catalog/Model/Product/Api.php index a1c22dfb433..24487d034ec 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Api.php @@ -218,8 +218,8 @@ public function create($type, $set, $sku, $productData, $store = null) * * @param int|string $productId * @param array $productData - * @param string|int $store - * @param null $identifierType + * @param string|int|null $store + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception * @throws Mage_Core_Model_Store_Exception @@ -370,7 +370,7 @@ public function getSpecialPrice($productId, $store = null) * Delete product * * @param int|string $productId - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ @@ -409,7 +409,8 @@ public function getAdditionalAttributes($productType, $attributeSetId) foreach ($productAttributes as $attribute) { /** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */ if ($attribute->isInSet($attributeSetId) && $this->_isAllowedAttribute($attribute) - && !in_array($attribute->getAttributeCode(), $this->_defaultProductAttributeList)) { + && !in_array($attribute->getAttributeCode(), $this->_defaultProductAttributeList) + ) { if ($attribute->isScopeGlobal()) { $scope = 'global'; } elseif ($attribute->isScopeWebsite()) { diff --git a/app/code/core/Mage/Catalog/Model/Product/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Api/V2.php index ebf66b86ff8..15b0e63ef65 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Api/V2.php @@ -160,7 +160,7 @@ public function create($type, $set, $sku, $productData, $store = null) * @param int|string $productId * @param array $productData * @param string|int $store - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception * @throws Mage_Core_Model_Store_Exception @@ -204,7 +204,7 @@ public function update($productId, $productData, $store = null, $identifierType * @param array $productData * @param string|int $store * @param string $identifierType - * @return bool + * @return true|void */ public function multiUpdate($productIds, $productData, $store = null, $identifierType = null) { @@ -225,11 +225,9 @@ public function multiUpdate($productIds, $productData, $store = null, $identifie if (empty($failMessages)) { return true; - } else { - $this->_fault('partially_updated', implode("\n", $failMessages)); } - return false; + $this->_fault('partially_updated', implode("\n", $failMessages)); } /** diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php index 92aa29c6760..7b7eed7ddae 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php @@ -60,7 +60,8 @@ public function items($setId) foreach ($attributes as $attribute) { /** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */ if ((!$attribute->getId() || $attribute->isInSet($setId)) - && $this->_isAllowedAttribute($attribute)) { + && $this->_isAllowedAttribute($attribute) + ) { if (!$attribute->getId() || $attribute->isScopeGlobal()) { $scope = 'global'; } elseif ($attribute->isScopeWebsite()) { @@ -506,7 +507,7 @@ protected function _getAttribute($attribute) ->setEntityTypeId($this->_entityTypeId); if (is_numeric($attribute)) { - $model->load(intval($attribute)); + $model->load((int) $attribute); } else { $model->load($attribute, 'attribute_code'); } diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php index 3683ff08799..bf6384fbcc0 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php @@ -34,7 +34,7 @@ abstract class Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract /** * Website currency codes and rates * - * @var array + * @var array|null */ protected $_rates; diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php index bc3c9af5192..6d75916b3d6 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019-2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php index 021144e59d9..47d32f1f782 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php @@ -55,7 +55,7 @@ public function __construct() * * @param int|string $productId * @param string|int $store - * @param null $identifierType + * @param string|null $identifierType * @return array */ public function items($productId, $store = null, $identifierType = null) @@ -85,7 +85,7 @@ public function items($productId, $store = null, $identifierType = null) * @param int|string $productId * @param string $file * @param string|int $store - * @param null $identifierType + * @param string|null $identifierType * @return array * @throws Mage_Api_Exception */ @@ -108,9 +108,11 @@ public function info($productId, $file, $store = null, $identifierType = null) * @param int|string $productId * @param array $data * @param string|int $store - * @param null $identifierType + * @param string|null $identifierType * @return string * @throws Mage_Api_Exception + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function create($productId, $data, $store = null, $identifierType = null) { @@ -199,9 +201,11 @@ public function create($productId, $data, $store = null, $identifierType = null) * @param string $file * @param array $data * @param string|int $store - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function update($productId, $file, $data, $store = null, $identifierType = null) { @@ -270,7 +274,7 @@ public function update($productId, $file, $data, $store = null, $identifierType * * @param int|string $productId * @param string $file - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ @@ -312,7 +316,8 @@ public function types($setId) foreach ($attributes as $attribute) { /** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */ if ($attribute->isInSet($setId) - && $attribute->getFrontendInput() == 'media_image') { + && $attribute->getFrontendInput() == 'media_image' + ) { if ($attribute->isScopeGlobal()) { $scope = 'global'; } elseif ($attribute->isScopeWebsite()) { diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php index a1238ad30e7..d10eed288fd 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php @@ -37,7 +37,7 @@ public function __construct() /** * @param int $productId - * @param null $identifierType + * @param string|null $identifierType * @return array * @throws Mage_Core_Exception */ @@ -74,7 +74,7 @@ public function info($productId, $identifierType = null) * * @param int|string $productId * @param array $tierPrices - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ @@ -131,7 +131,8 @@ public function prepareTierPrices($product, $tierPrices = null) foreach ($tierPrices as $tierPrice) { if (!is_array($tierPrice) || !isset($tierPrice['qty']) - || !isset($tierPrice['price'])) { + || !isset($tierPrice['price']) + ) { $this->_fault('data_invalid', Mage::helper('catalog')->__('Invalid Tier Prices')); } @@ -145,7 +146,7 @@ public function prepareTierPrices($product, $tierPrices = null) } } - if (intval($tierPrice['website']) > 0 && !in_array($tierPrice['website'], $product->getWebsiteIds())) { + if ((int) $tierPrice['website'] > 0 && !in_array($tierPrice['website'], $product->getWebsiteIds())) { $this->_fault('data_invalid', Mage::helper('catalog')->__('Invalid tier prices. The product is not associated to the requested website.')); } diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php index 8ec1fda6db0..104f8601b49 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php @@ -46,7 +46,8 @@ public function prepareTierPrices($product, $tierPrices = null) foreach ($tierPrices as $tierPrice) { if (!is_object($tierPrice) || !isset($tierPrice->qty) - || !isset($tierPrice->price)) { + || !isset($tierPrice->price) + ) { $this->_fault('data_invalid', Mage::helper('catalog')->__('Invalid Tier Prices')); } @@ -60,7 +61,7 @@ public function prepareTierPrices($product, $tierPrices = null) } } - if (intval($tierPrice->website) > 0 && !in_array($tierPrice->website, $product->getWebsiteIds())) { + if ((int) $tierPrice->website > 0 && !in_array($tierPrice->website, $product->getWebsiteIds())) { $this->_fault('data_invalid', Mage::helper('catalog')->__('Invalid tier prices. The product is not associated to the requested website.')); } diff --git a/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php b/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php index a6b79b8b4fc..e1914da331d 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php +++ b/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php @@ -143,8 +143,8 @@ public function addProductData($product) { if ($product instanceof Mage_Catalog_Model_Product) { $this->setProductId($product->getId()); - } elseif (intval($product)) { - $this->setProductId(intval($product)); + } elseif ((int) $product) { + $this->setProductId((int) $product); } return $this; diff --git a/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php b/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php index 5341d866457..e28aabffa9b 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php +++ b/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php @@ -274,7 +274,8 @@ public function customerGroupSaveAfter(Varien_Event_Observer $observer) $customerGroup = $observer->getEvent()->getObject(); /** @var Mage_Customer_Model_Group $customerGroup */ if ($customerGroup->dataHasChangedFor($customerGroup->getIdFieldName()) - || $customerGroup->dataHasChangedFor('tax_class_id')) { + || $customerGroup->dataHasChangedFor('tax_class_id') + ) { $this->_getIndexer()->updateEventAttributes(); } return $this; diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index 0cd19d14ad8..af8c0c997b7 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -41,6 +41,7 @@ class Mage_Catalog_Model_Product_Image extends Mage_Core_Model_Abstract * @var int */ protected $_height; + protected $_quality = 90; /** @@ -116,7 +117,7 @@ public function setWidth($width) } /** - * @return int + * @return int|null */ public function getWidth() { @@ -134,7 +135,7 @@ public function setHeight($height) } /** - * @return int + * @return int|null */ public function getHeight() { @@ -237,7 +238,7 @@ public function setSize($size) /** * @deprecated - * @param null $file + * @param string|null $file * @return bool */ protected function _checkMemory($file = null) @@ -403,8 +404,8 @@ public function setBaseFile($file) // add misc params as a hash $miscParams = [ - ($this->_keepAspectRatio ? '' : 'non') . 'proportional', - ($this->_keepFrame ? '' : 'no') . 'frame', + ($this->_keepAspectRatio ? '' : 'non') . 'proportional', + ($this->_keepFrame ? '' : 'no') . 'frame', ($this->_keepTransparency ? '' : 'no') . 'transparency', ($this->_constrainOnly ? 'do' : 'not') . 'constrainonly', $this->_backgroundColorStr, @@ -491,7 +492,7 @@ public function resize() */ public function rotate($angle) { - $angle = intval($angle); + $angle = (int) $angle; $this->getImageProcessor()->rotate($angle); return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Product/Link.php b/app/code/core/Mage/Catalog/Model/Product/Link.php index e884d6a1637..bf5d9113bc1 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Link.php +++ b/app/code/core/Mage/Catalog/Model/Product/Link.php @@ -120,7 +120,7 @@ public function getLinkCollection() } /** - * @param null $type + * @param int|null $type * @return array */ public function getAttributes($type = null) diff --git a/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php index fed24d36a3e..dc88c9d8951 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php @@ -35,7 +35,7 @@ class Mage_Catalog_Model_Product_Link_Api_V2 extends Mage_Catalog_Model_Product_ * @param int|string $productId * @param int|string $linkedProductId * @param array $data - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ @@ -93,7 +93,7 @@ public function assign($type, $productId, $linkedProductId, $data = [], $identif * @param int|string $productId * @param int|string $linkedProductId * @param array $data - * @param null $identifierType + * @param string|null $identifierType * @return bool * @throws Mage_Api_Exception */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php index cf38412986f..1284a91b7a0 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020-2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php index 5864931ee58..fd573920656 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php @@ -67,11 +67,11 @@ public function validateUserValue($values) $this->setUserValue( [ 'date' => $value['date'] ?? '', - 'year' => isset($value['year']) ? intval($value['year']) : 0, - 'month' => isset($value['month']) ? intval($value['month']) : 0, - 'day' => isset($value['day']) ? intval($value['day']) : 0, - 'hour' => isset($value['hour']) ? intval($value['hour']) : 0, - 'minute' => isset($value['minute']) ? intval($value['minute']) : 0, + 'year' => isset($value['year']) ? (int) $value['year'] : 0, + 'month' => isset($value['month']) ? (int) $value['month'] : 0, + 'day' => isset($value['day']) ? (int) $value['day'] : 0, + 'hour' => isset($value['hour']) ? (int) $value['hour'] : 0, + 'minute' => isset($value['minute']) ? (int) $value['minute'] : 0, 'day_part' => $value['day_part'] ?? '', 'date_internal' => $value['date_internal'] ?? '', ] @@ -125,7 +125,7 @@ public function prepareForCart() if ($this->_timeExists()) { // 24hr hour conversion - if (! $this->is24hTimeFormat()) { + if (!$this->is24hTimeFormat()) { $pmDayPart = (strtolower($value['day_part']) == 'pm'); if ($value['hour'] == 12) { $value['hour'] = $pmDayPart ? 12 : 0; diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php index 6a68499e4e2..0201b0f7911 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php @@ -193,7 +193,8 @@ protected function _validateUploadedFile() switch ($this->getProcessMode()) { case Mage_Catalog_Model_Product_Type_Abstract::PROCESS_MODE_FULL: Mage::throwException(Mage::helper('catalog')->__('Please specify the product required option %s.', $option->getTitle())); - break; + // exception thrown + // no break default: $this->setUserValue(null); break; @@ -407,7 +408,8 @@ protected function _getValidatorErrors($errors, $fileInfo) } elseif ($errorCode == Zend_Validate_File_Extension::FALSE_EXTENSION) { $result[] = Mage::helper('catalog')->__("The file '%s' for '%s' has an invalid extension", $fileInfo['title'], $option->getTitle()); } elseif ($errorCode == Zend_Validate_File_ImageSize::WIDTH_TOO_BIG - || $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_BIG) { + || $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_BIG + ) { $result[] = Mage::helper('catalog')->__("Maximum allowed image size for '%s' is %sx%s px.", $option->getTitle(), $option->getImageSizeX(), $option->getImageSizeY()); } elseif ($errorCode == Zend_Validate_File_FilesSize::TOO_BIG) { $result[] = Mage::helper('catalog')->__("The file '%s' you uploaded is larger than %s Megabytes allowed by server", $fileInfo['title'], $this->_bytesToMbytes($this->_getUploadMaxFilesize())); @@ -615,6 +617,8 @@ public function prepareOptionValueForRequest($optionValue) * Quote item to order item copy process * * @return $this + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function copyQuoteToOrder() { @@ -796,6 +800,8 @@ protected function _getUploadMaxFilesize() * * @param string $ini_key php.ini Var name * @return int Setting value + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ protected function _getBytesIniValue($ini_key) { @@ -803,13 +809,13 @@ protected function _getBytesIniValue($ini_key) // kilobytes if (stristr($_bytes, 'k')) { - $_bytes = intval($_bytes) * 1024; + $_bytes = (int) $_bytes * 1024; // megabytes } elseif (stristr($_bytes, 'm')) { - $_bytes = intval($_bytes) * 1024 * 1024; + $_bytes = (int) $_bytes * 1024 * 1024; // gigabytes } elseif (stristr($_bytes, 'g')) { - $_bytes = intval($_bytes) * 1024 * 1024 * 1024; + $_bytes = (int) $_bytes * 1024 * 1024 * 1024; } return (int)$_bytes; } diff --git a/app/code/core/Mage/Catalog/Model/Product/Type.php b/app/code/core/Mage/Catalog/Model/Product/Type.php index ec8024fbfe3..dcdafececa7 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type.php @@ -224,7 +224,7 @@ public static function getTypesByPriority() $types = self::getTypes(); foreach ($types as $typeId => $typeInfo) { - $priority = isset($typeInfo['index_priority']) ? abs(intval($typeInfo['index_priority'])) : 0; + $priority = isset($typeInfo['index_priority']) ? abs((int) $typeInfo['index_priority']) : 0; if (!empty($typeInfo['composite'])) { $b[$typeId] = $priority; } else { diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php index 5e1bd32c430..9abb44e0b5f 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php @@ -53,7 +53,7 @@ abstract class Mage_Catalog_Model_Product_Type_Abstract /** * @deprecated * - * @var Mage_Catalog_Model_Resource_Eav_Attribute[] + * @var Mage_Catalog_Model_Resource_Eav_Attribute[]|null */ protected $_editableAttributes; @@ -244,7 +244,8 @@ public function getEditableAttributes($product = null) foreach ($this->getSetAttributes($product) as $attributeCode => $attribute) { if (!is_array($attribute->getApplyTo()) || count($attribute->getApplyTo()) == 0 - || in_array($this->getProduct($product)->getTypeId(), $attribute->getApplyTo())) { + || in_array($this->getProduct($product)->getTypeId(), $attribute->getApplyTo()) + ) { $editableAttributes[$attributeCode] = $attribute; } } @@ -257,8 +258,8 @@ public function getEditableAttributes($product = null) * Retrieve product attribute by identifier * * @param int $attributeId - * @param null $product - * @return Mage_Eav_Model_Entity_Attribute_Abstract + * @param Mage_Catalog_Model_Product $product + * @return Mage_Eav_Model_Entity_Attribute_Abstract|null */ public function getAttributeById($attributeId, $product = null) { @@ -799,9 +800,8 @@ public function hasOptions($product = null) * @param array $options * @param Varien_Object $option * @param mixed $value - * - * @param null $product - * @return object Mage_Catalog_Model_Product_Type_Abstract + * @param Mage_Catalog_Model_Product $product + * @return $this */ public function updateQtyOption($options, Varien_Object $option, $value, $product = null) { @@ -825,8 +825,8 @@ public function hasRequiredOptions($product = null) /** * Retrieve store filter for associated products * - * @param null $product - * @return int|Mage_Core_Model_Store + * @param Mage_Catalog_Model_Product|null $product + * @return Mage_Core_Model_Store|int|null */ public function getStoreFilter($product = null) { @@ -838,7 +838,7 @@ public function getStoreFilter($product = null) * Set store filter for associated products * * @param int|Mage_Core_Model_Store $store - * @param null $product + * @param Mage_Catalog_Model_Product|null $product * @return $this */ public function setStoreFilter($store = null, $product = null) @@ -852,7 +852,7 @@ public function setStoreFilter($store = null, $product = null) * Allow for updates of children quantities * (applicable for complicated product types. As default returns false) * - * @param null $product + * @param Mage_Catalog_Model_Product|null $product * @return bool false */ public function getForceChildItemQtyChanges($product = null) @@ -864,12 +864,12 @@ public function getForceChildItemQtyChanges($product = null) * Prepare Quote Item Quantity * * @param mixed $qty - * @param null $product + * @param Mage_Catalog_Model_Product|null $product * @return float */ public function prepareQuoteItemQty($qty, $product = null) { - return floatval($qty); + return (float) $qty; } /** diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php index 0f76b06e33a..d88203debbe 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php @@ -149,7 +149,8 @@ public function getEditableAttributes($product = null) $this->_editableAttributes = parent::getEditableAttributes($product); foreach ($this->_editableAttributes as $index => $attribute) { if ($this->getUsedProductAttributeIds($product) - && in_array($attribute->getAttributeId(), $this->getUsedProductAttributeIds($product))) { + && in_array($attribute->getAttributeId(), $this->getUsedProductAttributeIds($product)) + ) { unset($this->_editableAttributes[$index]); } } @@ -324,7 +325,8 @@ public function getUsedProducts($requiredAttributeIds = null, $product = null) Varien_Profiler::start('CONFIGURABLE:' . __METHOD__); if (!$this->getProduct($product)->hasData($this->_usedProducts)) { if (is_null($requiredAttributeIds) - and is_null($this->getProduct($product)->getData($this->_configurableAttributes))) { + && is_null($this->getProduct($product)->getData($this->_configurableAttributes)) + ) { // If used products load before attributes, we will load attributes. $this->getConfigurableAttributes($product); // After attributes loading products loaded too. 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 784cd0a4296..048939e9f1f 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php @@ -36,7 +36,7 @@ class Mage_Catalog_Model_Product_Type_Price * Default action to get price of product * * @param Mage_Catalog_Model_Product $product - * @return float + * @return string|float|int */ public function getPrice($product) { @@ -48,7 +48,6 @@ public function getPrice($product) * * @param Mage_Catalog_Model_Product $product * @param float|null $qty - * * @return float */ public function getBasePrice($product, $qty = null) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category.php b/app/code/core/Mage/Catalog/Model/Resource/Category.php index c2b7c5d7cf5..0d032fe9b11 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category.php @@ -542,7 +542,7 @@ public function getProductCount($category) $bind = ['category_id' => (int)$category->getId()]; $counts = $this->getReadConnection()->fetchOne($select, $bind); - return intval($counts); + return (int) $counts; } /** diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php index 82163305cd3..fe23dd38761 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php @@ -52,7 +52,7 @@ class Mage_Catalog_Model_Resource_Category_Collection extends Mage_Catalog_Model /** * Store id, that we should count products on * - * @var int + * @var int|null */ protected $_productStoreId; @@ -111,7 +111,7 @@ protected function _construct() /** * Add Id filter * - * @param array $categoryIds + * @param int|string|array $categoryIds * @return $this */ public function addIdFilter($categoryIds) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php index 6a8dc287f92..bea29e458c6 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php @@ -36,7 +36,7 @@ class Mage_Catalog_Model_Resource_Category_Flat extends Mage_Index_Model_Resourc /** * Store id * - * @var int + * @var int|null */ protected $_storeId = null; @@ -101,7 +101,7 @@ class Mage_Catalog_Model_Resource_Category_Flat extends Mage_Index_Model_Resourc /** * array with root category id per store * - * @var array + * @var array|null */ protected $_storesRootCategories; @@ -179,7 +179,7 @@ public function getMainTable() public function getMainStoreTable($storeId = Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID) { if (is_string($storeId)) { - $storeId = intval($storeId); + $storeId = (int) $storeId; } if ($this->getUseStoreTables() && $storeId) { $suffix = sprintf('store_%d', $storeId); @@ -583,7 +583,8 @@ protected function _createTable($store) foreach ($this->_columns as $fieldName => $fieldProp) { $default = $fieldProp['default']; if ($fieldProp['type'][0] == Varien_Db_Ddl_Table::TYPE_TIMESTAMP - && $default === 'CURRENT_TIMESTAMP') { + && $default === 'CURRENT_TIMESTAMP' + ) { $default = Varien_Db_Ddl_Table::TIMESTAMP_INIT; } $table->addColumn($fieldName, $fieldProp['type'][0], $fieldProp['type'][1], [ @@ -814,7 +815,7 @@ protected function _getAttributes() /** * Return attribute values for given entities and store * - * @param array $entityIds + * @param int|string|array $entityIds * @param int $store_id * @return array */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php index 3aed668c1d9..5073a1e8ea8 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php @@ -66,7 +66,7 @@ class Mage_Catalog_Model_Resource_Category_Indexer_Product extends Mage_Index_Mo /** * Array of info about stores * - * @var array + * @var array|null */ protected $_storesInfo; @@ -523,8 +523,8 @@ protected function _refreshDirectRelations($categoryIds = null, $productIds = nu /** * Rebuild index for anchor categories and associated to child categories products * - * @param null | array $categoryIds - * @param null | array $productIds + * @param null|array $categoryIds + * @param null|array $productIds * @return $this */ protected function _refreshAnchorRelations($categoryIds = null, $productIds = null) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php index a18979e0259..206acd92fb0 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php @@ -36,14 +36,14 @@ class Mage_Catalog_Model_Resource_Category_Tree extends Varien_Data_Tree_Dbp /** * Categories resource collection * - * @var Mage_Catalog_Model_Resource_Category_Collection + * @var Mage_Catalog_Model_Resource_Category_Collection|null */ protected $_collection; /** * Id of 'is_active' category attribute * - * @var int + * @var string|null */ protected $_isActiveAttributeId = null; @@ -259,7 +259,7 @@ protected function _getDisabledIds($collection) /** * Returns attribute id for attribute "is_active" * - * @return int + * @return string */ protected function _getIsActiveAttributeId() { diff --git a/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php index 5f7cf957069..988141ea4ea 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php @@ -32,7 +32,7 @@ class Mage_Catalog_Model_Resource_Collection_Abstract extends Mage_Eav_Model_Ent /** * Current scope (store Id) * - * @var int + * @var int|null */ protected $_storeId; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php index 1cd9c97750d..91eaf6a8ac2 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php @@ -54,7 +54,7 @@ * @method $this setUsedForSortBy(int $value) * @method int getIsConfigurable() * @method $this setIsConfigurable(int $value) - * @method $this setApplyTo(string $value) + * @method $this setApplyTo(string|array $value) * @method int getIsVisibleInAdvancedSearch() * @method $this setIsVisibleInAdvancedSearch(int $value) * @method int getPosition() @@ -90,7 +90,7 @@ class Mage_Catalog_Model_Resource_Eav_Attribute extends Mage_Eav_Model_Entity_At /** * Array with labels * - * @var array + * @var array|null */ protected static $_labels = null; @@ -113,7 +113,8 @@ protected function _beforeSave() $this->_data['is_global'] = self::SCOPE_GLOBAL; } if (($this->_data['is_global'] != $this->_origData['is_global']) - && $this->_getResource()->isUsedBySuperProducts($this)) { + && $this->_getResource()->isUsedBySuperProducts($this) + ) { Mage::throwException(Mage::helper('catalog')->__('Scope must not be changed, because the attribute is used in configurable products.')); } } 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 00ce1c57970..1aff80b2923 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 @@ -255,7 +255,7 @@ public function getCount($filter, $range) /** * Check and set correct variable values to prevent SQL-injections */ - $range = floatval($range); + $range = (float) $range; if ($range == 0) { $range = 1; } @@ -299,8 +299,8 @@ public function applyFilterToCollection($filter, $range, $index) * @param Mage_Catalog_Model_Layer_Filter_Price $filter * @param int $limit * @param null|int $offset - * @param null|int $lowerPrice - * @param null|int $upperPrice + * @param null|float $lowerPrice + * @param null|float $upperPrice * @return array */ public function loadPrices($filter, $limit, $offset = null, $lowerPrice = null, $upperPrice = null) @@ -327,7 +327,7 @@ public function loadPrices($filter, $limit, $offset = null, $lowerPrice = null, * @param Mage_Catalog_Model_Layer_Filter_Price $filter * @param float $price * @param int $index - * @param null $lowerPrice + * @param float|null $lowerPrice * @return array|false */ public function loadPreviousPrices($filter, $price, $index, $lowerPrice = null) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php index 7e724a5d736..871963ee655 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php @@ -93,7 +93,7 @@ class Mage_Catalog_Model_Resource_Product_Collection extends Mage_Catalog_Model_ /** * Cache for all ids * - * @var array + * @var array|null */ protected $_allIdsCache = null; @@ -124,7 +124,7 @@ class Mage_Catalog_Model_Resource_Product_Collection extends Mage_Catalog_Model_ /** * Category product count select * - * @var Zend_Db_Select + * @var Zend_Db_Select|null */ protected $_productCountSelect = null; @@ -171,28 +171,28 @@ class Mage_Catalog_Model_Resource_Product_Collection extends Mage_Catalog_Model_ /** * Max prise (statistics data) * - * @var float + * @var float|null */ protected $_maxPrice; /** * Min prise (statistics data) * - * @var float + * @var float|null */ protected $_minPrice; /** * Prise standard deviation (statistics data) * - * @var float + * @var float|null */ protected $_priceStandardDeviation; /** * Prises count (statistics data) * - * @var int + * @var int|null */ protected $_pricesCount = null; @@ -225,7 +225,7 @@ public function __construct($resource = null, array $args = []) /** * Get cloned Select after dispatching 'catalog_prepare_price_select' event * - * @return Varien_Db_Select + * @return Varien_Db_Select|null */ public function getCatalogPreparedSelect() { @@ -878,7 +878,7 @@ public function getSelectCountSql() /** * Get SQL for get record count * - * @param null $select + * @param Varien_Db_Select|null $select * @param bool $resetLeftJoins * @return Varien_Db_Select */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php index 07dbc34d67b..7f6986918d7 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -45,7 +45,7 @@ class Mage_Catalog_Model_Resource_Product_Compare_Item_Collection extends Mage_C /** * Comparable attributes cache * - * @var array + * @var array|null */ protected $_comparableAttributes; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php index 45348422a32..7784e548bed 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php @@ -730,7 +730,8 @@ public function prepareFlatTable($storeId) if (isset($indexesNeed[$key])) { $indexNeed = $indexesNeed[$key]; if (($indexNeed['INDEX_TYPE'] != $indexNow['INDEX_TYPE']) - || ($indexNeed['COLUMNS_LIST'] != $indexNow['COLUMNS_LIST'])) { + || ($indexNeed['COLUMNS_LIST'] != $indexNow['COLUMNS_LIST']) + ) { $dropIndexes[$key] = $indexNow; $addIndexes[$key] = $indexNeed; } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php index a24a813ba88..255d7ef0d3e 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php @@ -31,7 +31,7 @@ class Mage_Catalog_Model_Resource_Product_Indexer_Eav extends Mage_Catalog_Model /** * EAV Indexers by type * - * @var array + * @var array|null */ protected $_types; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php index 4e009d28128..99c6c4bd0a0 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php @@ -38,7 +38,7 @@ class Mage_Catalog_Model_Resource_Product_Indexer_Price extends Mage_Index_Model /** * Product Type Price indexer resource models * - * @var array + * @var array|null */ protected $_indexers; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php index 2ed4deefa71..68f734420eb 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php @@ -32,7 +32,7 @@ class Mage_Catalog_Model_Resource_Product_Indexer_Price_Default extends Mage_Cat /** * Product type code * - * @var string + * @var string|null */ protected $_typeId; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php index 6bab892f029..102b5fcacab 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php @@ -118,7 +118,8 @@ protected function _saveValuePrices(Mage_Core_Model_Abstract $object) $scope = (int) Mage::app()->getStore()->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE); if ($object->getStoreId() != '0' && $scope == Mage_Core_Model_Store::PRICE_SCOPE_WEBSITE - && !$object->getData('scope', 'price')) { + && !$object->getData('scope', 'price') + ) { $baseCurrency = Mage::app()->getBaseCurrencyCode(); $storeIds = Mage::app()->getStore($object->getStoreId())->getWebsite()->getStoreIds(); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php index 65281e7a466..337eb43f584 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php @@ -95,7 +95,8 @@ protected function _saveValuePrices(Mage_Core_Model_Abstract $object) $scope = (int)Mage::app()->getStore()->getConfig(Mage_Core_Model_Store::XML_PATH_PRICE_SCOPE); if ($object->getStoreId() != '0' && $scope == Mage_Core_Model_Store::PRICE_SCOPE_WEBSITE - && !$object->getData('scope', 'price')) { + && !$object->getData('scope', 'price') + ) { $baseCurrency = Mage::app()->getBaseCurrencyCode(); $storeIds = Mage::app()->getStore($object->getStoreId()) diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php index 311b45e394a..9bb582cb18f 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php @@ -54,7 +54,8 @@ protected function _getProductResource() public function removeProducts($websiteIds, $productIds) { if (!is_array($websiteIds) || !is_array($productIds) - || count($websiteIds) == 0 || count($productIds) == 0) { + || count($websiteIds) == 0 || count($productIds) == 0 + ) { return $this; } @@ -88,7 +89,8 @@ public function removeProducts($websiteIds, $productIds) public function addProducts($websiteIds, $productIds) { if (!is_array($websiteIds) || !is_array($productIds) - || count($websiteIds) == 0 || count($productIds) == 0) { + || count($websiteIds) == 0 || count($productIds) == 0 + ) { return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Url.php b/app/code/core/Mage/Catalog/Model/Resource/Url.php index d19093e51cd..638c18f0479 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Url.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Url.php @@ -750,7 +750,8 @@ protected function _getCategories($categoryIds, $storeId = null, $path = null) } // Second - check non-root category - that it's really a descendant, not a simple string match if ((strlen($row['path']) > $rootCategoryPathLength) - && ($row['path'][$rootCategoryPathLength] !== '/')) { + && ($row['path'][$rootCategoryPathLength] !== '/') + ) { continue; } } diff --git a/app/code/core/Mage/Catalog/Model/Url.php b/app/code/core/Mage/Catalog/Model/Url.php index e4c2347a55b..b244118bcca 100644 --- a/app/code/core/Mage/Catalog/Model/Url.php +++ b/app/code/core/Mage/Catalog/Model/Url.php @@ -46,7 +46,7 @@ class Mage_Catalog_Model_Url /** * Resource model * - * @var Mage_Catalog_Model_Resource_Url + * @var Mage_Catalog_Model_Resource_Url|null */ protected $_resourceModel; @@ -74,7 +74,7 @@ class Mage_Catalog_Model_Url /** * Current url rewrite rule * - * @var Varien_Object + * @var Varien_Object|null */ protected $_rewrite; diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php index ab624c489b1..b16e7745e06 100644 --- a/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; // Create Root Catalog Node diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php index 4eb8dccbd25..3955b9fcf14 100644 --- a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; /** @var Mage_Catalog_Model_Resource_Eav_Attribute $eavResource */ diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php index 806b86791b7..e3adcb21362 100644 --- a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php @@ -15,11 +15,11 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; /** @var Mage_Catalog_Model_Resource_Eav_Attribute $attribute */ diff --git a/app/code/core/Mage/Catalog/etc/api.xml b/app/code/core/Mage/Catalog/etc/api.xml index 5a42303cf58..8e968fb1916 100644 --- a/app/code/core/Mage/Catalog/etc/api.xml +++ b/app/code/core/Mage/Catalog/etc/api.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/api2.xml b/app/code/core/Mage/Catalog/etc/api2.xml index c58ac7dd1c1..2085389e533 100644 --- a/app/code/core/Mage/Catalog/etc/api2.xml +++ b/app/code/core/Mage/Catalog/etc/api2.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/config.xml b/app/code/core/Mage/Catalog/etc/config.xml index 67753be2f23..ec84848da43 100644 --- a/app/code/core/Mage/Catalog/etc/config.xml +++ b/app/code/core/Mage/Catalog/etc/config.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2017 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2017-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/convert.xml b/app/code/core/Mage/Catalog/etc/convert.xml index 88805803629..f00045ae08c 100644 --- a/app/code/core/Mage/Catalog/etc/convert.xml +++ b/app/code/core/Mage/Catalog/etc/convert.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/widget.xml b/app/code/core/Mage/Catalog/etc/widget.xml index 757c775b342..e31cd7d7013 100644 --- a/app/code/core/Mage/Catalog/etc/widget.xml +++ b/app/code/core/Mage/Catalog/etc/widget.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Catalog * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.57-0.7.58.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.57-0.7.58.php index 5c33eb61f8a..8edbc4da3c8 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.57-0.7.58.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.57-0.7.58.php @@ -19,5 +19,5 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.63-0.7.64.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.63-0.7.64.php index e424dae21ee..f2ccf68d01c 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.63-0.7.64.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-0.7.63-0.7.64.php @@ -19,6 +19,6 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-1.4.0.0.42-1.4.0.0.43.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-1.4.0.0.42-1.4.0.0.43.php index e73222cf166..3a10e4deb47 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-1.4.0.0.42-1.4.0.0.43.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-data-upgrade-1.4.0.0.42-1.4.0.0.43.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $productEntityTypeId = $installer->getEntityTypeId('catalog_product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-0.7.0.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-0.7.0.php index 6e3de77c0ad..e1d772d524a 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-0.7.0.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-0.7.0.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php index e9aa4b7df55..467fafdd2c6 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.6.40-0.7.0.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.6.40-0.7.0.php index 611f235a67b..990647557e2 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.6.40-0.7.0.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.6.40-0.7.0.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->deleteConfigData('catalog/category/root_id', 'stores'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.11-0.7.12.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.11-0.7.12.php index 76f1afd27eb..10ab0174309 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.11-0.7.12.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.11-0.7.12.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->installEntities(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.13-0.7.14.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.13-0.7.14.php index 5a3c98c48b3..1b23be7772b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.13-0.7.14.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.13-0.7.14.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $mediaAttributeId = (int) $installer->getAttributeId('catalog_product', 'media_gallery'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.15-0.7.16.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.15-0.7.16.php index be674d12f4b..a7ccb2e07c6 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.15-0.7.16.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.15-0.7.16.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.17-0.7.18.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.17-0.7.18.php index ef9502f37f2..31674ad61b8 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.17-0.7.18.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.17-0.7.18.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.18-0.7.19.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.18-0.7.19.php index ffc42fa0784..20848b72623 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.18-0.7.19.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.18-0.7.19.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $entityTypeId = (int) $installer->getEntityTypeId('catalog_product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.19-0.7.20.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.19-0.7.20.php index 76f1afd27eb..10ab0174309 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.19-0.7.20.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.19-0.7.20.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->installEntities(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.20-0.7.21.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.20-0.7.21.php index d0c96751655..2a2cc9cb591 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.20-0.7.21.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.20-0.7.21.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $attributes = [ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.21-0.7.22.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.21-0.7.22.php index 12b67c80337..3f99a5b12d9 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.21-0.7.22.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.21-0.7.22.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run(" diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.23-0.7.24.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.23-0.7.24.php index 7585aefac86..be2fc52cdfd 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.23-0.7.24.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.23-0.7.24.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run("UPDATE `{$this->getTable('catalog_category_entity')}` SET `position` = `entity_id` WHERE `position` = 0;"); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.24-0.7.25.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.24-0.7.25.php index 6c1e648cbc7..f6d15406285 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.24-0.7.25.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.24-0.7.25.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->installEntities(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.25-0.7.26.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.25-0.7.26.php index f3343b74e80..56da0c6c869 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.25-0.7.26.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.25-0.7.26.php @@ -19,6 +19,6 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->installEntities(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.26-0.7.27.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.26-0.7.27.php index aa7eff9bd16..76b17a6b56b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.26-0.7.27.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.26-0.7.27.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.27-0.7.28.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.27-0.7.28.php index 962f1d6407a..e70fd3355c5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.27-0.7.28.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.27-0.7.28.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run("UPDATE `{$installer->getTable('eav_attribute')}` SET `position` = 1 WHERE `position` = 0 AND `attribute_code` != 'price';"); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.28-0.7.29.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.28-0.7.29.php index b71c9a849f0..03f40569032 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.28-0.7.29.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.28-0.7.29.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.29-0.7.30.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.29-0.7.30.php index 1f37316a312..1075ebaece1 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.29-0.7.30.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.29-0.7.30.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.31-0.7.32.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.31-0.7.32.php index 2d839988232..b13ca24d550 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.31-0.7.32.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.31-0.7.32.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run(" diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.32-0.7.33.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.32-0.7.33.php index 10b5830679f..067ce566a77 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.32-0.7.33.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.32-0.7.33.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $attributeId = $installer->getAttributeId('catalog_category', 'is_active'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.33-0.7.34.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.33-0.7.34.php index e52a8acc7d7..85d710f6137 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.33-0.7.34.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.33-0.7.34.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.34-0.7.35.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.34-0.7.35.php index 8c8861960ae..003b6c198ff 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.34-0.7.35.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.34-0.7.35.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.35-0.7.36.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.35-0.7.36.php index a9110ceee5d..251a274b771 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.35-0.7.36.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.35-0.7.36.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php index 348cf8a21a2..f75669c7675 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.37-0.7.38.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.37-0.7.38.php index 6194cfc2251..233befdd733 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.37-0.7.38.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.37-0.7.38.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.38-0.7.39.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.38-0.7.39.php index 464eed50400..aa5387c061b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.38-0.7.39.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.38-0.7.39.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.39-0.7.40.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.39-0.7.40.php index 589ac8bae30..337959f60c5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.39-0.7.40.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.39-0.7.40.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.4-0.7.5.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.4-0.7.5.php index 1a923333967..eb8328a1560 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.4-0.7.5.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.4-0.7.5.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.40-0.7.41.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.40-0.7.41.php index 92e033d8846..3a47576efae 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.40-0.7.41.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.40-0.7.41.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.41-0.7.42.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.41-0.7.42.php index 4fa6bb4261b..ea5d0bf183c 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.41-0.7.42.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.41-0.7.42.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.43-0.7.44.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.43-0.7.44.php index f20f0a60b39..e209ea02933 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.43-0.7.44.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.43-0.7.44.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.44-0.7.45.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.44-0.7.45.php index ae7a688a77b..58933b75295 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.44-0.7.45.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.44-0.7.45.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.45-0.7.46.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.45-0.7.46.php index b668d81744b..16d4e7f7453 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.45-0.7.46.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.45-0.7.46.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.46-0.7.47.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.46-0.7.47.php index 4249fb720db..8a7341ac8d9 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.46-0.7.47.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.46-0.7.47.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.47-0.7.48.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.47-0.7.48.php index 6aff5683fa0..838e197e3b0 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.47-0.7.48.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.47-0.7.48.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.48-0.7.49.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.48-0.7.49.php index ae5ad0fc7b4..d7cd9f04fd5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.48-0.7.49.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.48-0.7.49.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.49-0.7.50.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.49-0.7.50.php index 89a589f0824..f0a2a975486 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.49-0.7.50.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.49-0.7.50.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $this */ +/** @var Mage_Catalog_Model_Resource_Setup $this */ $this->startSetup(); // get options_container attribute and update its value to 'container1' for configurable products diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.5-0.7.6.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.5-0.7.6.php index 98cdfbaee9a..33f8ac023e6 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.5-0.7.6.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.5-0.7.6.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.50-0.7.51.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.50-0.7.51.php index 92e713c3347..390325c373b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.50-0.7.51.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.50-0.7.51.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $this */ +/** @var Mage_Catalog_Model_Resource_Setup $this */ $this->startSetup(); $this->getConnection()->addColumn($this->getTable('catalog_category_entity'), 'children_count', 'INT NOT NULL'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.51-0.7.52.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.51-0.7.52.php index a160e41b891..78c4766e0cf 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.51-0.7.52.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.51-0.7.52.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $this */ +/** @var Mage_Catalog_Model_Resource_Setup $this */ $this->startSetup(); $table = $this->getTable('catalog/category'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php index 27c0addb3c6..1dc79dcc17f 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.52-0.7.53.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.53-0.7.54.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.53-0.7.54.php index 8fb2301df0a..1d68b68e49c 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.53-0.7.54.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.53-0.7.54.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.54-0.7.55.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.54-0.7.55.php index 67c892cd147..d3db92b1e0f 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.54-0.7.55.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.54-0.7.55.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.55-0.7.56.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.55-0.7.56.php index 4a95fb97358..299925ba5f8 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.55-0.7.56.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.55-0.7.56.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.56-0.7.57.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.56-0.7.57.php index 83fd5521b0b..d18e4139f3e 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.56-0.7.57.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.56-0.7.57.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.57-0.7.58.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.57-0.7.58.php index f2398d1796f..0885fd9e484 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.57-0.7.58.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.57-0.7.58.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.58-0.7.59.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.58-0.7.59.php index 94b0b0f8024..d463cf0afde 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.58-0.7.59.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.58-0.7.59.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.59-0.7.60.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.59-0.7.60.php index 4a539ecf098..b44088c24ff 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.59-0.7.60.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.59-0.7.60.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.6-0.7.7.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.6-0.7.7.php index 412d40dda10..510d5a93392 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.6-0.7.7.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.6-0.7.7.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->installEntities(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.60-0.7.61.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.60-0.7.61.php index defc1ff59ec..e12b607db35 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.60-0.7.61.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.60-0.7.61.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $tableCatalogProduct = $this->getTable('catalog/product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.62-0.7.63.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.62-0.7.63.php index 6fc485b8f42..0265ceb18b7 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.62-0.7.63.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.62-0.7.63.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->updateAttribute('catalog_product', 'required_options', 'used_in_product_listing', '1'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.63-0.7.64.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.63-0.7.64.php index 9650af850d3..47f43f1aa84 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.63-0.7.64.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.63-0.7.64.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.64-0.7.65.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.64-0.7.65.php index bbe99aaf5b3..ab7a582a9dc 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.64-0.7.65.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.64-0.7.65.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.65-0.7.66.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.65-0.7.66.php index de046ddd0c3..fb53e11c396 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.65-0.7.66.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.65-0.7.66.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; Mage::getModel('catalog/product_flat_flag') diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.66-0.7.67.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.66-0.7.67.php index aa52845d6fb..e488336b0ec 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.66-0.7.67.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.66-0.7.67.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->addAttribute('catalog_product', 'created_at', [ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.67-0.7.68.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.67-0.7.68.php index fdbfb27a22d..cbdf650859f 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.67-0.7.68.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.67-0.7.68.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.68-0.7.69.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.68-0.7.69.php index 320e6a4cc27..acded2ad6e0 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.68-0.7.69.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.68-0.7.69.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.69-0.7.70.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.69-0.7.70.php index 26a582ddfb0..e48fd0e335c 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.69-0.7.70.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.69-0.7.70.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.7-0.7.8.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.7-0.7.8.php index 1133a22cd41..5e6022ab7d7 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.7-0.7.8.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.7-0.7.8.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.71-0.7.72.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.71-0.7.72.php index 2a97ea5774f..0f599ae402a 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.71-0.7.72.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.71-0.7.72.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.72-0.7.73.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.72-0.7.73.php index b3a6d10a472..08d978b8c74 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.72-0.7.73.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.72-0.7.73.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.73-1.4.0.0.0.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.73-1.4.0.0.0.php index 4b33cd57d32..0d368a2e30b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.73-1.4.0.0.0.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.73-1.4.0.0.0.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.8-0.7.9.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.8-0.7.9.php index 6f16612095b..ad3c74cad4b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.8-0.7.9.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.8-0.7.9.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php index 29b04ee631b..f738600c303 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php index 9abeb2026ff..177ac3d1e01 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php index 68f94f89f4b..95304b8558e 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->updateAttribute( diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.11-1.4.0.0.12.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.11-1.4.0.0.12.php index ec594264322..d2fa561b11a 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.11-1.4.0.0.12.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.11-1.4.0.0.12.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->updateAttribute('catalog_category', 'url_path', 'is_unique', 0); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php index 64eb0359218..30da8791eef 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php index 873b58ddf4d..9f5814017e5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php index 703ac30d245..286807f6b05 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.16-1.4.0.0.17.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.16-1.4.0.0.17.php index 2fe19ecb17a..b3280e26966 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.16-1.4.0.0.17.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.16-1.4.0.0.17.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->getConnection()->dropColumn($installer->getTable('catalog/compare_item'), 'is_dirty'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.17-1.4.0.0.18.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.17-1.4.0.0.18.php index a94ccb061f1..d165e1e3107 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.17-1.4.0.0.18.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.17-1.4.0.0.18.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php index 0d99d39f933..af6984fee2c 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $table = $this->getTable('catalog/category_product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php index e32b94c1b6d..33b0c22f54e 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run(" diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php index dc902dc12cc..f6b20d8edaf 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php index f753f38f921..91f33c3e0da 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $table = $this->getTable('catalog/category_product_index'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.21-1.4.0.0.22.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.21-1.4.0.0.22.php index 99e0e86828c..1cb24ae50d1 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.21-1.4.0.0.22.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.21-1.4.0.0.22.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.22-1.4.0.0.23.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.22-1.4.0.0.23.php index bb9078a6072..23fa98a4b8c 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.22-1.4.0.0.23.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.22-1.4.0.0.23.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php index aa979a5807f..f56c64d6b19 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.24-1.4.0.0.25.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.24-1.4.0.0.25.php index 254376fce05..a993a67b0d5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.24-1.4.0.0.25.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.24-1.4.0.0.25.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->getConnection()->modifyColumn( diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.25-1.4.0.0.26.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.25-1.4.0.0.26.php index c0cb9bf9daf..3809e543642 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.25-1.4.0.0.26.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.25-1.4.0.0.26.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->run(" diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.26-1.4.0.0.27.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.26-1.4.0.0.27.php index 0a4caf0d91d..7307a8487f2 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.26-1.4.0.0.27.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.26-1.4.0.0.27.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.27-1.4.0.0.28.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.27-1.4.0.0.28.php index 77b1c57e608..a5135dc4789 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.27-1.4.0.0.28.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.27-1.4.0.0.28.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; // is product used for recurring payments diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php index ed32c46b2b6..6a8178d1ded 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.30-1.4.0.0.31.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.30-1.4.0.0.31.php index 5fd99a5780e..38bee9a55de 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.30-1.4.0.0.31.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.30-1.4.0.0.31.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->addAttribute('catalog_category', 'filter_price_range', [ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.31-1.4.0.0.32.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.31-1.4.0.0.32.php index 42234cfc7a1..5e5f989a633 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.31-1.4.0.0.32.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.31-1.4.0.0.32.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $connection = $installer->getConnection(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.32-1.4.0.0.33.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.32-1.4.0.0.33.php index 7beca82f8d5..0c009f609b5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.32-1.4.0.0.33.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.32-1.4.0.0.33.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.33-1.4.0.0.34.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.33-1.4.0.0.34.php index 1e03ec89fc4..be7531d9dab 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.33-1.4.0.0.34.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.33-1.4.0.0.34.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->removeAttribute('catalog_category', 'custom_design_apply'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.34-1.4.0.0.35.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.34-1.4.0.0.35.php index d4b3827add8..bf04af31981 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.34-1.4.0.0.35.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.34-1.4.0.0.35.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $entityTypeId = $installer->getEntityTypeId('catalog_product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.35-1.4.0.0.36.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.35-1.4.0.0.36.php index ad2cf93be5e..edd43a0dc24 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.35-1.4.0.0.36.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.35-1.4.0.0.36.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.36-1.4.0.0.37.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.36-1.4.0.0.37.php index 6391a15b338..20344bc1add 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.36-1.4.0.0.37.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.36-1.4.0.0.37.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.37-1.4.0.0.38.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.37-1.4.0.0.38.php index 91cbe7e9ccc..db2d745a713 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.37-1.4.0.0.38.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.37-1.4.0.0.38.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $productEntityTypeId = $installer->getEntityTypeId('catalog_category'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.38-1.4.0.0.39.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.38-1.4.0.0.39.php index 709beeca10d..1845e98ca4b 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.38-1.4.0.0.39.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.38-1.4.0.0.39.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $entityTypeId = $installer->getEntityTypeId('catalog_product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.39-1.4.0.0.40.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.39-1.4.0.0.40.php index 1b960515c2d..73283ebf6ca 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.39-1.4.0.0.40.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.39-1.4.0.0.40.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $entityTypeId = $installer->getEntityTypeId('catalog_product'); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php index 588cb863c8e..43b17184210 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.40-1.4.0.0.41.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.40-1.4.0.0.41.php index 6e063c7f70f..6d46e4c9487 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.40-1.4.0.0.41.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.40-1.4.0.0.41.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php index c78c6f6a4c7..7dde44d4d3e 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php index bad9d50571c..9fc85a4587a 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); $installer->updateAttribute($installer->getEntityTypeId('catalog_category'), 'is_active', 'is_required', true); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php index d0115542c40..c710c29da60 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->updateAttribute('catalog_category', 'url_key', 'is_global', Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php index 509e6fb75bc..cd2ef020db2 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $installer->startSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php index 82f16c47468..1528be84228 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php @@ -19,7 +19,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Setup $installer */ +/** @var Mage_Catalog_Model_Resource_Setup $installer */ $installer = $this; $table = $this->getTable('catalog/category_product_index'); diff --git a/app/code/core/Mage/CatalogIndex/Model/Aggregation.php b/app/code/core/Mage/CatalogIndex/Model/Aggregation.php index c4ea8e4bac5..d87ffc95bda 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Aggregation.php +++ b/app/code/core/Mage/CatalogIndex/Model/Aggregation.php @@ -144,7 +144,6 @@ public function clearProductData($productIds) protected function _processKey($key) { return $key; - return md5($key); } /** diff --git a/app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php b/app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php index e28c89c045a..d218bea130c 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php +++ b/app/code/core/Mage/CatalogIndex/Model/Data/Abstract.php @@ -36,7 +36,7 @@ class Mage_CatalogIndex_Model_Data_Abstract extends Mage_Core_Model_Abstract /** * Product Type instance * - * @var Mage_Catalog_Model_Product_Type_Abstract + * @var Mage_Catalog_Model_Product_Type_Abstract|Mage_Core_Model_Abstract|null */ protected $_typeInstance; diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer.php b/app/code/core/Mage/CatalogIndex/Model/Indexer.php index ed4feda6261..55e3f748e41 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer.php @@ -79,7 +79,7 @@ class Mage_CatalogIndex_Model_Indexer extends Mage_Core_Model_Abstract /** * Tproduct types sorted by index priority * - * @var array + * @var array|null */ protected $_productTypePriority = null; @@ -604,7 +604,8 @@ public function buildEntityPriceFilter($attributes, $values, &$filteredAttribute if ($indexer->isAttributeIndexable($attribute)) { if ($values[$code]) { if (isset($values[$code]['from']) && isset($values[$code]['to']) - && (strlen($values[$code]['from']) == 0 && strlen($values[$code]['to']) == 0)) { + && (strlen($values[$code]['from']) == 0 && strlen($values[$code]['to']) == 0) + ) { continue; } $table = $indexer->getResource()->getMainTable(); @@ -699,7 +700,8 @@ public function buildEntityFilter($attributes, $values, &$filteredAttributes, $p if ($indexer->isAttributeIndexable($attribute)) { if ($values[$code]) { if (isset($values[$code]['from']) && isset($values[$code]['to']) - && (!$values[$code]['from'] && !$values[$code]['to'])) { + && (!$values[$code]['from'] && !$values[$code]['to']) + ) { continue; } diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php b/app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php index bae3ae2f84b..2133c7fde99 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer/Abstract.php @@ -130,7 +130,8 @@ protected function _isObjectIndexable(Mage_Catalog_Model_Product $object) } if ($object->getVisibility() != Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG && - $object->getVisibility() != Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) { + $object->getVisibility() != Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH + ) { return false; } diff --git a/app/code/core/Mage/CatalogIndex/Model/Resource/Setup.php b/app/code/core/Mage/CatalogIndex/Model/Resource/Setup.php index 0520569c2dc..14af6521382 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Resource/Setup.php +++ b/app/code/core/Mage/CatalogIndex/Model/Resource/Setup.php @@ -27,7 +27,7 @@ class Mage_CatalogIndex_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup { /** - * @var array + * @var array|null */ protected $_storeToWebsite = null; diff --git a/app/code/core/Mage/CatalogIndex/Model/Retreiver.php b/app/code/core/Mage/CatalogIndex/Model/Retreiver.php index 9405243deb1..f974589c35d 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Retreiver.php +++ b/app/code/core/Mage/CatalogIndex/Model/Retreiver.php @@ -56,7 +56,7 @@ class Mage_CatalogIndex_Model_Retreiver extends Mage_Core_Model_Abstract /** * Customer group cache * - * @var Mage_Customer_Model_Resource_Group_Collection + * @var Mage_Customer_Model_Resource_Group_Collection|null */ protected $_customerGroups; diff --git a/app/code/core/Mage/CatalogIndex/etc/config.xml b/app/code/core/Mage/CatalogIndex/etc/config.xml index b612b10ed37..f89a6f5e127 100644 --- a/app/code/core/Mage/CatalogIndex/etc/config.xml +++ b/app/code/core/Mage/CatalogIndex/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_CatalogIndex * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php index 82096438371..6d78dec6bb6 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php +++ b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php @@ -31,7 +31,7 @@ class Mage_CatalogInventory_Block_Adminhtml_Form_Field_Customergroup extends Mag /** * Customer groups cache * - * @var array + * @var array|null */ private $_customerGroups; diff --git a/app/code/core/Mage/CatalogInventory/Model/Observer.php b/app/code/core/Mage/CatalogInventory/Model/Observer.php index 779492f94a7..2fc31fa339e 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Observer.php +++ b/app/code/core/Mage/CatalogInventory/Model/Observer.php @@ -70,7 +70,7 @@ public function addInventoryData($observer) { $product = $observer->getEvent()->getProduct(); if ($product instanceof Mage_Catalog_Model_Product) { - $productId = intval($product->getId()); + $productId = (int) $product->getId(); if (!isset($this->_stockItemsArray[$productId])) { $this->_stockItemsArray[$productId] = Mage::getModel('cataloginventory/stock_item'); } @@ -91,7 +91,8 @@ public function removeInventoryData($observer) $product = $observer->getEvent()->getProduct(); if (($product instanceof Mage_Catalog_Model_Product) && $product->getId() - && isset($this->_stockItemsArray[$product->getId()])) { + && isset($this->_stockItemsArray[$product->getId()]) + ) { unset($this->_stockItemsArray[$product->getId()]); } return $this; @@ -209,23 +210,28 @@ protected function _prepareItemForSave($item, $product) ->setProductId($product->getId()) ->setStockId($item->getStockId()); if (!is_null($product->getData('stock_data/min_qty')) - && is_null($product->getData('stock_data/use_config_min_qty'))) { + && is_null($product->getData('stock_data/use_config_min_qty')) + ) { $item->setData('use_config_min_qty', false); } if (!is_null($product->getData('stock_data/min_sale_qty')) - && is_null($product->getData('stock_data/use_config_min_sale_qty'))) { + && is_null($product->getData('stock_data/use_config_min_sale_qty')) + ) { $item->setData('use_config_min_sale_qty', false); } if (!is_null($product->getData('stock_data/max_sale_qty')) - && is_null($product->getData('stock_data/use_config_max_sale_qty'))) { + && is_null($product->getData('stock_data/use_config_max_sale_qty')) + ) { $item->setData('use_config_max_sale_qty', false); } if (!is_null($product->getData('stock_data/backorders')) - && is_null($product->getData('stock_data/use_config_backorders'))) { + && is_null($product->getData('stock_data/use_config_backorders')) + ) { $item->setData('use_config_backorders', false); } if (!is_null($product->getData('stock_data/notify_stock_qty')) - && is_null($product->getData('stock_data/use_config_notify_stock_qty'))) { + && is_null($product->getData('stock_data/use_config_notify_stock_qty')) + ) { $item->setData('use_config_notify_stock_qty', false); } $originalQty = $product->getData('stock_data/original_inventory_qty'); @@ -233,11 +239,13 @@ protected function _prepareItemForSave($item, $product) $item->setQtyCorrection($item->getQty() - $originalQty); } if (!is_null($product->getData('stock_data/enable_qty_increments')) - && is_null($product->getData('stock_data/use_config_enable_qty_inc'))) { + && is_null($product->getData('stock_data/use_config_enable_qty_inc')) + ) { $item->setData('use_config_enable_qty_inc', false); } if (!is_null($product->getData('stock_data/qty_increments')) - && is_null($product->getData('stock_data/use_config_qty_increments'))) { + && is_null($product->getData('stock_data/use_config_qty_increments')) + ) { $item->setData('use_config_qty_increments', false); } return $this; @@ -302,10 +310,11 @@ protected function _removeErrorsFromQuoteAndItem($item, $code) */ public function checkQuoteItemQty($observer) { - $quoteItem = $observer->getEvent()->getItem(); /** @var Mage_Sales_Model_Quote_Item $quoteItem */ + $quoteItem = $observer->getEvent()->getItem(); if (!$quoteItem || !$quoteItem->getProductId() || !$quoteItem->getQuote() - || $quoteItem->getQuote()->getIsSuperMode()) { + || $quoteItem->getQuote()->getIsSuperMode() + ) { return $this; } @@ -423,7 +432,7 @@ public function checkQuoteItemQty($observer) /** * if option's qty was updates we also need to update quote item qty */ - $quoteItem->setData('qty', intval($qty)); + $quoteItem->setData('qty', (int) $qty); } if (!is_null($result->getMessage())) { $option->setMessage($result->getMessage()); @@ -587,7 +596,8 @@ protected function _getQuoteItemQtyForCheck($productId, $quoteItemId, $itemQty) { $qty = $itemQty; if (isset($this->_checkedQuoteItems[$productId]['qty']) && - !in_array($quoteItemId, $this->_checkedQuoteItems[$productId]['items'])) { + !in_array($quoteItemId, $this->_checkedQuoteItems[$productId]['items']) + ) { $qty += $this->_checkedQuoteItems[$productId]['qty']; } diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php index dc010f3e6ed..5443d7d237f 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php @@ -32,7 +32,7 @@ class Mage_CatalogInventory_Model_Resource_Indexer_Stock extends Mage_Catalog_Mo * Stock Indexer models per product type * Sorted by priority * - * @var array + * @var array|null */ protected $_indexers; diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php index 05360ca0fca..0fc91c289db 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php @@ -31,7 +31,7 @@ class Mage_CatalogInventory_Model_Resource_Indexer_Stock_Default extends Mage_Ca /** * Current Product Type Id * - * @var string + * @var string|null */ protected $_typeId; diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php index 61fad0fb4a1..bf5ba5f74e4 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php @@ -137,9 +137,7 @@ public function addQtyFilter($comparsionMethod, $qty) } /** - * Initialize select object - * - * @return Varien_Db_Select + * @inheritDoc */ protected function _initSelect() { diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php index 651d5343fea..9bd40bea3a5 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php @@ -137,7 +137,7 @@ class Mage_CatalogInventory_Model_Stock_Item extends Mage_Core_Model_Abstract /** * Associated product instance * - * @var Mage_Catalog_Model_Product + * @var Mage_Catalog_Model_Product|null */ protected $_productInstance = null; @@ -462,7 +462,7 @@ public function getCanBackInStock() * Check quantity * * @param float $qty - * @exception Mage_Core_Exception + * @throws Mage_Core_Exception * @return bool */ public function checkQty($qty) @@ -478,7 +478,6 @@ public function checkQty($qty) break; default: return false; - break; } } return true; @@ -571,7 +570,7 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) if (!$this->getIsQtyDecimal()) { $result->setHasQtyOptionUpdate(true); - $qty = intval($qty); + $qty = (int) $qty; /** * Adding stock data to quote item @@ -581,7 +580,7 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) if (!is_numeric($qty)) { $qty = Mage::app()->getLocale()->getNumber($qty); } - $origQty = intval($origQty); + $origQty = (int) $origQty; $result->setOrigQty($origQty); } diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php index f3a5e04bef5..2039dba13f7 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php @@ -47,14 +47,14 @@ class Mage_CatalogInventory_Model_Stock_Status extends Mage_Core_Model_Abstract /** * Product Type Instances cache * - * @var array + * @var array|null */ protected $_productTypes; /** * Websites cache * - * @var array + * @var array|null */ protected $_websites; @@ -103,7 +103,7 @@ public function getProductTypeInstance($productType) /** * Retrieve website models * - * @param null $websiteId + * @param string|int|null $websiteId * @return array */ public function getWebsites($websiteId = null) diff --git a/app/code/core/Mage/CatalogInventory/etc/api.xml b/app/code/core/Mage/CatalogInventory/etc/api.xml index b6fa8a9fbe9..da814fb3c41 100644 --- a/app/code/core/Mage/CatalogInventory/etc/api.xml +++ b/app/code/core/Mage/CatalogInventory/etc/api.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_CatalogInventory * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/etc/api2.xml b/app/code/core/Mage/CatalogInventory/etc/api2.xml index 766b77e934f..3c953eaef8f 100644 --- a/app/code/core/Mage/CatalogInventory/etc/api2.xml +++ b/app/code/core/Mage/CatalogInventory/etc/api2.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_CatalogInventory * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/etc/config.xml b/app/code/core/Mage/CatalogInventory/etc/config.xml index 5a0a7617257..dfde915360b 100644 --- a/app/code/core/Mage/CatalogInventory/etc/config.xml +++ b/app/code/core/Mage/CatalogInventory/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_CatalogInventory * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php index 597372d1606..5697c38c01b 100644 --- a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php +++ b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.3-0.7.4.php @@ -30,7 +30,8 @@ 'cataloginventory/options/backorders' => 'cataloginventory/item_options/backorders', 'cataloginventory/options/notify_stock_qty' => 'cataloginventory/item_options/notify_stock_qty', 'cataloginventory/options/manage_stock' => 'cataloginventory/item_options/manage_stock', - ] as $was => $become) { + ] as $was => $become +) { $installer->run(sprintf( "UPDATE `%s` SET `path` = '%s' WHERE `path` = '%s'", $this->getTable('core/config_data'), diff --git a/app/code/core/Mage/CatalogRule/Helper/Data.php b/app/code/core/Mage/CatalogRule/Helper/Data.php index 6995fa2b0f8..aba232fd41a 100644 --- a/app/code/core/Mage/CatalogRule/Helper/Data.php +++ b/app/code/core/Mage/CatalogRule/Helper/Data.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_CatalogRule * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Model/Rule.php b/app/code/core/Mage/CatalogRule/Model/Rule.php index 43c38098d96..217e18bc57b 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule.php @@ -80,7 +80,7 @@ class Mage_CatalogRule_Model_Rule extends Mage_Rule_Model_Abstract /** * Store matched product Ids * - * @var array + * @var array|null */ protected $_productIds; diff --git a/app/code/core/Mage/CatalogRule/etc/adminhtml.xml b/app/code/core/Mage/CatalogRule/etc/adminhtml.xml index db0d539e308..58ba84d6616 100644 --- a/app/code/core/Mage/CatalogRule/etc/adminhtml.xml +++ b/app/code/core/Mage/CatalogRule/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_CatalogRule * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogRule/etc/config.xml b/app/code/core/Mage/CatalogRule/etc/config.xml index 775f3e8d899..e5d8e60724a 100644 --- a/app/code/core/Mage/CatalogRule/etc/config.xml +++ b/app/code/core/Mage/CatalogRule/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_CatalogRule * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php index 1f37710ba38..23e78c933fa 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php +++ b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php @@ -145,10 +145,6 @@ public function getCurrencyCount() public function getCurrency($attribute) { return Mage::app()->getStore()->getCurrentCurrencyCode(); - - $baseCurrency = Mage::app()->getStore()->getBaseCurrency()->getCurrencyCode(); - return $this->getAttributeValue($attribute, 'currency') ? - $this->getAttributeValue($attribute, 'currency') : $baseCurrency; } /** diff --git a/app/code/core/Mage/CatalogSearch/Block/Layer.php b/app/code/core/Mage/CatalogSearch/Block/Layer.php index 541945bd909..9b64945ed5e 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Layer.php +++ b/app/code/core/Mage/CatalogSearch/Block/Layer.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_CatalogSearch * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -83,7 +84,8 @@ public function canShowBlock() ->getConfig(Mage_CatalogSearch_Model_Layer::XML_PATH_DISPLAY_LAYER_COUNT); if (!$availableResCount - || ($availableResCount > $this->getLayer()->getProductCollection()->getSize())) { + || ($availableResCount > $this->getLayer()->getProductCollection()->getSize()) + ) { return parent::canShowBlock(); } return false; diff --git a/app/code/core/Mage/CatalogSearch/Block/Result.php b/app/code/core/Mage/CatalogSearch/Block/Result.php index 6f447cd2cab..b82e0c90d9a 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Result.php +++ b/app/code/core/Mage/CatalogSearch/Block/Result.php @@ -33,7 +33,7 @@ class Mage_CatalogSearch_Block_Result extends Mage_Core_Block_Template /** * Catalog Product collection * - * @var Mage_CatalogSearch_Model_Resource_Fulltext_Collection + * @var Mage_CatalogSearch_Model_Resource_Fulltext_Collection|Mage_Eav_Model_Entity_Collection_Abstract|null */ protected $_productCollection; @@ -163,7 +163,7 @@ public function getProductListHtml() /** * Retrieve loaded category collection * - * @return Mage_CatalogSearch_Model_Resource_Fulltext_Collection + * @return Mage_CatalogSearch_Model_Resource_Fulltext_Collection|Mage_Eav_Model_Entity_Collection_Abstract */ protected function _getProductCollection() { diff --git a/app/code/core/Mage/CatalogSearch/Model/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Advanced.php index 0616ccb3cc7..e55042367ca 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Advanced.php @@ -65,7 +65,7 @@ class Mage_CatalogSearch_Model_Advanced extends Mage_Core_Model_Abstract /** * Found products collection * - * @var Mage_CatalogSearch_Model_Resource_Advanced_Collection + * @var Mage_CatalogSearch_Model_Resource_Advanced_Collection|null */ protected $_productCollection; @@ -171,11 +171,12 @@ public function addFilters($values) } else { $rate = 1; } - if ($this->_getResource()->addRatedPriceFilter( - $this->getProductCollection(), - $attribute, - $value, - $rate + if ($this->_getResource() + ->addRatedPriceFilter( + $this->getProductCollection(), + $attribute, + $value, + $rate ) ) { $hasConditions = true; @@ -184,11 +185,13 @@ public function addFilters($values) } } elseif ($attribute->isIndexable()) { if (!is_string($value) || strlen($value) != 0) { - if ($this->_getResource()->addIndexableAttributeModifiedFilter( - $this->getProductCollection(), - $attribute, - $value - )) { + if ($this->_getResource() + ->addIndexableAttributeModifiedFilter( + $this->getProductCollection(), + $attribute, + $value + ) + ) { $hasConditions = true; $this->_addSearchCriteria($attribute, $value); } diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php index 5e77cd1e18c..7952ca25cfb 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php @@ -31,7 +31,7 @@ class Mage_CatalogSearch_Model_Resource_Fulltext extends Mage_Core_Model_Resourc /** * Searchable attributes cache * - * @var array + * @var array|null */ protected $_searchableAttributes = null; diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php index 046117b9a6f..7c2dbfc2e28 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php @@ -36,7 +36,7 @@ class Mage_CatalogSearch_Model_Resource_Fulltext_Collection extends Mage_Catalog /** * Found data * - * @var array + * @var array|null */ protected $_foundData = null; diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php index c2a9b4cb228..51e67808851 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php @@ -84,7 +84,8 @@ protected function _isAttributeTextAndSearchable($attribute) if (($attribute->getIsSearchable() && !in_array($attribute->getFrontendInput(), ['select', 'multiselect'])) && (in_array($attribute->getBackendType(), ['varchar', 'text']) - || $attribute->getBackendType() == 'static')) { + || $attribute->getBackendType() == 'static') + ) { return true; } return false; @@ -99,7 +100,8 @@ protected function _isAttributeTextAndSearchable($attribute) protected function _hasAttributeOptionsAndSearchable($attribute) { if ($attribute->getIsSearchable() - && in_array($attribute->getFrontendInput(), ['select', 'multiselect'])) { + && in_array($attribute->getFrontendInput(), ['select', 'multiselect']) + ) { return true; } diff --git a/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml b/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml index 893b8474589..e0e0b42093a 100644 --- a/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml +++ b/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_CatalogSearch * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php index 6edc88c9035..f1d17e2a761 100644 --- a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php +++ b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -64,7 +65,8 @@ protected function _toHtml() if (!$payment->getMethod() || !$payment->getMethodInstance() || $payment->getMethodInstance()->getIsDummy() - || !$payment->getMethodInstance()->getIsCentinelValidationEnabled()) { + || !$payment->getMethodInstance()->getIsCentinelValidationEnabled() + ) { return ''; } return parent::_toHtml(); diff --git a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php index b35f688effd..c01c6c90165 100644 --- a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php +++ b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Helper/Data.php b/app/code/core/Mage/Centinel/Helper/Data.php index 7326b767d1e..08e107ef0c1 100644 --- a/app/code/core/Mage/Centinel/Helper/Data.php +++ b/app/code/core/Mage/Centinel/Helper/Data.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -141,7 +142,7 @@ private function _getCmpiParesValue($value) * Return centinel block for payment form with logos * * @param Mage_Payment_Model_Method_Abstract $method - * @return Mage_Centinel_Block_Logo + * @return Mage_Centinel_Block_Logo|Mage_Core_Block_Abstract|false */ public function getMethodFormBlock($method) { diff --git a/app/code/core/Mage/Centinel/Model/Api/Client.php b/app/code/core/Mage/Centinel/Model/Api/Client.php index 4ed477a313a..73ccd0e7f9f 100644 --- a/app/code/core/Mage/Centinel/Model/Api/Client.php +++ b/app/code/core/Mage/Centinel/Model/Api/Client.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/Config.php b/app/code/core/Mage/Centinel/Model/Config.php index e2a22973c6b..de3a03fe024 100644 --- a/app/code/core/Mage/Centinel/Model/Config.php +++ b/app/code/core/Mage/Centinel/Model/Config.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2019 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2019-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,7 +29,7 @@ class Mage_Centinel_Model_Config /** * Store id or store model * - * @var int|Mage_Core_Model_Store + * @var int|Mage_Core_Model_Store|false */ protected $_store = false; @@ -73,7 +73,7 @@ public function getStore() * Return validation state class for card with type $cardType * * @param string $cardType - * @return string + * @return string|array|false */ public function getStateModelClass($cardType) { @@ -138,7 +138,7 @@ private function _getServiceConfigValue($key) /** * Define if debugging is enabled * - * @return bool + * @return string */ public function getDebugFlag() { diff --git a/app/code/core/Mage/Centinel/Model/Observer.php b/app/code/core/Mage/Centinel/Model/Observer.php index 8375dae48cd..1c1e7cb0e26 100644 --- a/app/code/core/Mage/Centinel/Model/Observer.php +++ b/app/code/core/Mage/Centinel/Model/Observer.php @@ -54,7 +54,7 @@ public function salesEventConvertQuoteToOrder($observer) public function paymentInfoBlockPrepareSpecificInformation($observer) { if ($observer->getEvent()->getBlock()->getIsSecureMode()) { - return; + return $this; } $payment = $observer->getEvent()->getPayment(); diff --git a/app/code/core/Mage/Centinel/Model/Service.php b/app/code/core/Mage/Centinel/Model/Service.php index a6ca26431af..5cd402bd955 100644 --- a/app/code/core/Mage/Centinel/Model/Service.php +++ b/app/code/core/Mage/Centinel/Model/Service.php @@ -54,14 +54,14 @@ class Mage_Centinel_Model_Service extends Varien_Object /** * Validation api model * - * @var Mage_Centinel_Model_Api + * @var Mage_Centinel_Model_Api|null */ protected $_api; /** * Validation state model * - * @var Mage_Centinel_Model_StateAbstract + * @var Mage_Centinel_Model_StateAbstract|false */ protected $_validationState; @@ -78,7 +78,7 @@ protected function _getSession() /** * Return value from section of centinel config * - * @return string + * @return Mage_Centinel_Model_Config */ protected function _getConfig() { @@ -131,7 +131,7 @@ private function _getUrl($suffix, $current = false) */ protected function _getApi() { - if (!is_null($this->_api)) { + if ($this->_api !== null) { return $this->_api; } @@ -151,12 +151,14 @@ protected function _getApi() * Create and return validation state model for card type * * @param string $cardType - * @return Mage_Centinel_Model_StateAbstract + * @return Mage_Centinel_Model_StateAbstract|false */ protected function _getValidationStateModel($cardType) { if ($modelClass = $this->_getConfig()->getStateModelClass($cardType)) { - return Mage::getModel($modelClass); + /** @var Mage_Centinel_Model_StateAbstract $model */ + $model = Mage::getModel($modelClass); + return $model; } return false; } @@ -165,7 +167,7 @@ protected function _getValidationStateModel($cardType) * Return validation state model * * @param string $cardType - * @return Mage_Centinel_Model_StateAbstract + * @return Mage_Centinel_Model_StateAbstract|false */ protected function _getValidationState($cardType = null) { @@ -378,7 +380,7 @@ public function isAuthenticateSuccessful() * Export cmpi lookups and authentication information stored in session into array * * @param mixed $to - * @param array $map + * @param array|false $map * @return mixed $to */ public function exportCmpiData($to, $map = false) diff --git a/app/code/core/Mage/Centinel/Model/State/Jcb.php b/app/code/core/Mage/Centinel/Model/State/Jcb.php index 5d0fbb0a17f..0b7dac7bd4f 100644 --- a/app/code/core/Mage/Centinel/Model/State/Jcb.php +++ b/app/code/core/Mage/Centinel/Model/State/Jcb.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -72,13 +73,15 @@ public function isAuthenticateSuccessful() //Test case 3 if ($paResStatus == 'N' && $signatureVerification == 'Y' && $eciFlag == '07' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { return false; } //Test case 4 if ($paResStatus == 'U' && $signatureVerification == 'Y' && $eciFlag == '07' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { if ($this->getIsModeStrict()) { return false; } else { @@ -88,7 +91,8 @@ public function isAuthenticateSuccessful() //Test case 5 if ($paResStatus == 'U' && $signatureVerification == 'Y' && $eciFlag == '07' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { if ($this->getIsModeStrict()) { return false; } else { @@ -98,13 +102,15 @@ public function isAuthenticateSuccessful() //Test case 10 if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '07' && - $xid == '' && $cavv == '' && $errorNo != '0') { + $xid == '' && $cavv == '' && $errorNo != '0' + ) { return false; } //Test case 11 if ($paResStatus == 'A' && $signatureVerification == 'Y' && $eciFlag == '06' && - $xid != '' && $cavv != '' && $errorNo == '0') { + $xid != '' && $cavv != '' && $errorNo == '0' + ) { return true; } } @@ -123,7 +129,8 @@ protected function _isLookupStrictSuccessful() if ($this->getLookupEnrolled() == 'Y' && $this->getLookupAcsUrl() != '' && $this->getLookupPayload() != '' && - $this->getLookupErrorNo() == '0') { + $this->getLookupErrorNo() == '0' + ) { return true; } return false; diff --git a/app/code/core/Mage/Centinel/Model/State/Mastercard.php b/app/code/core/Mage/Centinel/Model/State/Mastercard.php index b53d77225bb..6dd6b5c7d59 100644 --- a/app/code/core/Mage/Centinel/Model/State/Mastercard.php +++ b/app/code/core/Mage/Centinel/Model/State/Mastercard.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -67,13 +68,15 @@ public function isAuthenticateSuccessful() //Test case 3 if ($paResStatus == 'N' && $signatureVerification == 'Y' && $eciFlag == '01' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { return false; } //Test case 4 if ($paResStatus == 'U' && $signatureVerification == 'Y' && $eciFlag == '01' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { if ($this->getIsModeStrict()) { return false; } else { @@ -92,10 +95,12 @@ public function isAuthenticateSuccessful() //Test cases 5-9 if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '' && - $xid == '' && $cavv == '' && $errorNo == '0') { + $xid == '' && $cavv == '' && $errorNo == '0' + ) { return true; } elseif ($paResStatus == false && $signatureVerification == false && $eciFlag == false && - $xid == false && $cavv == false && $errorNo == false) { + $xid == false && $cavv == false && $errorNo == false + ) { return true; } } @@ -114,7 +119,8 @@ protected function _isLookupStrictSuccessful() if ($this->getLookupEnrolled() == 'Y' && $this->getLookupAcsUrl() != '' && $this->getLookupPayload() != '' && - $this->getLookupErrorNo() == '0') { + $this->getLookupErrorNo() == '0' + ) { return true; } return false; diff --git a/app/code/core/Mage/Centinel/Model/State/Visa.php b/app/code/core/Mage/Centinel/Model/State/Visa.php index 73d7d13e6fd..0a15515f6c8 100644 --- a/app/code/core/Mage/Centinel/Model/State/Visa.php +++ b/app/code/core/Mage/Centinel/Model/State/Visa.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -67,13 +68,15 @@ public function isAuthenticateSuccessful() //Test case 3 if ($paResStatus == 'N' && $signatureVerification == 'Y' && $eciFlag == '07' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { return false; } //Test case 4 if ($paResStatus == 'A' && $signatureVerification == 'Y' && $eciFlag == '06' && - $xid != '' && $cavv != '' && $errorNo == '0') { + $xid != '' && $cavv != '' && $errorNo == '0' + ) { if ($this->getIsModeStrict()) { return false; } else { @@ -83,7 +86,8 @@ public function isAuthenticateSuccessful() //Test case 5 if ($paResStatus == 'U' && $signatureVerification == 'Y' && $eciFlag == '07' && - $xid != '' && $cavv == '' && $errorNo == '0') { + $xid != '' && $cavv == '' && $errorNo == '0' + ) { if ($this->getIsModeStrict()) { return false; } else { @@ -93,7 +97,8 @@ public function isAuthenticateSuccessful() //Test case 11 if ($paResStatus == 'U' && $signatureVerification == '' && $eciFlag == '07' && - $xid == '' && $cavv == '' && $errorNo == '1050') { + $xid == '' && $cavv == '' && $errorNo == '1050' + ) { if ($this->getIsModeStrict()) { return false; } else { @@ -105,10 +110,12 @@ public function isAuthenticateSuccessful() //Test cases 6-10 if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '' && - $xid == '' && $cavv == '' && $errorNo == '0') { + $xid == '' && $cavv == '' && $errorNo == '0' + ) { return true; } elseif ($paResStatus == false && $signatureVerification == false && $eciFlag == false && - $xid == false && $cavv == false && $errorNo == false) { + $xid == false && $cavv == false && $errorNo == false + ) { return true; } } @@ -127,7 +134,8 @@ protected function _isLookupStrictSuccessful() if ($this->getLookupEnrolled() == 'Y' && $this->getLookupAcsUrl() != '' && $this->getLookupPayload() != '' && - $this->getLookupErrorNo() == '0') { + $this->getLookupErrorNo() == '0' + ) { return true; } return false; diff --git a/app/code/core/Mage/Centinel/Model/StateAbstract.php b/app/code/core/Mage/Centinel/Model/StateAbstract.php index 183ccd4c492..bf6ca593a3f 100644 --- a/app/code/core/Mage/Centinel/Model/StateAbstract.php +++ b/app/code/core/Mage/Centinel/Model/StateAbstract.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -30,7 +31,7 @@ abstract class Mage_Centinel_Model_StateAbstract extends Varien_Object /** * Storage data model * - * @var Varien_Object + * @var Varien_Object|false */ private $_dataStorage = false; diff --git a/app/code/core/Mage/Centinel/controllers/IndexController.php b/app/code/core/Mage/Centinel/controllers/IndexController.php index bdc9ac63498..e58d01ffe50 100644 --- a/app/code/core/Mage/Centinel/controllers/IndexController.php +++ b/app/code/core/Mage/Centinel/controllers/IndexController.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -75,7 +76,7 @@ private function _getPayment() /** * Return Centinel validation model * - * @return Mage_Centinel_Model_Service + * @return Mage_Centinel_Model_Service|false */ private function _getValidator() { diff --git a/app/code/core/Mage/Centinel/etc/config.xml b/app/code/core/Mage/Centinel/etc/config.xml index 80e54e29f00..a7a7e2f4cf6 100644 --- a/app/code/core/Mage/Centinel/etc/config.xml +++ b/app/code/core/Mage/Centinel/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Centinel * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Checkout/Block/Cart.php b/app/code/core/Mage/Checkout/Block/Cart.php index 4c59959115b..f7ce73afeb0 100644 --- a/app/code/core/Mage/Checkout/Block/Cart.php +++ b/app/code/core/Mage/Checkout/Block/Cart.php @@ -51,7 +51,8 @@ public function prepareItemUrls() if ($item->getStoreId() != Mage::app()->getStore()->getId() && !$item->getRedirectUrl() - && !$product->isVisibleInSiteVisibility()) { + && !$product->isVisibleInSiteVisibility() + ) { $products[$product->getId()] = $item->getStoreId(); } } diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php index 46e0896f184..4d526e8e620 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Configurable.php @@ -67,7 +67,8 @@ public function getProductThumbnail() $product = $this->getChildProduct(); if (!$product || !$product->getData('thumbnail') || ($product->getData('thumbnail') === 'no_selection') - || (Mage::getStoreConfig(self::CONFIGURABLE_PRODUCT_IMAGE) === self::USE_PARENT_IMAGE)) { + || (Mage::getStoreConfig(self::CONFIGURABLE_PRODUCT_IMAGE) === self::USE_PARENT_IMAGE) + ) { $product = $this->getProduct(); } diff --git a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php index b04502f3396..7fd30892f98 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Item/Renderer/Grouped.php @@ -57,7 +57,8 @@ public function getProductThumbnail() $product = $this->getProduct(); if (!$product->getData('thumbnail') || ($product->getData('thumbnail') === 'no_selection') - || (Mage::getStoreConfig(self::GROUPED_PRODUCT_IMAGE) === self::USE_PARENT_IMAGE)) { + || (Mage::getStoreConfig(self::GROUPED_PRODUCT_IMAGE) === self::USE_PARENT_IMAGE) + ) { $product = $this->getGroupedProduct(); } diff --git a/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php b/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php index cebc26423a9..2c10ba8e542 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Sidebar.php @@ -58,7 +58,7 @@ public function getItemCount() /** * Get array of last added items * - * @param null $count + * @param int|null $count * @return array */ public function getRecentItems($count = null) diff --git a/app/code/core/Mage/Checkout/Block/Cart/Totals.php b/app/code/core/Mage/Checkout/Block/Cart/Totals.php index 9e260a1f5af..ebfacb5f5cc 100644 --- a/app/code/core/Mage/Checkout/Block/Cart/Totals.php +++ b/app/code/core/Mage/Checkout/Block/Cart/Totals.php @@ -77,9 +77,9 @@ protected function _getTotalRenderer($code) /** * @param Mage_Sales_Model_Quote_Address_Total $total - * @param null $area + * @param string|null $area * @param int $colspan - * @return mixed + * @return string */ public function renderTotal($total, $area = null, $colspan = 1) { diff --git a/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php b/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php index 3d8bb08bb9f..9c2d6a7ead3 100644 --- a/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php +++ b/app/code/core/Mage/Checkout/Block/Multishipping/Billing.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php b/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php index a2d0ac97478..24d54f0929a 100644 --- a/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php +++ b/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php @@ -301,7 +301,7 @@ public function getBillinAddressTotals() /** * @param Mage_Sales_Model_Order_Total $totals - * @param null $colspan + * @param int|null $colspan * @return string */ public function renderTotals($totals, $colspan = null) diff --git a/app/code/core/Mage/Checkout/Block/Onepage/Billing.php b/app/code/core/Mage/Checkout/Block/Onepage/Billing.php index a829fdb4d9f..e37ce18b999 100644 --- a/app/code/core/Mage/Checkout/Block/Onepage/Billing.php +++ b/app/code/core/Mage/Checkout/Block/Onepage/Billing.php @@ -31,7 +31,7 @@ class Mage_Checkout_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Ab /** * Sales Qoute Billing Address instance * - * @var Mage_Sales_Model_Quote_Address + * @var Mage_Sales_Model_Quote_Address|null */ protected $_address; @@ -65,7 +65,8 @@ protected function _construct() public function isUseBillingAddressForShipping() { if (($this->getQuote()->getIsVirtual()) - || !$this->getQuote()->getShippingAddress()->getSameAsBilling()) { + || !$this->getQuote()->getShippingAddress()->getSameAsBilling() + ) { return false; } return true; diff --git a/app/code/core/Mage/Checkout/Block/Onepage/Shipping.php b/app/code/core/Mage/Checkout/Block/Onepage/Shipping.php index 8169a132885..19344a6ba35 100644 --- a/app/code/core/Mage/Checkout/Block/Onepage/Shipping.php +++ b/app/code/core/Mage/Checkout/Block/Onepage/Shipping.php @@ -31,7 +31,7 @@ class Mage_Checkout_Block_Onepage_Shipping extends Mage_Checkout_Block_Onepage_A /** * Sales Qoute Shipping Address instance * - * @var Mage_Sales_Model_Quote_Address + * @var Mage_Sales_Model_Quote_Address|null */ protected $_address = null; diff --git a/app/code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php b/app/code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php index a4ab0466e12..5917b160a08 100644 --- a/app/code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php +++ b/app/code/core/Mage/Checkout/Block/Onepage/Shipping/Method/Available.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -41,17 +41,6 @@ public function getShippingRates() $this->getAddress()->collectShippingRates()->save(); $groups = $this->getAddress()->getGroupedAllShippingRates(); - /* - if (!empty($groups)) { - $ratesFilter = new Varien_Filter_Object_Grid(); - $ratesFilter->addFilter(Mage::app()->getStore()->getPriceFilter(), 'price'); - - foreach ($groups as $code => $groupItems) { - $groups[$code] = $ratesFilter->filter($groupItems); - } - } - */ - return $this->_rates = $groups; } diff --git a/app/code/core/Mage/Checkout/Model/Api/Resource.php b/app/code/core/Mage/Checkout/Model/Api/Resource.php index 9eab710d6b7..4ccc09e3400 100644 --- a/app/code/core/Mage/Checkout/Model/Api/Resource.php +++ b/app/code/core/Mage/Checkout/Model/Api/Resource.php @@ -212,7 +212,8 @@ protected function _getAttributes($object, $type, array $attributes = null) protected function _isAllowedAttribute($attributeCode, $type, array $attributes = null) { if (!empty($attributes) - && !(in_array($attributeCode, $attributes))) { + && !(in_array($attributeCode, $attributes)) + ) { return false; } @@ -221,7 +222,8 @@ protected function _isAllowedAttribute($attributeCode, $type, array $attributes } if (isset($this->_ignoredAttributeCodes[$type]) - && in_array($attributeCode, $this->_ignoredAttributeCodes[$type])) { + && in_array($attributeCode, $this->_ignoredAttributeCodes[$type]) + ) { return false; } diff --git a/app/code/core/Mage/Checkout/Model/Api/Resource/Customer.php b/app/code/core/Mage/Checkout/Model/Api/Resource/Customer.php index b6a92fb4eeb..9ffa4032a62 100644 --- a/app/code/core/Mage/Checkout/Model/Api/Resource/Customer.php +++ b/app/code/core/Mage/Checkout/Model/Api/Resource/Customer.php @@ -170,7 +170,8 @@ protected function _prepareCustomerQuote(Mage_Sales_Model_Quote $quote) $billing->setCustomerAddress($customerBilling); } if ($shipping && ((!$shipping->getCustomerId() && !$shipping->getSameAsBilling()) - || (!$shipping->getSameAsBilling() && $shipping->getSaveInAddressBook()))) { + || (!$shipping->getSameAsBilling() && $shipping->getSaveInAddressBook())) + ) { $customerShipping = $shipping->exportCustomerAddress(); $customer->addAddress($customerShipping); $shipping->setCustomerAddress($customerShipping); diff --git a/app/code/core/Mage/Checkout/Model/Cart.php b/app/code/core/Mage/Checkout/Model/Cart.php index 0d145557caa..14167830f6a 100644 --- a/app/code/core/Mage/Checkout/Model/Cart.php +++ b/app/code/core/Mage/Checkout/Model/Cart.php @@ -469,6 +469,7 @@ public function save() public function saveQuote() { $this->save(); + return $this; } /** diff --git a/app/code/core/Mage/Checkout/Model/Cart/Api.php b/app/code/core/Mage/Checkout/Model/Cart/Api.php index cb06812276f..554468de61c 100644 --- a/app/code/core/Mage/Checkout/Model/Cart/Api.php +++ b/app/code/core/Mage/Checkout/Model/Cart/Api.php @@ -141,7 +141,8 @@ public function createOrder($quoteId, $store = null, $agreements = null) $this->_fault('invalid_checkout_type'); } if ($quote->getCheckoutMethod() == Mage_Checkout_Model_Api_Resource_Customer::MODE_GUEST - && !Mage::helper('checkout')->isAllowedGuestCheckout($quote, $quote->getStoreId())) { + && !Mage::helper('checkout')->isAllowedGuestCheckout($quote, $quote->getStoreId()) + ) { $this->_fault('guest_checkout_is_not_enabled'); } diff --git a/app/code/core/Mage/Checkout/Model/Cart/Api/V2.php b/app/code/core/Mage/Checkout/Model/Cart/Api/V2.php index 0931e96b749..6fcfa6b7ada 100644 --- a/app/code/core/Mage/Checkout/Model/Cart/Api/V2.php +++ b/app/code/core/Mage/Checkout/Model/Cart/Api/V2.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Checkout/Model/Cart/Coupon/Api/V2.php b/app/code/core/Mage/Checkout/Model/Cart/Coupon/Api/V2.php index e1ec9fe9f29..20dd39c6174 100644 --- a/app/code/core/Mage/Checkout/Model/Cart/Coupon/Api/V2.php +++ b/app/code/core/Mage/Checkout/Model/Cart/Coupon/Api/V2.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Checkout/Model/Cart/Product/Api/V2.php b/app/code/core/Mage/Checkout/Model/Cart/Product/Api/V2.php index 866a6edb27d..cfb14a7e12c 100644 --- a/app/code/core/Mage/Checkout/Model/Cart/Product/Api/V2.php +++ b/app/code/core/Mage/Checkout/Model/Cart/Product/Api/V2.php @@ -43,7 +43,8 @@ protected function _prepareProductsData($data) if (is_array($value)) { foreach ($value as $v) { if (is_object($v) && count(get_object_vars($v)) == 2 - && isset($v->key) && isset($v->value)) { + && isset($v->key) && isset($v->value) + ) { $assocArr[$v->key] = $v->value; } } diff --git a/app/code/core/Mage/Checkout/Model/Cart/Shipping/Api/V2.php b/app/code/core/Mage/Checkout/Model/Cart/Shipping/Api/V2.php index ac7197e7570..1775e5ab2ab 100644 --- a/app/code/core/Mage/Checkout/Model/Cart/Shipping/Api/V2.php +++ b/app/code/core/Mage/Checkout/Model/Cart/Shipping/Api/V2.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Checkout/Model/Session.php b/app/code/core/Mage/Checkout/Model/Session.php index d1eead73154..b5848f891d4 100644 --- a/app/code/core/Mage/Checkout/Model/Session.php +++ b/app/code/core/Mage/Checkout/Model/Session.php @@ -146,6 +146,7 @@ public function unsetAll() { parent::unsetAll(); $this->_quote = null; + return $this; } /** diff --git a/app/code/core/Mage/Checkout/Model/Type/Onepage.php b/app/code/core/Mage/Checkout/Model/Type/Onepage.php index 28b16a494d4..99ff55b66db 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Onepage.php +++ b/app/code/core/Mage/Checkout/Model/Type/Onepage.php @@ -499,7 +499,8 @@ protected function _processValidateCustomer(Mage_Sales_Model_Quote_Address $addr 'confirmation' => 'confirm_password', 'taxvat' => 'taxvat', 'gender' => 'gender', - ] as $key => $dataKey) { + ] as $key => $dataKey + ) { $customer->setData($key, $address->getData($dataKey)); } if ($dob) { @@ -748,7 +749,8 @@ protected function _prepareCustomerQuote() $billing->setCustomerAddress($customerBilling); } if ($shipping && !$shipping->getSameAsBilling() && - (!$shipping->getCustomerId() || $shipping->getSaveInAddressBook())) { + (!$shipping->getCustomerId() || $shipping->getSaveInAddressBook()) + ) { $customerShipping = $shipping->exportCustomerAddress(); $customer->addAddress($customerShipping); $shipping->setCustomerAddress($customerShipping); diff --git a/app/code/core/Mage/Checkout/controllers/CartController.php b/app/code/core/Mage/Checkout/controllers/CartController.php index fb58951f216..481ef99fc05 100644 --- a/app/code/core/Mage/Checkout/controllers/CartController.php +++ b/app/code/core/Mage/Checkout/controllers/CartController.php @@ -474,7 +474,7 @@ protected function _updateShoppingCart() } } $cart = $this->_getCart(); - if (! $cart->getCustomerSession()->getCustomer()->getId() && $cart->getQuote()->getCustomerId()) { + if (!$cart->getCustomerSession()->getCustomer()->getId() && $cart->getQuote()->getCustomerId()) { $cart->getQuote()->setCustomerId(null); } diff --git a/app/code/core/Mage/Checkout/etc/config.xml b/app/code/core/Mage/Checkout/etc/config.xml index 791ac1cdf4d..40d1d50f5c8 100644 --- a/app/code/core/Mage/Checkout/etc/config.xml +++ b/app/code/core/Mage/Checkout/etc/config.xml @@ -16,7 +16,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2021-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Checkout/etc/jstranslator.xml b/app/code/core/Mage/Checkout/etc/jstranslator.xml index 6e1b1a9546b..8bfd48ea4d3 100644 --- a/app/code/core/Mage/Checkout/etc/jstranslator.xml +++ b/app/code/core/Mage/Checkout/etc/jstranslator.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Checkout * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cms/Block/Page.php b/app/code/core/Mage/Cms/Block/Page.php index 8ef56d0f71d..46b2613f47d 100644 --- a/app/code/core/Mage/Cms/Block/Page.php +++ b/app/code/core/Mage/Cms/Block/Page.php @@ -66,7 +66,8 @@ protected function _prepareLayout() if (Mage::getStoreConfig('web/default/show_cms_breadcrumbs') && ($breadcrumbs = $this->getLayout()->getBlock('breadcrumbs')) && ($page->getIdentifier() !== Mage::getStoreConfig('web/default/cms_home_page')) - && ($page->getIdentifier() !== Mage::getStoreConfig('web/default/cms_no_route'))) { + && ($page->getIdentifier() !== Mage::getStoreConfig('web/default/cms_no_route')) + ) { $breadcrumbsArray[] = [ 'crumbName' => 'home', 'crumbInfo' => [ diff --git a/app/code/core/Mage/Cms/Model/Resource/Block.php b/app/code/core/Mage/Cms/Model/Resource/Block.php index 1ed7fbdf700..5a841d12ad5 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Block.php +++ b/app/code/core/Mage/Cms/Model/Resource/Block.php @@ -60,7 +60,7 @@ protected function _beforeSave(Mage_Core_Model_Abstract $object) Mage::throwException(Mage::helper('cms')->__('A block identifier with the same properties already exists in the selected store.')); } - if (! $object->getId()) { + if (!$object->getId()) { $object->setCreationTime(Mage::getSingleton('core/date')->gmtDate()); } $object->setUpdateTime(Mage::getSingleton('core/date')->gmtDate()); diff --git a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php index 1287a87fda1..c4b0b70b90c 100644 --- a/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php +++ b/app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php @@ -35,7 +35,7 @@ class Mage_Cms_Model_Wysiwyg_Images_Storage extends Varien_Object /** * Config object * - * @var Mage_Core_Model_Config_Element + * @var Mage_Core_Model_Config_Element|Varien_Simplexml_Element|false */ protected $_config; @@ -85,7 +85,8 @@ public function getDirsCollection($path) $rootChildParts = explode(DIRECTORY_SEPARATOR, substr($value->getFilename(), $storageRootLength)); if (array_key_exists(end($rootChildParts), $conditions['plain']) - || ($regExp && preg_match($regExp, $value->getFilename()))) { + || ($regExp && preg_match($regExp, $value->getFilename())) + ) { $collection->removeItemByKey($key); } } @@ -99,6 +100,8 @@ public function getDirsCollection($path) * @param string $path Parent directory path * @param string $type Type of storage, e.g. image, media etc. * @return Varien_Data_Collection_Filesystem + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function getFilesCollection($path, $type = null) { @@ -136,7 +139,7 @@ public function getFilesCollection($path, $type = null) $thumbUrl = $this->getThumbnailUrl($path . DS . $thumbImg, true); // generate thumbnail "on the fly" if it does not exists - if (! $thumbUrl) { + if (!$thumbUrl) { $thumbUrl = Mage::getSingleton('adminhtml/url')->getUrl('*/*/thumbnail', ['file' => $item->getId()]); } @@ -321,7 +324,7 @@ public function getThumbnailPath($filePath, $checkFile = false) if (strpos($filePath, $mediaRootDir) === 0) { $thumbPath = $this->getThumbnailRoot() . DS . substr($filePath, strlen($mediaRootDir)); - if (! $checkFile || is_readable($thumbPath)) { + if (!$checkFile || is_readable($thumbPath)) { return $thumbPath; } } @@ -452,7 +455,7 @@ public function getSession() */ public function getConfig() { - if (! $this->_config) { + if (!$this->_config) { $this->_config = Mage::getConfig()->getNode('cms/browser', 'adminhtml'); } @@ -466,7 +469,7 @@ public function getConfig() */ public function getConfigAsArray() { - if (! $this->_configAsArray) { + if (!$this->_configAsArray) { $this->_configAsArray = $this->getConfig()->asCanonicalArray(); } diff --git a/app/code/core/Mage/Cms/etc/adminhtml.xml b/app/code/core/Mage/Cms/etc/adminhtml.xml index 145b857d833..2a27c14b39e 100644 --- a/app/code/core/Mage/Cms/etc/adminhtml.xml +++ b/app/code/core/Mage/Cms/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Cms * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cms/etc/config.xml b/app/code/core/Mage/Cms/etc/config.xml index d2e1cdbe0ed..7530fe49d66 100644 --- a/app/code/core/Mage/Cms/etc/config.xml +++ b/app/code/core/Mage/Cms/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Cms * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Cms/etc/widget.xml b/app/code/core/Mage/Cms/etc/widget.xml index 626c5a44489..54420201da9 100644 --- a/app/code/core/Mage/Cms/etc/widget.xml +++ b/app/code/core/Mage/Cms/etc/widget.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Cms * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Media/Js/Abstract.php b/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Media/Js/Abstract.php index 8f13c099820..fb658f8921d 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Media/Js/Abstract.php +++ b/app/code/core/Mage/ConfigurableSwatches/Block/Catalog/Media/Js/Abstract.php @@ -67,7 +67,7 @@ abstract protected function _getImageSizes(); * Get image fallbacks by product as * array(product ID => array( product => product, image_fallback => image fallback ) ) * - * @param null $keepFrame + * @param bool|null $keepFrame * @return array */ public function getProductImageFallbacks($keepFrame = null) 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 e343f1daef1..dce457b64a7 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 @@ -15,7 +15,7 @@ * @category Mage * @package Mage_ConfigurableSwatches * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php b/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php index 96c468de5bb..f7aad885c07 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php +++ b/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php @@ -109,7 +109,8 @@ public function attachProductChildrenAttributeMapping(array $parentProducts, $st // product has no value for attribute or not available, we can't process it $isInStock = $childProduct->getStockItem()->getIsInStock(); if (!$childProduct->hasData($attribute->getAttributeCode()) - || (!$isInStock && !Mage::helper('cataloginventory')->isShowOutOfStock())) { + || (!$isInStock && !Mage::helper('cataloginventory')->isShowOutOfStock()) + ) { continue; } $optionId = $childProduct->getData($attribute->getAttributeCode()); diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php b/app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php index 49a86cb454c..c4e50aa7081 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php +++ b/app/code/core/Mage/ConfigurableSwatches/Helper/Productlist.php @@ -33,21 +33,21 @@ class Mage_ConfigurableSwatches_Helper_Productlist extends Mage_Core_Helper_Abst /** * ID of attribute to be used for swatches on product listing * - * @var string + * @var string|false|null */ protected $_swatchAttributeId = null; /** * Attribute model to be used for swatches on product listing * - * @var Mage_Catalog_Model_Product_Type_Configurable_Attribute + * @var Mage_Catalog_Model_Product_Type_Configurable_Attribute|false|null */ protected $_swatchAttribute = null; /** * The current value for the swatch attribute that the product list is being filtered by. * - * @var int + * @var int|false|null */ protected $_swatchAttributeFilteredValue = null; @@ -100,7 +100,7 @@ public function getSwatchAttributeId() /** * Get model of attribute that should be used for swatches on product listing * - * @return Mage_Eav_Model_Attribute + * @return Mage_Catalog_Model_Product_Type_Configurable_Attribute|Mage_Eav_Model_Entity_Attribute_Abstract|false */ public function getSwatchAttribute() { diff --git a/app/code/core/Mage/ConfigurableSwatches/Helper/Swatchdimensions.php b/app/code/core/Mage/ConfigurableSwatches/Helper/Swatchdimensions.php index f6512dce046..e55b10e3c36 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Helper/Swatchdimensions.php +++ b/app/code/core/Mage/ConfigurableSwatches/Helper/Swatchdimensions.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_ConfigurableSwatches * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/ConfigurableSwatches/Model/Observer.php b/app/code/core/Mage/ConfigurableSwatches/Model/Observer.php index 34b6a3c36fc..0fd3c738802 100644 --- a/app/code/core/Mage/ConfigurableSwatches/Model/Observer.php +++ b/app/code/core/Mage/ConfigurableSwatches/Model/Observer.php @@ -48,7 +48,8 @@ public function productListCollectionLoadAfter(Varien_Event_Observer $observer) $collection = $observer->getCollection(); if ($collection - instanceof Mage_ConfigurableSwatches_Model_Resource_Catalog_Product_Type_Configurable_Product_Collection) { + instanceof Mage_ConfigurableSwatches_Model_Resource_Catalog_Product_Type_Configurable_Product_Collection + ) { // avoid recursion return; } @@ -155,7 +156,8 @@ public function convertLayerBlock(Varien_Event_Observer $observer) // Perform this operation if we're on a category view page or search results page if (($front == 'catalog' && $controller == 'category' && $action == 'view') - || ($front == 'catalogsearch' && $controller == 'result' && $action == 'index')) { + || ($front == 'catalogsearch' && $controller == 'result' && $action == 'index') + ) { // Block name for layered navigation differs depending on which Magento edition we're in $blockName = 'catalog.leftnav'; if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) { diff --git a/app/code/core/Mage/ConfigurableSwatches/etc/adminhtml.xml b/app/code/core/Mage/ConfigurableSwatches/etc/adminhtml.xml index 1bc4726b030..e604077be78 100644 --- a/app/code/core/Mage/ConfigurableSwatches/etc/adminhtml.xml +++ b/app/code/core/Mage/ConfigurableSwatches/etc/adminhtml.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_ConfigurableSwatches * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/ConfigurableSwatches/etc/config.xml b/app/code/core/Mage/ConfigurableSwatches/etc/config.xml index 8ab450fdce5..0bb7012917c 100644 --- a/app/code/core/Mage/ConfigurableSwatches/etc/config.xml +++ b/app/code/core/Mage/ConfigurableSwatches/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_ConfigurableSwatches * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/ConfigurableSwatches/etc/jstranslator.xml b/app/code/core/Mage/ConfigurableSwatches/etc/jstranslator.xml index 32f189c06ec..72b9ca3232d 100644 --- a/app/code/core/Mage/ConfigurableSwatches/etc/jstranslator.xml +++ b/app/code/core/Mage/ConfigurableSwatches/etc/jstranslator.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_ConfigurableSwatches * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Contacts/Helper/Data.php b/app/code/core/Mage/Contacts/Helper/Data.php index c650650e0e4..60c20a7e50e 100644 --- a/app/code/core/Mage/Contacts/Helper/Data.php +++ b/app/code/core/Mage/Contacts/Helper/Data.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Contacts * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Contacts/etc/config.xml b/app/code/core/Mage/Contacts/etc/config.xml index d0bf0f3de91..62df870a413 100644 --- a/app/code/core/Mage/Contacts/etc/config.xml +++ b/app/code/core/Mage/Contacts/etc/config.xml @@ -16,6 +16,7 @@ * @category Mage * @package Mage_Contacts * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Core/Block/Abstract.php b/app/code/core/Mage/Core/Block/Abstract.php index 48fd19e0b58..9609a3f5024 100644 --- a/app/code/core/Mage/Core/Block/Abstract.php +++ b/app/code/core/Mage/Core/Block/Abstract.php @@ -132,7 +132,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object /** * Messages block instance * - * @var Mage_Core_Block_Messages + * @var Mage_Core_Block_Messages|null */ protected $_messagesBlock = null; @@ -184,14 +184,14 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object /** * Factory instance * - * @var Mage_Core_Model_Factory + * @var Mage_Core_Model_Factory|null */ protected $_factory; /** * Application instance * - * @var Mage_Core_Model_App + * @var Mage_Core_Model_App|null */ protected $_app; diff --git a/app/code/core/Mage/Core/Block/Html/Date.php b/app/code/core/Mage/Core/Block/Html/Date.php index 7dde4b9adf3..da18735c3c7 100644 --- a/app/code/core/Mage/Core/Block/Html/Date.php +++ b/app/code/core/Mage/Core/Block/Html/Date.php @@ -87,7 +87,7 @@ protected function _toHtml() } /** - * @param null $index + * @param null $index deprecated * @return string */ public function getEscapedValue($index = null) diff --git a/app/code/core/Mage/Core/Block/Profiler.php b/app/code/core/Mage/Core/Block/Profiler.php index 874bcfb4931..89580f5947e 100644 --- a/app/code/core/Mage/Core/Block/Profiler.php +++ b/app/code/core/Mage/Core/Block/Profiler.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,7 +33,8 @@ protected function _toHtml() { if (!$this->_beforeToHtml() || !Mage::getStoreConfig('dev/debug/profiler') - || !Mage::helper('core')->isDevAllowed()) { + || !Mage::helper('core')->isDevAllowed() + ) { return ''; } diff --git a/app/code/core/Mage/Core/Block/Template.php b/app/code/core/Mage/Core/Block/Template.php index e3e040f5a70..f4ea73e0a1b 100644 --- a/app/code/core/Mage/Core/Block/Template.php +++ b/app/code/core/Mage/Core/Block/Template.php @@ -67,7 +67,7 @@ class Mage_Core_Block_Template extends Mage_Core_Block_Abstract /** * Path to template file in theme. * - * @var string + * @var string|null */ protected $_template; diff --git a/app/code/core/Mage/Core/Block/Template/Zend.php b/app/code/core/Mage/Core/Block/Template/Zend.php index 0addfeb075f..90d11e9f50e 100644 --- a/app/code/core/Mage/Core/Block/Template/Zend.php +++ b/app/code/core/Mage/Core/Block/Template/Zend.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -44,7 +44,7 @@ public function _construct() /** * @param array|string $key - * @param null $value + * @param array|string|null $value * @return $this|Mage_Core_Block_Template * @throws Zend_View_Exception */ @@ -62,11 +62,12 @@ public function assign($key, $value = null) /** * @param string $dir - * @return void + * @return $this */ public function setScriptPath($dir) { $this->_view->setScriptPath($dir . DS); + return $this; } /** diff --git a/app/code/core/Mage/Core/Block/Text/List/Item.php b/app/code/core/Mage/Core/Block/Text/List/Item.php index 1f6fb6d7727..37bff6a4b13 100644 --- a/app/code/core/Mage/Core/Block/Text/List/Item.php +++ b/app/code/core/Mage/Core/Block/Text/List/Item.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Block/Text/Tag.php b/app/code/core/Mage/Core/Block/Text/Tag.php index d7a46628322..5816073462a 100644 --- a/app/code/core/Mage/Core/Block/Text/Tag.php +++ b/app/code/core/Mage/Core/Block/Text/Tag.php @@ -42,7 +42,7 @@ protected function _construct() /** * @param string|array $param - * @param null $value + * @param string|null $value * @return $this */ public function setTagParam($param, $value = null) diff --git a/app/code/core/Mage/Core/Block/Text/Tag/Css/Admin.php b/app/code/core/Mage/Core/Block/Text/Tag/Css/Admin.php index e9a5728e6fc..7561ed79770 100644 --- a/app/code/core/Mage/Core/Block/Text/Tag/Css/Admin.php +++ b/app/code/core/Mage/Core/Block/Text/Tag/Css/Admin.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Block/Text/Tag/Meta.php b/app/code/core/Mage/Core/Block/Text/Tag/Meta.php index e549d6051ba..adc3d90d46f 100644 --- a/app/code/core/Mage/Core/Block/Text/Tag/Meta.php +++ b/app/code/core/Mage/Core/Block/Text/Tag/Meta.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Controller/Varien/Action.php b/app/code/core/Mage/Core/Controller/Varien/Action.php index e12b1cb2a44..d5f193aa2d2 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Action.php +++ b/app/code/core/Mage/Core/Controller/Varien/Action.php @@ -574,7 +574,8 @@ public function norouteAction($coreRoute = null) Mage::dispatchEvent('controller_action_noroute', ['action' => $this, 'status' => $status]); if ($status->getLoaded() !== true || $status->getForwarded() === true - || !is_null($coreRoute)) { + || !is_null($coreRoute) + ) { $this->loadLayout(['default', 'noRoute']); $this->renderLayout(); } else { @@ -909,7 +910,8 @@ protected function _rewrite() protected function _validateFormKey() { if (!($formKey = $this->getRequest()->getParam('form_key', null)) - || $formKey != Mage::getSingleton('core/session')->getFormKey()) { + || $formKey != Mage::getSingleton('core/session')->getFormKey() + ) { return false; } return true; diff --git a/app/code/core/Mage/Core/Controller/Varien/Front.php b/app/code/core/Mage/Core/Controller/Varien/Front.php index 0b593631e5b..8f27b67934b 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Front.php +++ b/app/code/core/Mage/Core/Controller/Varien/Front.php @@ -327,6 +327,8 @@ protected function _processRewriteUrl($url) * By default this feature is enabled in configuration. * * @param Mage_Core_Controller_Request_Http $request + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ protected function _checkBaseUrl($request) { diff --git a/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php b/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php index 1f58cf0745a..e44e4f249e1 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php +++ b/app/code/core/Mage/Core/Controller/Varien/Router/Admin.php @@ -95,7 +95,7 @@ protected function _noRouteShouldBeApplied() protected function _shouldBeSecure($path) { return substr((string)Mage::getConfig()->getNode('default/web/unsecure/base_url'), 0, 5) === 'https' - || Mage::getStoreConfigFlag('web/secure/use_in_adminhtml', Mage_Core_Model_App::ADMIN_STORE_ID) + || Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_SECURE_IN_ADMINHTML, Mage_Core_Model_App::ADMIN_STORE_ID) && substr((string)Mage::getConfig()->getNode('default/web/secure/base_url'), 0, 5) === 'https'; } 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 96f90f7d993..2428d6f0adc 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php +++ b/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php @@ -389,7 +389,8 @@ public function getModuleByName($moduleName, $modules) { foreach ($modules as $module) { if ($moduleName === $module || (is_array($module) - && $this->getModuleByName($moduleName, $module))) { + && $this->getModuleByName($moduleName, $module)) + ) { return true; } } @@ -526,9 +527,9 @@ protected function _getCurrentSecureUrl($request) */ protected function _shouldBeSecure($path) { - return substr(Mage::getStoreConfig('web/unsecure/base_url'), 0, 5) === 'https' - || Mage::getStoreConfigFlag('web/secure/use_in_frontend') - && substr(Mage::getStoreConfig('web/secure/base_url'), 0, 5) == 'https' + return substr(Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL), 0, 5) === 'https' + || Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_SECURE_IN_FRONTEND) + && substr(Mage::getStoreConfig(Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL), 0, 5) == 'https' && Mage::getConfig()->shouldUrlBeSecure($path); } } diff --git a/app/code/core/Mage/Core/Helper/Array.php b/app/code/core/Mage/Core/Helper/Array.php index 160294c4673..f40a7ccec19 100644 --- a/app/code/core/Mage/Core/Helper/Array.php +++ b/app/code/core/Mage/Core/Helper/Array.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Helper/Data.php b/app/code/core/Mage/Core/Helper/Data.php index c1b2dddd994..88268a44dd2 100644 --- a/app/code/core/Mage/Core/Helper/Data.php +++ b/app/code/core/Mage/Core/Helper/Data.php @@ -335,6 +335,8 @@ public function getStoreId($store = null) * @param string $string * @param bool $german * @return false|string + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function removeAccents($string, $german = false) { @@ -391,7 +393,7 @@ public function removeAccents($string, $german = false) } /** - * @param int|null $storeId + * @param null|string|bool|int|Mage_Core_Model_Store $storeId * @return bool */ public function isDevAllowed($storeId = null) @@ -403,7 +405,8 @@ public function isDevAllowed($storeId = null) if (!empty($allowedIps) && !empty($remoteAddr)) { $allowedIps = preg_split('#\s*,\s*#', $allowedIps, -1, PREG_SPLIT_NO_EMPTY); if (array_search($remoteAddr, $allowedIps) === false - && array_search(Mage::helper('core/http')->getHttpHost(), $allowedIps) === false) { + && array_search(Mage::helper('core/http')->getHttpHost(), $allowedIps) === false + ) { $allow = false; } } @@ -460,7 +463,8 @@ public function getCacheBetaTypes() public function copyFieldset($fieldset, $aspect, $source, $target, $root = 'global') { if (!(is_array($source) || $source instanceof Varien_Object) - || !(is_array($target) || $target instanceof Varien_Object)) { + || !(is_array($target) || $target instanceof Varien_Object) + ) { return false; } $fields = Mage::getConfig()->getFieldset($fieldset, $root); @@ -761,6 +765,8 @@ public function uniqHash($prefix = '') * @param callable $beforeMergeCallback * @param array|string $extensionsFilter * @return bool|string + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function mergeFiles( array $srcFiles, diff --git a/app/code/core/Mage/Core/Helper/File/Storage.php b/app/code/core/Mage/Core/Helper/File/Storage.php index fa4144aa81e..33975e69646 100644 --- a/app/code/core/Mage/Core/Helper/File/Storage.php +++ b/app/code/core/Mage/Core/Helper/File/Storage.php @@ -33,7 +33,7 @@ class Mage_Core_Helper_File_Storage extends Mage_Core_Helper_Abstract /** * Current storage code * - * @var int + * @var int|null */ protected $_currentStorage = null; diff --git a/app/code/core/Mage/Core/Helper/File/Storage/Database.php b/app/code/core/Mage/Core/Helper/File/Storage/Database.php index 604f3efe787..3ff3d3208d8 100644 --- a/app/code/core/Mage/Core/Helper/File/Storage/Database.php +++ b/app/code/core/Mage/Core/Helper/File/Storage/Database.php @@ -32,13 +32,13 @@ class Mage_Core_Helper_File_Storage_Database extends Mage_Core_Helper_Abstract /** * Database storage model - * @var null|Mage_Core_Model_File_Storage_Database + * @var Mage_Core_Model_File_Storage_Database|null */ protected $_databaseModel = null; /** * Storage resource model - * @var Mage_Core_Model_Resource_File_Storage_Database + * @var Mage_Core_Model_Resource_File_Storage_Database|null */ protected $_resourceModel = null; diff --git a/app/code/core/Mage/Core/Helper/Http.php b/app/code/core/Mage/Core/Helper/Http.php index 586f5035f5e..266ccb96786 100644 --- a/app/code/core/Mage/Core/Helper/Http.php +++ b/app/code/core/Mage/Core/Helper/Http.php @@ -34,13 +34,13 @@ class Mage_Core_Helper_Http extends Mage_Core_Helper_Abstract /** * Remote address cache - * @var string + * @var string|null */ protected $_remoteAddr; /** * Validate and retrieve user and password from HTTP - * @param string|null $headers + * @param array|null $headers * @return array */ public function authValidate($headers = null) diff --git a/app/code/core/Mage/Core/Helper/Js.php b/app/code/core/Mage/Core/Helper/Js.php index 252f85a4cb2..98b07c266c9 100644 --- a/app/code/core/Mage/Core/Helper/Js.php +++ b/app/code/core/Mage/Core/Helper/Js.php @@ -50,7 +50,7 @@ class Mage_Core_Helper_Js extends Mage_Core_Helper_Abstract /** * Translate config * - * @var Varien_Simplexml_Config + * @var Varien_Simplexml_Config|null */ protected $_config = null; @@ -188,4 +188,62 @@ protected function _getXmlConfig() } return $this->_config; } + + /** + * Helper for "onclick.deleteConfirm" + * + * @param string $url + * @param string|null $message null for default message, do not use jsQuoteEscape() before + * @return string + * @uses Mage_Core_Helper_Abstract::jsQuoteEscape() + */ + public function getDeleteConfirmJs(string $url, ?string $message = null): string + { + if (is_null($message)) { + $message = Mage::helper('adminhtml')->__('Are you sure you want to do this?'); + } + + $message = Mage::helper('core')->jsQuoteEscape($message); + return 'deleteConfirm(\'' . $message . '\', \'' . $url . '\')'; + } + + /** + * Helper for "onclick.confirmSetLocation" + * + * @param string $url + * @param string|null $message null for default message, do not use jsQuoteEscape() before + * @return string + * @uses Mage_Core_Helper_Abstract::jsQuoteEscape() + */ + public function getConfirmSetLocationJs(string $url, ?string $message = null): string + { + if (is_null($message)) { + $message = Mage::helper('adminhtml')->__('Are you sure you want to do this?'); + } + + $message = Mage::helper('core')->jsQuoteEscape($message); + return "confirmSetLocation('{$message}', '{$url}')"; + } + + /** + * Helper for "onclick.setLocation" + * + * @param string $url + * @return string + */ + public function getSetLocationJs(string $url): string + { + return 'setLocation(\'' . $url . '\')'; + } + + /** + * Helper for "onclick.saveAndContinueEdit" + * + * @param string $url + * @return string + */ + public function getSaveAndContinueEditJs(string $url): string + { + return 'saveAndContinueEdit(\'' . $url . '\')'; + } } diff --git a/app/code/core/Mage/Core/Helper/Security.php b/app/code/core/Mage/Core/Helper/Security.php index f3ff5edaf32..dd533dea898 100644 --- a/app/code/core/Mage/Core/Helper/Security.php +++ b/app/code/core/Mage/Core/Helper/Security.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020-2021 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -47,7 +47,8 @@ public function validateAgainstBlockMethodBlacklist(Mage_Core_Block_Abstract $bl $calledMethod = strtolower($method); if (($block instanceof $action['block'] && strtolower($action['method']) === $calledMethod) || ($block instanceof $action['block'] - && strtolower($action['block'] . '::' . $action['method']) === $calledMethod)) { + && strtolower($action['block'] . '::' . $action['method']) === $calledMethod) + ) { Mage::throwException( sprintf('Action with combination block %s and method %s is forbidden.', get_class($block), $method) ); diff --git a/app/code/core/Mage/Core/Helper/Translate.php b/app/code/core/Mage/Core/Helper/Translate.php index af48fefb6bf..e98fd4c0b05 100644 --- a/app/code/core/Mage/Core/Helper/Translate.php +++ b/app/code/core/Mage/Core/Helper/Translate.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Helper/UnserializeArray.php b/app/code/core/Mage/Core/Helper/UnserializeArray.php index 95acb9df5aa..5d2f72836ac 100644 --- a/app/code/core/Mage/Core/Helper/UnserializeArray.php +++ b/app/code/core/Mage/Core/Helper/UnserializeArray.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Helper/Url/Rewrite.php b/app/code/core/Mage/Core/Helper/Url/Rewrite.php index 1bed4607be4..57c2a76e029 100644 --- a/app/code/core/Mage/Core/Helper/Url/Rewrite.php +++ b/app/code/core/Mage/Core/Helper/Url/Rewrite.php @@ -15,6 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) + * @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Model/Abstract.php b/app/code/core/Mage/Core/Model/Abstract.php index 294aea7bcc5..dbbe7823305 100644 --- a/app/code/core/Mage/Core/Model/Abstract.php +++ b/app/code/core/Mage/Core/Model/Abstract.php @@ -213,7 +213,7 @@ public function getIdFieldName() /** * Retrieve model object identifier * - * @return int|string + * @return int|string|null */ public function getId() { @@ -589,7 +589,7 @@ protected function _afterDeleteCommit() { Mage::dispatchEvent('model_delete_commit_after', ['object' => $this]); Mage::dispatchEvent($this->_eventPrefix . '_delete_commit_after', $this->_getEventData()); - return $this; + return $this; } /** diff --git a/app/code/core/Mage/Core/Model/App.php b/app/code/core/Mage/Core/Model/App.php index 4ae3a039af5..844b9ca7e77 100644 --- a/app/code/core/Mage/Core/Model/App.php +++ b/app/code/core/Mage/Core/Model/App.php @@ -92,14 +92,14 @@ class Mage_Core_Model_App /** * Application store object * - * @var Mage_Core_Model_Store + * @var Mage_Core_Model_Store|null */ protected $_store; /** * Application website object * - * @var Mage_Core_Model_Website + * @var Mage_Core_Model_Website|null */ protected $_website; @@ -589,13 +589,16 @@ protected function _checkCookieStore($type) $store = $this->getCookie()->get(Mage_Core_Model_Store::COOKIE_NAME); if ($store && isset($this->_stores[$store]) && $this->_stores[$store]->getId() - && $this->_stores[$store]->getIsActive()) { + && $this->_stores[$store]->getIsActive() + ) { if ($type == 'website' - && $this->_stores[$store]->getWebsiteId() == $this->_stores[$this->_currentStore]->getWebsiteId()) { + && $this->_stores[$store]->getWebsiteId() == $this->_stores[$this->_currentStore]->getWebsiteId() + ) { $this->_currentStore = $store; } if ($type == 'group' - && $this->_stores[$store]->getGroupId() == $this->_stores[$this->_currentStore]->getGroupId()) { + && $this->_stores[$store]->getGroupId() == $this->_stores[$this->_currentStore]->getGroupId() + ) { $this->_currentStore = $store; } if ($type == 'store') { @@ -749,7 +752,7 @@ protected function _getStoreByWebsite($website) /** * Set current default store * - * @param string $store + * @param null|string|bool|int|Mage_Core_Model_Store $store * @return $this */ public function setCurrentStore($store) @@ -828,7 +831,7 @@ public function getArea($code) * Retrieve application store object * * @param null|string|bool|int|Mage_Core_Model_Store $id - * @return Mage_Core_Model_Store + * @return Mage_Core_Model_Store|null * @throws Mage_Core_Model_Store_Exception */ public function getStore($id = null) @@ -933,7 +936,7 @@ protected function _getDefaultStore() /** * Retrieve default store for default group and website * - * @return Mage_Core_Model_Store + * @return Mage_Core_Model_Store|null */ public function getDefaultStoreView() { @@ -1162,7 +1165,7 @@ public function getCache() * Loading cache data * * @param string $id - * @return mixed + * @return string|false */ public function loadCache($id) { @@ -1428,6 +1431,10 @@ public function getUpdateMode() return $this->_updateMode; } + /** + * @param string $text + * @throws Mage_Core_Model_Store_Exception + */ public function throwStoreException($text = '') { throw new Mage_Core_Model_Store_Exception($text); diff --git a/app/code/core/Mage/Core/Model/App/Area.php b/app/code/core/Mage/Core/Model/App/Area.php index 42994e63b7a..751709193c1 100644 --- a/app/code/core/Mage/Core/Model/App/Area.php +++ b/app/code/core/Mage/Core/Model/App/Area.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Model/App/Emulation.php b/app/code/core/Mage/Core/Model/App/Emulation.php index 8cd94fdf7a2..0529d0a006b 100644 --- a/app/code/core/Mage/Core/Model/App/Emulation.php +++ b/app/code/core/Mage/Core/Model/App/Emulation.php @@ -162,7 +162,7 @@ protected function _emulateDesign($storeId, $area = Mage_Core_Model_App_Area::AR /** * Apply locale of the specified store * - * @param int $storeId + * @param null|string|bool|int|Mage_Core_Model_Store $storeId * @param string $area * * @return string initial locale code @@ -182,7 +182,7 @@ protected function _emulateLocale($storeId, $area = Mage_Core_Model_App_Area::AR * Retrieve config value for store by path * * @param string $path - * @param mixed $store + * @param null|string|bool|int|Mage_Core_Model_Store $store * @return mixed */ protected function _getStoreConfig($path, $store = null) diff --git a/app/code/core/Mage/Core/Model/Cache.php b/app/code/core/Mage/Core/Model/Cache.php index 695453c78a2..da554f3f310 100644 --- a/app/code/core/Mage/Core/Model/Cache.php +++ b/app/code/core/Mage/Core/Model/Cache.php @@ -96,7 +96,7 @@ class Mage_Core_Model_Cache /** * List of allowed cache options * - * @var array + * @var array|null */ protected $_allowedCacheOptions; @@ -366,7 +366,7 @@ public function getFrontend() * Load data from cache by id * * @param string $id - * @return string + * @return string|false */ public function load($id) { diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php index 4bb3bd4b044..d3b361f7181 100644 --- a/app/code/core/Mage/Core/Model/Config.php +++ b/app/code/core/Mage/Core/Model/Config.php @@ -181,7 +181,7 @@ class Mage_Core_Model_Config extends Mage_Core_Model_Config_Base * Resource model * Used for operations with DB * - * @var Mage_Core_Model_Resource_Config + * @var Mage_Core_Model_Resource_Config|null */ protected $_resourceModel; @@ -1013,9 +1013,9 @@ public function determineOmittedNamespace($name, $asFullModuleName = false) * specidied xml file name to one object * * @param string $fileName - * @param null|Mage_Core_Model_Config_Base $mergeToObject - * @param null $mergeModel - * @return Mage_Core_Model_Config_Base + * @param null|Mage_Core_Model_Config_Base|Varien_Simplexml_Config $mergeToObject + * @param Varien_Simplexml_Config|null $mergeModel + * @return Mage_Core_Model_Config_Base|Varien_Simplexml_Config */ public function loadModulesConfiguration($fileName, $mergeToObject = null, $mergeModel = null) { diff --git a/app/code/core/Mage/Core/Model/Config/Options.php b/app/code/core/Mage/Core/Model/Config/Options.php index ba2f4afc3ba..7a84d5353d4 100644 --- a/app/code/core/Mage/Core/Model/Config/Options.php +++ b/app/code/core/Mage/Core/Model/Config/Options.php @@ -263,6 +263,8 @@ public function getExportDir() /** * @param string $dir * @return bool + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function createDirIfNotExists($dir) { diff --git a/app/code/core/Mage/Core/Model/Convert.php b/app/code/core/Mage/Core/Model/Convert.php index 65ec5228f55..847488827ae 100644 --- a/app/code/core/Mage/Core/Model/Convert.php +++ b/app/code/core/Mage/Core/Model/Convert.php @@ -15,7 +15,7 @@ * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) - * @copyright Copyright (c) 2020 The OpenMage Contributors (https://www.openmage.org) + * @copyright Copyright (c) 2020-2022 The OpenMage Contributors (https://www.openmage.org) * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Core/Model/Cookie.php b/app/code/core/Mage/Core/Model/Cookie.php index baba27a6d22..566fea8624f 100644 --- a/app/code/core/Mage/Core/Model/Cookie.php +++ b/app/code/core/Mage/Core/Model/Cookie.php @@ -39,7 +39,7 @@ class Mage_Core_Model_Cookie /** * Store object * - * @var Mage_Core_Model_Store + * @var Mage_Core_Model_Store|null */ protected $_store; diff --git a/app/code/core/Mage/Core/Model/Date.php b/app/code/core/Mage/Core/Model/Date.php index f204e1659e1..b98f4e2bef7 100644 --- a/app/code/core/Mage/Core/Model/Date.php +++ b/app/code/core/Mage/Core/Model/Date.php @@ -67,6 +67,8 @@ protected function _getConfigTimezone() * * @param string $timezone * @return int offset between timezone and gmt + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public function calculateOffset($timezone = null) { diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index ab74581e6ee..184b9238f50 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -49,7 +49,7 @@ class Mage_Core_Model_Design_Package /** * Package area * - * @var string + * @var string|null */ protected $_area; @@ -82,12 +82,12 @@ class Mage_Core_Model_Design_Package protected $_callbackFileDir; /** - * @var Mage_Core_Model_Design_Config + * @var Mage_Core_Model_Design_Config|null */ protected $_config = null; /** - * @var Mage_Core_Model_Design_Fallback + * @var Mage_Core_Model_Design_Fallback|null */ protected $_fallback = null; @@ -659,6 +659,8 @@ protected function _checkUserAgentAgainstRegexps($regexpsConfigPath) * @param array $rules - design exception rules * @param string $regexpsConfigPath * @return bool|string + * + * @SuppressWarnings(PHPMD.ErrorControlOperator) */ public static function getPackageByUserAgent(array $rules, $regexpsConfigPath = 'path_mock') { diff --git a/app/code/core/Mage/Core/Model/Email/Template.php b/app/code/core/Mage/Core/Model/Email/Template.php index 7f18739df76..b30d0ba5014 100644 --- a/app/code/core/Mage/Core/Model/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Email/Template.php @@ -340,8 +340,8 @@ public function getProcessedTemplate(array $variables = []) * @return string */ /** - * @param null $html - * @return null|string + * @param string|null $html + * @return string */ public function getPreparedTemplateText($html = 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 1036692f6c2..6213e12bd20 100644 --- a/app/code/core/Mage/Core/Model/Email/Template/Abstract.php +++ b/app/code/core/Mage/Core/Model/Email/Template/Abstract.php @@ -197,13 +197,10 @@ protected function _applyInlineCss($html) // Only run Emogrify if HTML exists if (strlen($html) && $inlineCssFile) { $cssToInline = $this->_getCssFileContent($inlineCssFile); - $emogrifier = new Pelago_Emogrifier(); - $emogrifier->setHtml($html); - $emogrifier->setCss($cssToInline); - // Don't parse inline '; - - return $style; - } - - /** - * Render DjConfig values - * - * @return string - */ - protected function _renderDjConfig() - { - $djConfigValues = $this->getDjConfig(); - if (empty($djConfigValues)) { - return ''; - } - - #require_once 'Zend/Json.php'; - $scriptTag = ''; - - return $scriptTag; - } - - /** - * Render dojo script tag - * - * Renders Dojo script tag by utilizing either local path provided or the - * CDN. If any djConfig values were set, they will be serialized and passed - * with that attribute. - * - * @return string - */ - protected function _renderDojoScriptTag() - { - if ($this->useCdn()) { - $source = $this->getCdnBase() - . $this->getCdnVersion() - . $this->getCdnDojoPath(); - } else { - $source = $this->getLocalPath(); - } - - $scriptTag = ''; - return $scriptTag; - } - - /** - * Render layers (custom builds) as script tags - * - * @return string - */ - protected function _renderLayers() - { - $layers = $this->getLayers(); - if (empty($layers)) { - return ''; - } - - $enc = 'UTF-8'; - if ($this->view instanceof Zend_View_Interface - && method_exists($this->view, 'getEncoding') - ) { - $enc = $this->view->getEncoding(); - } - - $html = array(); - foreach ($layers as $path) { - $html[] = sprintf( - '', - htmlspecialchars($path, ENT_QUOTES, $enc) - ); - } - - return implode("\n", $html); - } - - /** - * Render dojo module paths and requires - * - * @return string - */ - protected function _renderExtras() - { - $js = array(); - $modulePaths = $this->getModulePaths(); - if (!empty($modulePaths)) { - foreach ($modulePaths as $module => $path) { - $js[] = 'dojo.registerModulePath("' . $this->view->escape($module) . '", "' . $this->view->escape($path) . '");'; - } - } - - $modules = $this->getModules(); - if (!empty($modules)) { - foreach ($modules as $module) { - $js[] = 'dojo.require("' . $this->view->escape($module) . '");'; - } - } - - $onLoadActions = array(); - // Get Zend specific onLoad actions; these will always be first to - // ensure that dijits are created in the correct order - foreach ($this->_getZendLoadActions() as $callback) { - $onLoadActions[] = 'dojo.addOnLoad(' . $callback . ');'; - } - - // Get all other onLoad actions - foreach ($this->getOnLoadActions() as $callback) { - $onLoadActions[] = 'dojo.addOnLoad(' . $callback . ');'; - } - - $javascript = implode("\n ", $this->getJavascript()); - - $content = ''; - if (!empty($js)) { - $content .= implode("\n ", $js) . "\n"; - } - - if (!empty($onLoadActions)) { - $content .= implode("\n ", $onLoadActions) . "\n"; - } - - if (!empty($javascript)) { - $content .= $javascript . "\n"; - } - - if (preg_match('/^\s*$/s', $content)) { - return ''; - } - - $html = ''; - return $html; - } - - /** - * Add an onLoad action related to ZF dijit creation - * - * This method is public, but prefixed with an underscore to indicate that - * it should not normally be called by userland code. It is pertinent to - * ensuring that the correct order of operations occurs during dijit - * creation. - * - * @param string $callback - * @return Zend_Dojo_View_Helper_Dojo_Container - */ - public function _addZendLoad($callback) - { - if (!in_array($callback, $this->_zendLoadActions, true)) { - $this->_zendLoadActions[] = $callback; - } - return $this; - } - - /** - * Retrieve all ZF dijit callbacks - * - * @return array - */ - public function _getZendLoadActions() - { - return $this->_zendLoadActions; - } -} diff --git a/lib/Zend/Dojo/View/Helper/Editor.php b/lib/Zend/Dojo/View/Helper/Editor.php deleted file mode 100644 index 1430a02fe30..00000000000 --- a/lib/Zend/Dojo/View/Helper/Editor.php +++ /dev/null @@ -1,199 +0,0 @@ - 'LinkDialog', - 'insertImage' => 'LinkDialog', - 'fontName' => 'FontChoice', - 'fontSize' => 'FontChoice', - 'formatBlock' => 'FontChoice', - 'foreColor' => 'TextColor', - 'hiliteColor' => 'TextColor', - 'enterKeyHandling' => 'EnterKeyHandling', - 'fullScreen' => 'FullScreen', - 'newPage' => 'NewPage', - 'print' => 'Print', - 'tabIndent' => 'TabIndent', - 'toggleDir' => 'ToggleDir', - 'viewSource' => 'ViewSource' - ); - - /** - * JSON-encoded parameters - * @var array - */ - protected $_jsonParams = array('captureEvents', 'events', 'plugins', 'extraPlugins'); - - /** - * dijit.Editor - * - * @param string $id - * @param string $value - * @param array $params - * @param array $attribs - * @return string - */ - public function editor($id, $value = null, $params = array(), $attribs = array()) - { - if (isset($params['plugins'])) { - foreach ($this->_getRequiredModules($params['plugins']) as $module) { - $this->dojo->requireModule($module); - } - } - - // Previous versions allowed specifying "degrade" to allow using a - // textarea instead of a div -- but this is insecure. Removing the - // parameter if set to prevent its injection in the dijit. - if (isset($params['degrade'])) { - unset($params['degrade']); - } - - $hiddenName = $id; - if (array_key_exists('id', $attribs)) { - $hiddenId = $attribs['id']; - } else { - $hiddenId = $hiddenName; - } - $hiddenId = $this->_normalizeId($hiddenId); - - $textareaName = $this->_normalizeEditorName($hiddenName); - $textareaId = $hiddenId . '-Editor'; - - $hiddenAttribs = array( - 'id' => $hiddenId, - 'name' => $hiddenName, - 'value' => $value, - 'type' => 'hidden', - ); - $attribs['id'] = $textareaId; - - $this->_createGetParentFormFunction(); - $this->_createEditorOnSubmit($hiddenId, $textareaId); - - $attribs = $this->_prepareDijit($attribs, $params, 'textarea'); - - $html = '_htmlAttribs($attribs) . '>' - . $value - . "\n"; - - // Embed a textarea in a