Completed
Push — final ( 2c495c...348f76 )
by Georges
07:33 queued 03:45
created
src/phpFastCache/Core/phpFastCache.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -47,42 +47,42 @@  discard block
 block discarded – undo
47 47
      * @var array
48 48
      */
49 49
     public static $config = array(
50
-      'storage' => '', // blank for auto
51
-      'default_chmod' => 0777, // 0777 , 0666, 0644
50
+        'storage' => '', // blank for auto
51
+        'default_chmod' => 0777, // 0777 , 0666, 0644
52 52
 
53
-      'overwrite'  =>  "", // files, sqlite, etc it will overwrite ur storage and all other caching for waiting u fix ur server
54
-      'allow_search'   =>  false, // turn to true will allow $method search("/regex/")
53
+        'overwrite'  =>  "", // files, sqlite, etc it will overwrite ur storage and all other caching for waiting u fix ur server
54
+        'allow_search'   =>  false, // turn to true will allow $method search("/regex/")
55 55
 
56
-      'fallback' => 'files', //Fall back when old driver is not support
56
+        'fallback' => 'files', //Fall back when old driver is not support
57 57
 
58
-      'securityKey' => 'auto',
59
-      'htaccess' => true,
60
-      'path' => '',
58
+        'securityKey' => 'auto',
59
+        'htaccess' => true,
60
+        'path' => '',
61 61
 
62
-      'memcache' => array(
62
+        'memcache' => array(
63 63
         array('127.0.0.1', 11211, 1),
64
-          //  array("new.host.ip",11211,1),
65
-      ),
64
+            //  array("new.host.ip",11211,1),
65
+        ),
66 66
 
67
-      'redis' => array(
67
+        'redis' => array(
68 68
         'host' => '127.0.0.1',
69 69
         'port' => '',
70 70
         'password' => '',
71 71
         'database' => '',
72 72
         'timeout' => '',
73
-      ),
73
+        ),
74 74
 
75
-      'ssdb' => array(
75
+        'ssdb' => array(
76 76
         'host' => '127.0.0.1',
77 77
         'port' => 8888,
78 78
         'password' => '',
79 79
         'timeout' => '',
80
-      ),
80
+        ),
81 81
 
82
-      'extensions' => array(),
83
-      "cache_method"    =>  1, // 1 = normal, 2 = phpfastcache, 3 = memory
84
-      "limited_memory_each_object"  =>  4000, // maximum size (bytes) of object store in memory
85
-      "compress_data" => false // compress stored data, if the backend supports it
82
+        'extensions' => array(),
83
+        "cache_method"    =>  1, // 1 = normal, 2 = phpfastcache, 3 = memory
84
+        "limited_memory_each_object"  =>  4000, // maximum size (bytes) of object store in memory
85
+        "compress_data" => false // compress stored data, if the backend supports it
86 86
     );
87 87
 
88 88
     /**
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
         }
178 178
 
179 179
         $securityKey = array_key_exists('securityKey',
180
-          $config) ? $config[ 'securityKey' ] : '';
180
+            $config) ? $config[ 'securityKey' ] : '';
181 181
         if ($securityKey == "" || $securityKey == 'auto') {
182 182
             $securityKey = self::$config[ 'securityKey' ];
183 183
             if ($securityKey == 'auto' || $securityKey == '') {
184 184
                 $securityKey = isset($_SERVER[ 'HTTP_HOST' ]) ? preg_replace('/^www./',
185
-                  '', strtolower(str_replace(':', '_', $_SERVER[ 'HTTP_HOST' ]))) : "default";
185
+                    '', strtolower(str_replace(':', '_', $_SERVER[ 'HTTP_HOST' ]))) : "default";
186 186
             }
187 187
         }
188 188
         if ($securityKey != '') {
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
     public static function cleanFileName($filename)
235 235
     {
236 236
         $regex = array(
237
-          '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/',
238
-          '/\.$/',
239
-          '/^\./',
237
+            '/[\?\[\]\/\\\=\<\>\:\;\,\'\"\&\$\#\*\(\)\|\~\`\!\{\}]/',
238
+            '/\.$/',
239
+            '/^\./',
240 240
         );
241 241
         $replace = array('-', '', '');
242 242
         return trim(preg_replace($regex, $replace, trim($filename)),'-');
@@ -261,10 +261,10 @@  discard block
 block discarded – undo
261 261
     protected static function getOS()
262 262
     {
263 263
         $os = array(
264
-          'os' => PHP_OS,
265
-          'php' => PHP_SAPI,
266
-          'system' => php_uname(),
267
-          'unique' => md5(php_uname() . PHP_OS . PHP_SAPI),
264
+            'os' => PHP_OS,
265
+            'php' => PHP_SAPI,
266
+            'system' => php_uname(),
267
+            'unique' => md5(php_uname() . PHP_OS . PHP_SAPI),
268 268
         );
269 269
         return $os;
270 270
     }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
                     chmod($path, 0777);
299 299
                 } catch (phpFastCacheDriverException $e) {
300 300
                     throw new phpFastCacheDriverException('PLEASE CHMOD ' . $path . ' - 0777 OR ANY WRITABLE PERMISSION!',
301
-                      92);
301
+                        92);
302 302
                 }
303 303
             }
304 304
 
Please login to merge, or discard this patch.