From 8689eb3d6a33e68f801e4656530ee2e4430ed7c6 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 22 Apr 2023 17:15:03 +0100 Subject: [PATCH 1/5] Removed stubs, not necessary --- phpstan.dist.neon | 3 --- 1 file changed, 3 deletions(-) diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 5bb1048fdfd..eb99f86b075 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -71,9 +71,6 @@ parameters: # Instantiated class not found - lib/Varien/Image/Adapter.php - stubFiles: - - dev/phpstan/stubs/Zend_Captcha_Word.stub - - dev/phpstan/stubs/Zend_Validate_InArray.stub level: 4 checkFunctionNameCase: true checkInternalClassCaseSensitivity: true From ac4ea3d10b6ed1022d19fa51cdcd18a903349f7b Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 22 Apr 2023 17:17:13 +0100 Subject: [PATCH 2/5] Removed stubs, not necessary --- dev/phpstan/stubs/Zend_Captcha_Word.stub | 11 ----------- dev/phpstan/stubs/Zend_Validate_InArray.stub | 9 --------- 2 files changed, 20 deletions(-) delete mode 100644 dev/phpstan/stubs/Zend_Captcha_Word.stub delete mode 100644 dev/phpstan/stubs/Zend_Validate_InArray.stub diff --git a/dev/phpstan/stubs/Zend_Captcha_Word.stub b/dev/phpstan/stubs/Zend_Captcha_Word.stub deleted file mode 100644 index b1b60b63f70..00000000000 --- a/dev/phpstan/stubs/Zend_Captcha_Word.stub +++ /dev/null @@ -1,11 +0,0 @@ -|null - */ - protected $_messageTemplates; -} From 60cae5f2b164f6d65cb81c2d42b8dd7ea9bfffaf Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 22 Apr 2023 17:24:56 +0100 Subject: [PATCH 3/5] Fixed docblock for Mage_Eav_Model_Adminhtml_System_Config_Source_Inputtype_Validator --- .../Adminhtml/System/Config/Source/Inputtype/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php b/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php index 842d962c88c..177018a4d3b 100644 --- a/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php +++ b/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php @@ -22,7 +22,7 @@ class Mage_Eav_Model_Adminhtml_System_Config_Source_Inputtype_Validator extends Zend_Validate_InArray { /** - * @var array|null + * @inheritdoc */ protected $_messageTemplates; From b285d1cd53eece29c23844cfb885f2017706c1cf Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 22 Apr 2023 17:31:24 +0100 Subject: [PATCH 4/5] Fixed docblock for Mage_Captcha_Model_Zend --- app/code/core/Mage/Captcha/Model/Zend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Captcha/Model/Zend.php b/app/code/core/Mage/Captcha/Model/Zend.php index 1da978abf2d..8a7223e657a 100644 --- a/app/code/core/Mage/Captcha/Model/Zend.php +++ b/app/code/core/Mage/Captcha/Model/Zend.php @@ -64,7 +64,7 @@ class Mage_Captcha_Model_Zend extends Zend_Captcha_Image implements Mage_Captcha /** * Generated word * - * @var string|null + * @var string */ protected $_word; From b907d9a413ba06e4503dc343e7b72d9bb9ea3637 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sat, 22 Apr 2023 17:36:53 +0100 Subject: [PATCH 5/5] Fixed reset values --- app/code/core/Mage/Captcha/Model/Zend.php | 2 +- .../Adminhtml/System/Config/Source/Inputtype/Validator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/Captcha/Model/Zend.php b/app/code/core/Mage/Captcha/Model/Zend.php index 8a7223e657a..c7142e783a6 100644 --- a/app/code/core/Mage/Captcha/Model/Zend.php +++ b/app/code/core/Mage/Captcha/Model/Zend.php @@ -483,7 +483,7 @@ protected function _setWord($word) protected function _clearWord() { $this->getSession()->unsetData($this->_getFormIdKey(self::SESSION_WORD)); - $this->_word = null; + $this->_word = ''; return $this; } diff --git a/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php b/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php index 177018a4d3b..55f5257bf79 100644 --- a/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php +++ b/app/code/core/Mage/Eav/Model/Adminhtml/System/Config/Source/Inputtype/Validator.php @@ -34,7 +34,7 @@ public function __construct() $haystack = $helper->getInputTypesValidatorData(); //reset message template and set custom - $this->_messageTemplates = null; + $this->_messageTemplates = []; $this->_initMessageTemplates(); //parent construct with options