From 7900fce6d58155db8d1a15ed5fc2c2fb60e1cd73 Mon Sep 17 00:00:00 2001 From: Kevin Jakob Date: Thu, 4 Aug 2022 14:40:19 +0200 Subject: [PATCH 1/4] refactor: Adjusted capitalization of two public methods. --- app/code/core/Mage/Catalog/Block/Category/View.php | 6 +++--- .../base/default/template/catalog/category/view.phtml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/code/core/Mage/Catalog/Block/Category/View.php b/app/code/core/Mage/Catalog/Block/Category/View.php index 743effb41a5..2240b9b418a 100644 --- a/app/code/core/Mage/Catalog/Block/Category/View.php +++ b/app/code/core/Mage/Catalog/Block/Category/View.php @@ -60,7 +60,7 @@ protected function _prepareLayout() /* want to show rss feed in the url */ - if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) { + if ($this->isRssCatalogEnable() && $this->isTopCategory()) { $title = $this->helper('rss')->__('%s RSS Feed', $this->getCurrentCategory()->getName()); $headBlock->addItem('rss', $this->getRssLink(), 'title="'.$title.'"'); } @@ -72,7 +72,7 @@ protected function _prepareLayout() /** * @return string */ - public function IsRssCatalogEnable() + public function isRssCatalogEnable() { return Mage::getStoreConfig('rss/catalog/category'); } @@ -80,7 +80,7 @@ public function IsRssCatalogEnable() /** * @return bool */ - public function IsTopCategory() + public function isTopCategory() { return $this->getCurrentCategory()->getLevel()==2; } diff --git a/app/design/frontend/base/default/template/catalog/category/view.phtml b/app/design/frontend/base/default/template/catalog/category/view.phtml index 4a748657290..9cbacf2213a 100644 --- a/app/design/frontend/base/default/template/catalog/category/view.phtml +++ b/app/design/frontend/base/default/template/catalog/category/view.phtml @@ -28,7 +28,7 @@ /** * Category view template * - * @see Mage_Catalog_Block_Category_View + * @var Mage_Catalog_Block_Category_View $this */ ?>
- IsRssCatalogEnable() && $this->IsTopCategory()): ?> + isRssCatalogEnable() && $this->isTopCategory()): ?> __('Subscribe to RSS Feed') ?>

categoryAttribute($_category, $_category->getName(), 'name') ?>

From 0a9926b4e1667671b2aaf58f24fd14f7e5ed7394 Mon Sep 17 00:00:00 2001 From: Kevin Jakob Date: Thu, 4 Aug 2022 14:41:35 +0200 Subject: [PATCH 2/4] refactor: Adjusted capitalization of one protected method. --- lib/Varien/Io/File.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Varien/Io/File.php b/lib/Varien/Io/File.php index 946b072f9cb..d35bc5971d7 100644 --- a/lib/Varien/Io/File.php +++ b/lib/Varien/Io/File.php @@ -254,7 +254,7 @@ public function streamClose() if ($this->_streamLocked) { $this->streamUnlock(); } - if ($this->_IsValidSource($this->_streamHandler)) { + if ($this->_isValidSource($this->_streamHandler)) { @fclose($this->_streamHandler); } $this->chmod($this->_streamFileName, $this->_streamChmod); @@ -466,7 +466,7 @@ public function read($filename, $dest=null) */ public function write($filename, $src, $mode=null) { - if (!$this->_IsValidSource($src) || !$this->_isFilenameWriteable($filename)) { + if (!$this->_isValidSource($src) || !$this->_isFilenameWriteable($filename)) { return false; } @@ -491,7 +491,7 @@ public function write($filename, $src, $mode=null) * @param string|resource $src * @return bool */ - protected function _IsValidSource($src) + protected function _isValidSource($src) { // In case of a string if (is_string($src)) { From bd8b40c6abe606d885d229d5506768b31b749304 Mon Sep 17 00:00:00 2001 From: Kevin Jakob Date: Thu, 4 Aug 2022 14:43:45 +0200 Subject: [PATCH 3/4] refactor: Adjusted capitalization of where call. --- app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php b/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php index 04f439b1414..17b07d0f880 100644 --- a/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php +++ b/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php @@ -127,7 +127,7 @@ public function loadByCustomer(Mage_Customer_Model_Customer $customer) $select = $this->_read->select() ->from($this->getMainTable()) ->where('subscriber_email=:subscriber_email') - ->Where('store_id=:store_id'); + ->where('store_id=:store_id'); $result = $this->_read->fetchRow( $select, From 19db6111ddb187889c432b474fc83cddc4e15311 Mon Sep 17 00:00:00 2001 From: Kevin Jakob Date: Thu, 4 Aug 2022 16:43:31 +0200 Subject: [PATCH 4/4] chore: Removed fixed error from phpstan baseline. --- .github/phpstan-baseline.neon | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/phpstan-baseline.neon b/.github/phpstan-baseline.neon index b9793e3ee90..d491be91d22 100644 --- a/.github/phpstan-baseline.neon +++ b/.github/phpstan-baseline.neon @@ -5435,11 +5435,6 @@ parameters: count: 2 path: ../app/code/core/Mage/Newsletter/Model/Resource/Queue.php - - - message: "#^Call to method Zend_Db_Select\\:\\:where\\(\\) with incorrect case\\: Where$#" - count: 1 - path: ../app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php - - message: "#^Call to an undefined method Mage_Customer_Model_Entity_Attribute\\:\\:getAttributeId\\(\\)\\.$#" count: 3