Completed
Push — v5 ( 954df3...2bb146 )
by Georges
03:29
created
src/phpFastCache/CacheManager.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -47,22 +47,22 @@  discard block
 block discarded – undo
47 47
      * @var array
48 48
      */
49 49
     public static $config = [
50
-      'default_chmod' => 0777, // 0777 , 0666, 0644
50
+        'default_chmod' => 0777, // 0777 , 0666, 0644
51 51
 
52
-      'overwrite' => "", // files, sqlite, etc it will overwrite ur storage and all other caching for waiting u fix ur server
53
-      'allow_search' => false, // turn to true will allow $method search("/regex/")
52
+        'overwrite' => "", // files, sqlite, etc it will overwrite ur storage and all other caching for waiting u fix ur server
53
+        'allow_search' => false, // turn to true will allow $method search("/regex/")
54 54
 
55
-      'fallback' => 'files', //Fall back when old driver is not support
55
+        'fallback' => 'files', //Fall back when old driver is not support
56 56
 
57
-      'securityKey' => 'auto',
58
-      'htaccess' => true,
59
-      'path' => '',
57
+        'securityKey' => 'auto',
58
+        'htaccess' => true,
59
+        'path' => '',
60 60
 
61 61
 
62
-      'extensions' => [],
63
-      "cache_method" => 2, // 1 = normal, 2 = phpfastcache, 3 = memory
64
-      "limited_memory_each_object" => 4000, // maximum size (bytes) of object store in memory
65
-      "compress_data" => false, // compress stored data, if the backend supports it
62
+        'extensions' => [],
63
+        "cache_method" => 2, // 1 = normal, 2 = phpfastcache, 3 = memory
64
+        "limited_memory_each_object" => 4000, // maximum size (bytes) of object store in memory
65
+        "compress_data" => false, // compress stored data, if the backend supports it
66 66
     ];
67 67
 
68 68
     /**
@@ -107,21 +107,21 @@  discard block
 block discarded – undo
107 107
     {
108 108
         static $autoDriver;
109 109
         $systemDrivers = [
110
-          'Sqlite',
111
-          'Files',
112
-          'Apc',
113
-          'Apcu',
114
-          'Memcache',
115
-          'Memcached',
116
-          'Couchbase',
117
-          'Mongodb',
118
-          'Predis',
119
-          'Redis',
120
-          'Ssdb',
121
-          'Leveldb',
122
-          'Wincache',
123
-          'Xcache',
124
-          'Devnull',
110
+            'Sqlite',
111
+            'Files',
112
+            'Apc',
113
+            'Apcu',
114
+            'Memcache',
115
+            'Memcached',
116
+            'Couchbase',
117
+            'Mongodb',
118
+            'Predis',
119
+            'Redis',
120
+            'Ssdb',
121
+            'Leveldb',
122
+            'Wincache',
123
+            'Xcache',
124
+            'Devnull',
125 125
         ];
126 126
 
127 127
         if ($autoDriver === null) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         $instance = crc32($driver . serialize($config));
90
-        if (!isset(self::$instances[ $instance ])) {
90
+        if (!isset(self::$instances[$instance])) {
91 91
             $class = self::getNamespacePath() . $driver . '\Driver';
92
-            self::$instances[ $instance ] = new $class($config);
92
+            self::$instances[$instance] = new $class($config);
93 93
         } else {
94 94
             trigger_error('Calling CacheManager::getInstance for already instanced drivers is a bad practice and have a significant impact on performances.
95 95
             See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F');
96 96
         }
97 97
 
98
-        return self::$instances[ $instance ];
98
+        return self::$instances[$instance];
99 99
     }
100 100
 
101 101
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public static function __callStatic($name, $arguments)
147 147
     {
148
-        $options = (array_key_exists(0, $arguments) && is_array($arguments) ? $arguments[ 0 ] : []);
148
+        $options = (array_key_exists(0, $arguments) && is_array($arguments) ? $arguments[0] : []);
149 149
 
150 150
         return self::getInstance($name, $options);
151 151
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         if (is_array($name)) {
188 188
             self::$config = array_merge(self::$config, $name);
189 189
         } else {
190
-            self::$config[ $name ] = $value;
190
+            self::$config[$name] = $value;
191 191
         }
192 192
     }
193 193
 }
Please login to merge, or discard this patch.