From e7a32446e3514c8efc742b2ad14ce1ba8660ced3 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Thu, 14 Jan 2016 14:02:00 +0000 Subject: [PATCH] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- .../community/Nexcessnet/Turpentine/Helper/Data.php | 12 ++++++------ .../Nexcessnet/Turpentine/Model/Observer/Varnish.php | 2 +- .../controllers/Adminhtml/CacheController.php | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/code/community/Nexcessnet/Turpentine/Helper/Data.php b/app/code/community/Nexcessnet/Turpentine/Helper/Data.php index 6515feee9..a357b7a47 100644 --- a/app/code/community/Nexcessnet/Turpentine/Helper/Data.php +++ b/app/code/community/Nexcessnet/Turpentine/Helper/Data.php @@ -231,16 +231,16 @@ public function getChildBlockNames($blockNode) { * @param string|object $model * @return string */ - public function getModelName( $model ) { - if( is_object( $model ) ) { - $model = get_class( $model ); + public function getModelName($model) { + if (is_object($model)) { + $model = get_class($model); } // This guess may work if the extension uses its lowercased name as model group name. - $result = strtolower( preg_replace( - '~^[^_]+_([^_]+)_Model_(.+)$~', '$1/$2', $model ) ); + $result = strtolower(preg_replace( + '~^[^_]+_([^_]+)_Model_(.+)$~', '$1/$2', $model )); // This check is not expensive because the answer should come from Magento's classNameCache $checkModel = Mage::getConfig()->getModelClassName($result); - if ( 'Mage_' == substr($checkModel,0,5) && !class_exists($result) ) { + if ('Mage_' == substr($checkModel, 0, 5) && ! class_exists($result)) { // Fallback to full model name. $result = $model; } diff --git a/app/code/community/Nexcessnet/Turpentine/Model/Observer/Varnish.php b/app/code/community/Nexcessnet/Turpentine/Model/Observer/Varnish.php index be6ecb3cc..7eb51c4e3 100644 --- a/app/code/community/Nexcessnet/Turpentine/Model/Observer/Varnish.php +++ b/app/code/community/Nexcessnet/Turpentine/Model/Observer/Varnish.php @@ -65,7 +65,7 @@ public function addProductListToolbarRewrite($eventObject) { */ public function fixCmRedisSessionLocks($eventObject) { if (Mage::helper('core')->isModuleEnabled('Cm_RedisSession')) { - if (!empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend']) { + if ( ! empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend']) { define('CM_REDISSESSION_LOCKING_ENABLED', false); } } diff --git a/app/code/community/Nexcessnet/Turpentine/controllers/Adminhtml/CacheController.php b/app/code/community/Nexcessnet/Turpentine/controllers/Adminhtml/CacheController.php index 561e4c930..9beb94935 100644 --- a/app/code/community/Nexcessnet/Turpentine/controllers/Adminhtml/CacheController.php +++ b/app/code/community/Nexcessnet/Turpentine/controllers/Adminhtml/CacheController.php @@ -1,8 +1,8 @@