Skip to content

Commit b6ca483

Browse files
Merge pull request #1072 from nexcess/scrutinizer-patch-2
Scrutinizer Auto-Fixes
2 parents abb5b94 + e7a3244 commit b6ca483

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

app/code/community/Nexcessnet/Turpentine/Helper/Data.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,16 @@ public function getChildBlockNames($blockNode) {
231231
* @param string|object $model
232232
* @return string
233233
*/
234-
public function getModelName( $model ) {
235-
if( is_object( $model ) ) {
236-
$model = get_class( $model );
234+
public function getModelName($model) {
235+
if (is_object($model)) {
236+
$model = get_class($model);
237237
}
238238
// This guess may work if the extension uses its lowercased name as model group name.
239-
$result = strtolower( preg_replace(
240-
'~^[^_]+_([^_]+)_Model_(.+)$~', '$1/$2', $model ) );
239+
$result = strtolower(preg_replace(
240+
'~^[^_]+_([^_]+)_Model_(.+)$~', '$1/$2', $model ));
241241
// This check is not expensive because the answer should come from Magento's classNameCache
242242
$checkModel = Mage::getConfig()->getModelClassName($result);
243-
if ( 'Mage_' == substr($checkModel,0,5) && !class_exists($result) ) {
243+
if ('Mage_' == substr($checkModel, 0, 5) && ! class_exists($result)) {
244244
// Fallback to full model name.
245245
$result = $model;
246246
}

app/code/community/Nexcessnet/Turpentine/Model/Observer/Varnish.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function addProductListToolbarRewrite($eventObject) {
6565
*/
6666
public function fixCmRedisSessionLocks($eventObject) {
6767
if (Mage::helper('core')->isModuleEnabled('Cm_RedisSession')) {
68-
if (!empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend']) {
68+
if ( ! empty($_COOKIE['frontend']) && 'crawler-session' == $_COOKIE['frontend']) {
6969
define('CM_REDISSESSION_LOCKING_ENABLED', false);
7070
}
7171
}

app/code/community/Nexcessnet/Turpentine/controllers/Adminhtml/CacheController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
/**
3-
4-
* Date: 08/01/14
5-
*/
3+
4+
* Date: 08/01/14
5+
*/
66

77
require_once Mage::getModuleDir('controllers', 'Mage_Adminhtml').DS.'CacheController.php';
88

0 commit comments

Comments
 (0)