diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index e078a040ebe..420390adadc 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -45,4 +45,4 @@ jobs: - name: PHPCodeSniffer run: php vendor/bin/phpcs -s --report=full --standard=${{ matrix.rules.path }} - continue-on-error: ${{ matrix.rules.path != '.phpcs.xml.dist' }} + continue-on-error: ${{ matrix.rules.path == '.phpcs.ecg.xml.dist' }} diff --git a/app/code/core/Mage/Catalog/Helper/Image.php b/app/code/core/Mage/Catalog/Helper/Image.php index 0809ccd6eac..3939a00d2a6 100644 --- a/app/code/core/Mage/Catalog/Helper/Image.php +++ b/app/code/core/Mage/Catalog/Helper/Image.php @@ -266,9 +266,10 @@ public function constrainOnly($flag) */ public function backgroundColor($colorRGB) { + $args = func_get_args(); // assume that 3 params were given instead of array if (!is_array($colorRGB)) { - $colorRGB = func_get_args(); + $colorRGB = $args; } $this->_getModel()->setBackgroundColor($colorRGB); return $this; diff --git a/app/code/core/Mage/Core/Block/Abstract.php b/app/code/core/Mage/Core/Block/Abstract.php index f33b14a031e..3d9baa02ea9 100644 --- a/app/code/core/Mage/Core/Block/Abstract.php +++ b/app/code/core/Mage/Core/Block/Abstract.php @@ -513,9 +513,9 @@ public function unsetChild($alias) */ public function unsetCallChild($alias, $callback, $result, $params) { + $args = func_get_args(); $child = $this->getChild($alias); if ($child) { - $args = func_get_args(); $alias = array_shift($args); $callback = array_shift($args); $result = (string)array_shift($args); diff --git a/app/code/core/Mage/Core/Block/Template/Facade.php b/app/code/core/Mage/Core/Block/Template/Facade.php index 764f03903ca..6437feb2013 100644 --- a/app/code/core/Mage/Core/Block/Template/Facade.php +++ b/app/code/core/Mage/Core/Block/Template/Facade.php @@ -61,8 +61,9 @@ public function setDataByKeyFromRegistry($key, $registryKey) */ public function ifEquals($conditionKeys) { + $args = func_get_args(); if (!is_array($conditionKeys)) { - $conditionKeys = func_get_args(); + $conditionKeys = $args; } // evaluate conditions (equality) diff --git a/app/code/core/Mage/Oauth/Model/Consumer/Validator/KeyLength.php b/app/code/core/Mage/Oauth/Model/Consumer/Validator/KeyLength.php index 7a76430e5de..ac4a2f9b13e 100644 --- a/app/code/core/Mage/Oauth/Model/Consumer/Validator/KeyLength.php +++ b/app/code/core/Mage/Oauth/Model/Consumer/Validator/KeyLength.php @@ -35,8 +35,9 @@ class Mage_Oauth_Model_Consumer_Validator_KeyLength extends Zend_Validate_String */ public function __construct($options = []) { + $args = func_get_args(); if (!is_array($options)) { - $options = func_get_args(); + $options = $args; if (!isset($options[1])) { $options[1] = 'utf-8'; }