| @@ -130,7 +130,7 @@ discard block | ||
| 130 | 130 | * | 
| 131 | 131 | * @return string | 
| 132 | 132 | */ | 
| 133 | -    protected function _getCustomIncludeFilename($position='') { | |
| 133 | +    protected function _getCustomIncludeFilename($position = '') { | |
| 134 | 134 | $key = 'custom_include_file'; | 
| 135 | 135 | $key .= ($position) ? '_'.$position : ''; | 
| 136 | 136 | return $this->_formatTemplate( | 
| @@ -192,8 +192,8 @@ discard block | ||
| 192 | 192 | */ | 
| 193 | 193 |      protected function _getAdminFrontname() { | 
| 194 | 194 |          if (Mage::getStoreConfig('admin/url/use_custom_path')) { | 
| 195 | -            if(Mage::getStoreConfig('web/url/use_store')) { | |
| 196 | -                return Mage::getModel('core/store')->load(0)->getCode() . "/" . Mage::getStoreConfig('admin/url/custom_path'); | |
| 195 | +            if (Mage::getStoreConfig('web/url/use_store')) { | |
| 196 | +                return Mage::getModel('core/store')->load(0)->getCode()."/".Mage::getStoreConfig('admin/url/custom_path'); | |
| 197 | 197 |              } else { | 
| 198 | 198 |                  return Mage::getStoreConfig('admin/url/custom_path'); | 
| 199 | 199 | } | 
| @@ -907,8 +907,8 @@ discard block | ||
| 907 | 907 | */ | 
| 908 | 908 |      protected function _vcl_sub_https_redirect_fix() { | 
| 909 | 909 | $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); | 
| 910 | -        $baseUrl = str_replace(array('http://','https://'), '', $baseUrl); | |
| 911 | - $baseUrl = rtrim($baseUrl,'/'); | |
| 910 | +        $baseUrl = str_replace(array('http://', 'https://'), '', $baseUrl); | |
| 911 | + $baseUrl = rtrim($baseUrl, '/'); | |
| 912 | 912 | |
| 913 | 913 |          switch (Mage::getStoreConfig('turpentine_varnish/servers/version')) { | 
| 914 | 914 | case 4.0: | 
| @@ -978,7 +978,7 @@ discard block | ||
| 978 | 978 |      { | 
| 979 | 979 | $tpl = $this->_vcl_sub_synth(); | 
| 980 | 980 | |
| 981 | -        if(!$tpl){ | |
| 981 | +        if ( ! $tpl) { | |
| 982 | 982 | $tpl = <<<EOS | 
| 983 | 983 |  sub vcl_synth { | 
| 984 | 984 |      if (resp.status == 750) { | 
| @@ -988,7 +988,7 @@ discard block | ||
| 988 | 988 | } | 
| 989 | 989 | } | 
| 990 | 990 | EOS; | 
| 991 | -        }else{ | |
| 991 | +        } else { | |
| 992 | 992 | $tpl_750 = ' | 
| 993 | 993 |  sub vcl_synth { | 
| 994 | 994 |      if (resp.status == 750) { | 
| @@ -1085,12 +1085,12 @@ discard block | ||
| 1085 | 1085 | |
| 1086 | 1086 |          if (Mage::getStoreConfig('turpentine_varnish/general/https_redirect_fix')) { | 
| 1087 | 1087 | $vars['https_redirect'] = $this->_vcl_sub_https_redirect_fix(); | 
| 1088 | -            if(Mage::getStoreConfig('turpentine_varnish/servers/version') == '4.0'){ | |
| 1088 | +            if (Mage::getStoreConfig('turpentine_varnish/servers/version') == '4.0') { | |
| 1089 | 1089 | $vars['vcl_synth'] = $this->_vcl_sub_synth_https_fix(); | 
| 1090 | 1090 | } | 
| 1091 | 1091 | } | 
| 1092 | 1092 | |
| 1093 | -        foreach (array('','top') as $position) { | |
| 1093 | +        foreach (array('', 'top') as $position) { | |
| 1094 | 1094 | $customIncludeFile = $this->_getCustomIncludeFilename($position); | 
| 1095 | 1095 |              if (is_readable($customIncludeFile)) { | 
| 1096 | 1096 | $key = 'custom_vcl_include'; | 
| @@ -150,8 +150,7 @@ discard block | ||
| 150 | 150 |              Mage::getStoreConfig('turpentine_varnish/servers/custom_vcl_template'), | 
| 151 | 151 |              array('root_dir' => Mage::getBaseDir()) | 
| 152 | 152 | ); | 
| 153 | -        if (is_file($filePath)) { return $filePath; } | |
| 154 | -        else { return null; } | |
| 153 | +        if (is_file($filePath)) { return $filePath; } else { return null; } | |
| 155 | 154 | } | 
| 156 | 155 | |
| 157 | 156 | |
| @@ -988,7 +987,7 @@ discard block | ||
| 988 | 987 | } | 
| 989 | 988 | } | 
| 990 | 989 | EOS; | 
| 991 | -        }else{ | |
| 990 | +        } else{ | |
| 992 | 991 | $tpl_750 = ' | 
| 993 | 992 |  sub vcl_synth { | 
| 994 | 993 |      if (resp.status == 750) { |