Completed
Push — v5 ( 6b59f3...1fb1de )
by Georges
02:45
created
src/phpFastCache/Drivers/Apcu/Driver.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,9 +152,9 @@
 block discarded – undo
152 152
         $stats = (array) apc_cache_info('user');
153 153
         $date = (new \DateTime())->setTimestamp($stats['start_time']);
154 154
         return (new driverStatistic())
155
-          ->setData(implode(', ', array_keys($this->itemInstances)))
156
-          ->setInfo(sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), $stats['num_entries']))
157
-          ->setRawData($stats)
158
-          ->setSize($stats['mem_size']);
155
+            ->setData(implode(', ', array_keys($this->itemInstances)))
156
+            ->setInfo(sprintf("The APCU cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822), $stats['num_entries']))
157
+            ->setRawData($stats)
158
+            ->setSize($stats['mem_size']);
159 159
     }
160 160
 }
161 161
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Devfalse/Driver.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,9 +140,9 @@
 block discarded – undo
140 140
     {
141 141
         $stat = new driverStatistic();
142 142
         $stat->setInfo('[Devfalse] A void info string')
143
-          ->setSize(0)
144
-          ->setData(implode(', ', array_keys($this->itemInstances)))
145
-          ->setRawData(false);
143
+            ->setSize(0)
144
+            ->setData(implode(', ', array_keys($this->itemInstances)))
145
+            ->setRawData(false);
146 146
 
147 147
         return $stat;
148 148
     }
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Memcached/Driver.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         $servers = (!empty($this->config[ 'memcache' ]) && is_array($this->config[ 'memcache' ]) ? $this->config[ 'memcache' ] : []);
132 132
         if (count($servers) < 1) {
133 133
             $servers = [
134
-              ['127.0.0.1', 11211],
134
+                ['127.0.0.1', 11211],
135 135
             ];
136 136
         }
137 137
 
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
         $stats = (array) $this->instance->getstats();
179 179
         $date = (new \DateTime())->setTimestamp(time() - $stats['uptime']);
180 180
         return (new driverStatistic())
181
-          ->setData(implode(', ', array_keys($this->itemInstances)))
182
-          ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822)))
183
-          ->setRawData($stats)
184
-          ->setSize($stats['bytes']);
181
+            ->setData(implode(', ', array_keys($this->itemInstances)))
182
+            ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822)))
183
+            ->setRawData($stats)
184
+            ->setSize($stats['bytes']);
185 185
     }
186 186
 }
187 187
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function driverConnect()
129 129
     {
130
-        $servers = (!empty($this->config[ 'memcache' ]) && is_array($this->config[ 'memcache' ]) ? $this->config[ 'memcache' ] : []);
130
+        $servers = (!empty($this->config['memcache']) && is_array($this->config['memcache']) ? $this->config['memcache'] : []);
131 131
         if (count($servers) < 1) {
132 132
             $servers = [
133 133
               ['127.0.0.1', 11211],
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         foreach ($servers as $server) {
138 138
             try {
139
-                if (!$this->instance->addServer($server[ 0 ], $server[ 1 ])) {
139
+                if (!$this->instance->addServer($server[0], $server[1])) {
140 140
                     $this->fallback = true;
141 141
                 }
142 142
             } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Devnull/Driver.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,9 +140,9 @@
 block discarded – undo
140 140
     {
141 141
         $stat = new driverStatistic();
142 142
         $stat->setInfo('[Devnull] A void info string')
143
-          ->setSize(0)
144
-          ->setData(implode(', ', array_keys($this->itemInstances)))
145
-          ->setRawData(null);
143
+            ->setSize(0)
144
+            ->setData(implode(', ', array_keys($this->itemInstances)))
145
+            ->setRawData(null);
146 146
 
147 147
         return $stat;
148 148
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
     /**
59 59
      * @param \Psr\Cache\CacheItemInterface $item
60
-     * @return mixed
60
+     * @return boolean
61 61
      * @throws \InvalidArgumentException
62 62
      */
63 63
     public function driverWrite(CacheItemInterface $item)
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Mongodb/Driver.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     /**
55 55
      * @param \Psr\Cache\CacheItemInterface $item
56
-     * @return mixed
56
+     * @return boolean
57 57
      * @throws \InvalidArgumentException
58 58
      */
59 59
     public function driverWrite(CacheItemInterface $item)
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     /**
114 114
      * @param \Psr\Cache\CacheItemInterface $item
115
-     * @return bool
115
+     * @return boolean|null
116 116
      * @throws \InvalidArgumentException
117 117
      */
118 118
     public function driverIsHit(CacheItemInterface $item)
Please login to merge, or discard this patch.
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
         if ($item instanceof Item) {
79 79
             try {
80 80
                 $result = (array) $this->getCollection()->update(
81
-                  ['_id' => $item->getKey()],
82
-                  [
81
+                    ['_id' => $item->getKey()],
82
+                    [
83 83
                     '$set' => [
84
-                      self::DRIVER_TIME_WRAPPER_INDEX => ($item->getTtl() > 0 ? new MongoDate(time() + $item->getTtl()) : new MongoDate(time())),
85
-                      self::DRIVER_DATA_WRAPPER_INDEX => new MongoBinData($this->encode($item->get()), MongoBinData::BYTE_ARRAY),
86
-                      self::DRIVER_TAGS_WRAPPER_INDEX => new MongoBinData($this->encode($item->getTags()), MongoBinData::BYTE_ARRAY),
84
+                        self::DRIVER_TIME_WRAPPER_INDEX => ($item->getTtl() > 0 ? new MongoDate(time() + $item->getTtl()) : new MongoDate(time())),
85
+                        self::DRIVER_DATA_WRAPPER_INDEX => new MongoBinData($this->encode($item->get()), MongoBinData::BYTE_ARRAY),
86
+                        self::DRIVER_TAGS_WRAPPER_INDEX => new MongoBinData($this->encode($item->getTags()), MongoBinData::BYTE_ARRAY),
87 87
                     ],
88
-                  ],
89
-                  ['upsert' => true, 'multiple' => false]
88
+                    ],
89
+                    ['upsert' => true, 'multiple' => false]
90 90
                 );
91 91
             } catch (MongoCursorException $e) {
92 92
                 return false;
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 
109 109
         if ($document) {
110 110
             return [
111
-              self::DRIVER_DATA_WRAPPER_INDEX => $this->decode($document[ self::DRIVER_DATA_WRAPPER_INDEX ]->bin),
112
-              self::DRIVER_TIME_WRAPPER_INDEX => (new \DateTime())->setTimestamp($document[ self::DRIVER_TIME_WRAPPER_INDEX ]->sec),
113
-              self::DRIVER_TAGS_WRAPPER_INDEX => $this->decode($document[ self::DRIVER_TAGS_WRAPPER_INDEX ]->bin),
111
+                self::DRIVER_DATA_WRAPPER_INDEX => $this->decode($document[ self::DRIVER_DATA_WRAPPER_INDEX ]->bin),
112
+                self::DRIVER_TIME_WRAPPER_INDEX => (new \DateTime())->setTimestamp($document[ self::DRIVER_TIME_WRAPPER_INDEX ]->sec),
113
+                self::DRIVER_TAGS_WRAPPER_INDEX => $this->decode($document[ self::DRIVER_TAGS_WRAPPER_INDEX ]->bin),
114 114
             ];
115 115
         } else {
116 116
             return null;
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
              * @todo make an url builder
166 166
              */
167 167
             $this->instance = $this->instance ?: (new MongodbClient('mongodb://' .
168
-              ($username ?: '') .
169
-              ($password ? ":{$password}" : '') .
170
-              ($username ? '@' : '') . "{$host}" .
171
-              ($port != '27017' ? ":{$port}" : ''), ['connectTimeoutMS' => $timeout * 1000]))->phpFastCache;
168
+                ($username ?: '') .
169
+                ($password ? ":{$password}" : '') .
170
+                ($username ? '@' : '') . "{$host}" .
171
+                ($port != '27017' ? ":{$port}" : ''), ['connectTimeoutMS' => $timeout * 1000]))->phpFastCache;
172 172
             // $this->instance->Cache->createIndex([self::DRIVER_TIME_WRAPPER_INDEX => 1], ['expireAfterSeconds' => 0]);
173 173
         }
174 174
     }
@@ -194,25 +194,25 @@  discard block
 block discarded – undo
194 194
     public function getStats()
195 195
     {
196 196
         $serverStatus = $this->getCollection()->db->command([
197
-          'serverStatus' => 1,
198
-          'recordStats' => 0,
199
-          'repl' => 0,
200
-          'metrics' => 0,
197
+            'serverStatus' => 1,
198
+            'recordStats' => 0,
199
+            'repl' => 0,
200
+            'metrics' => 0,
201 201
         ]);
202 202
 
203 203
         $collStats = $this->getCollection()->db->command([
204
-          'collStats' => 'Cache',
205
-          'verbose' => true,
204
+            'collStats' => 'Cache',
205
+            'verbose' => true,
206 206
         ]);
207 207
 
208 208
         $stats = (new driverStatistic())
209
-          ->setInfo('MongoDB version ' . $serverStatus[ 'version' ] . ', Uptime (in days): ' . round($serverStatus[ 'uptime' ] / 86400, 1) . "\n For more information see RawData.")
210
-          ->setSize((int) @$collStats[ 'size' ])
211
-          ->setData(implode(', ', array_keys($this->itemInstances)))
212
-          ->setRawData([
209
+            ->setInfo('MongoDB version ' . $serverStatus[ 'version' ] . ', Uptime (in days): ' . round($serverStatus[ 'uptime' ] / 86400, 1) . "\n For more information see RawData.")
210
+            ->setSize((int) @$collStats[ 'size' ])
211
+            ->setData(implode(', ', array_keys($this->itemInstances)))
212
+            ->setRawData([
213 213
             'serverStatus' => $serverStatus,
214 214
             'collStats' => $collStats,
215
-          ]);
215
+            ]);
216 216
 
217 217
         return $stats;
218 218
     }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 return false;
93 93
             }
94 94
 
95
-            return isset($result[ 'ok' ]) ? $result[ 'ok' ] == 1 : true;
95
+            return isset($result['ok']) ? $result['ok'] == 1 : true;
96 96
         } else {
97 97
             throw new \InvalidArgumentException('Cross-Driver type confusion detected');
98 98
         }
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 
109 109
         if ($document) {
110 110
             return [
111
-              self::DRIVER_DATA_WRAPPER_INDEX => $this->decode($document[ self::DRIVER_DATA_WRAPPER_INDEX ]->bin),
112
-              self::DRIVER_TIME_WRAPPER_INDEX => (new \DateTime())->setTimestamp($document[ self::DRIVER_TIME_WRAPPER_INDEX ]->sec),
113
-              self::DRIVER_TAGS_WRAPPER_INDEX => $this->decode($document[ self::DRIVER_TAGS_WRAPPER_INDEX ]->bin),
111
+              self::DRIVER_DATA_WRAPPER_INDEX => $this->decode($document[self::DRIVER_DATA_WRAPPER_INDEX]->bin),
112
+              self::DRIVER_TIME_WRAPPER_INDEX => (new \DateTime())->setTimestamp($document[self::DRIVER_TIME_WRAPPER_INDEX]->sec),
113
+              self::DRIVER_TAGS_WRAPPER_INDEX => $this->decode($document[self::DRIVER_TAGS_WRAPPER_INDEX]->bin),
114 114
             ];
115 115
         } else {
116 116
             return null;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         if ($item instanceof Item) {
131 131
             $deletionResult = (array) $this->getCollection()->remove(['_id' => $item->getKey()], ["w" => 1]);
132 132
 
133
-            return (int) $deletionResult[ 'ok' ] === 1 && !$deletionResult[ 'err' ];
133
+            return (int) $deletionResult['ok'] === 1 && !$deletionResult['err'];
134 134
         } else {
135 135
             throw new \InvalidArgumentException('Cross-Driver type confusion detected');
136 136
         }
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
         if ($this->instance instanceof MongodbClient) {
155 155
             throw new LogicException('Already connected to Mongodb server');
156 156
         } else {
157
-            $host = isset($this->config[ 'host' ]) ? $this->config[ 'host' ] : '127.0.0.1';
158
-            $port = isset($server[ 'port' ]) ? $server[ 'port' ] : '27017';
159
-            $timeout = isset($server[ 'timeout' ]) ? $server[ 'timeout' ] : 3;
160
-            $password = isset($this->config[ 'password' ]) ? $this->config[ 'password' ] : '';
161
-            $username = isset($this->config[ 'username' ]) ? $this->config[ 'username' ] : '';
157
+            $host = isset($this->config['host']) ? $this->config['host'] : '127.0.0.1';
158
+            $port = isset($server['port']) ? $server['port'] : '27017';
159
+            $timeout = isset($server['timeout']) ? $server['timeout'] : 3;
160
+            $password = isset($this->config['password']) ? $this->config['password'] : '';
161
+            $username = isset($this->config['username']) ? $this->config['username'] : '';
162 162
 
163 163
 
164 164
             /**
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
         ]);
207 207
 
208 208
         $stats = (new driverStatistic())
209
-          ->setInfo('MongoDB version ' . $serverStatus[ 'version' ] . ', Uptime (in days): ' . round($serverStatus[ 'uptime' ] / 86400, 1) . "\n For more information see RawData.")
210
-          ->setSize((int) @$collStats[ 'size' ])
209
+          ->setInfo('MongoDB version ' . $serverStatus['version'] . ', Uptime (in days): ' . round($serverStatus['uptime'] / 86400, 1) . "\n For more information see RawData.")
210
+          ->setSize((int) @$collStats['size'])
211 211
           ->setData(implode(', ', array_keys($this->itemInstances)))
212 212
           ->setRawData([
213 213
             'serverStatus' => $serverStatus,
Please login to merge, or discard this patch.
src/phpFastCache/Cache/ItemBaseTrait.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function setHit($isHit)
116 116
     {
117
-        if(is_bool($isHit)){
117
+        if (is_bool($isHit)) {
118 118
             $this->isHit = $isHit;
119 119
             return $this;
120
-        }else{
120
+        } else {
121 121
             throw new \InvalidArgumentException('$isHit must be a boolean');
122 122
         }
123 123
     }
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     public function removeTag($tagName)
370 370
     {
371 371
         if (($key = array_search($tagName, $this->tags)) !== false) {
372
-            unset($this->tags[ $key ]);
372
+            unset($this->tags[$key]);
373 373
             $this->removedTags[] = $tagName;
374 374
         }
375 375
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     final public function __debugInfo()
416 416
     {
417 417
         $info = get_object_vars($this);
418
-        $info[ 'driver' ] = 'object(' . get_class($info[ 'driver' ]) . ')';
418
+        $info['driver'] = 'object(' . get_class($info['driver']) . ')';
419 419
 
420 420
         return (array) $info;
421 421
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
         
274 274
         if (!is_dir($path)) {
275 275
             throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94);
276
-        }else{
276
+        } else{
277 277
             $size = Directory::dirSize($path);
278 278
         }
279 279
 
Please login to merge, or discard this patch.
src/phpFastCache/Drivers/Wincache/Driver.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,9 +132,9 @@
 block discarded – undo
132 132
         $date = (new \DateTime())->setTimestamp(time() - $info['total_cache_uptime']);
133 133
 
134 134
         return (new driverStatistic())
135
-          ->setInfo(sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822)))
136
-          ->setSize($memInfo['memory_free'] - $memInfo['memory_total'])
137
-          ->setData(implode(', ', array_keys($this->itemInstances)))
138
-          ->setRawData($memInfo);
135
+            ->setInfo(sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822)))
136
+            ->setSize($memInfo['memory_free'] - $memInfo['memory_total'])
137
+            ->setData(implode(', ', array_keys($this->itemInstances)))
138
+            ->setRawData($memInfo);
139 139
     }
140 140
 }
141 141
\ No newline at end of file
Please login to merge, or discard this patch.
src/phpFastCache/CacheManager.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
      * @var array
53 53
      */
54 54
     public static $config = [
55
-      'default_chmod' => 0777, // 0777 recommended
56
-      'fallback' => 'files', //Fall back when old driver is not support
57
-      'securityKey' => 'auto',
58
-      'htaccess' => true,
59
-      'path' => '',// if not set will be the value of sys_get_temp_dir()
60
-      "limited_memory_each_object" => 4096, // maximum size (bytes) of object store in memory
61
-      "compress_data" => false, // compress stored data, if the backend supports it
55
+        'default_chmod' => 0777, // 0777 recommended
56
+        'fallback' => 'files', //Fall back when old driver is not support
57
+        'securityKey' => 'auto',
58
+        'htaccess' => true,
59
+        'path' => '',// if not set will be the value of sys_get_temp_dir()
60
+        "limited_memory_each_object" => 4096, // maximum size (bytes) of object store in memory
61
+        "compress_data" => false, // compress stored data, if the backend supports it
62 62
     ];
63 63
 
64 64
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $class = self::getNamespacePath() . $driver . '\Driver';
93 93
             self::$instances[ $instance ] = new $class($config);
94 94
         } else if(++$badPracticeOmeter[$driver] >= 5){
95
-           trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
95
+            trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
96 96
            See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F');
97 97
         }
98 98
 
@@ -181,21 +181,21 @@  discard block
 block discarded – undo
181 181
     public static function getStaticSystemDrivers()
182 182
     {
183 183
         return [
184
-          'Sqlite',
185
-          'Files',
186
-          'Apc',
187
-          'Apcu',
188
-          'Memcache',
189
-          'Memcached',
190
-          'Couchbase',
191
-          'Mongodb',
192
-          'Predis',
193
-          'Redis',
194
-          'Ssdb',
195
-          'Leveldb',
196
-          'Wincache',
197
-          'Xcache',
198
-          'Devnull',
184
+            'Sqlite',
185
+            'Files',
186
+            'Apc',
187
+            'Apcu',
188
+            'Memcache',
189
+            'Memcached',
190
+            'Couchbase',
191
+            'Mongodb',
192
+            'Predis',
193
+            'Redis',
194
+            'Ssdb',
195
+            'Leveldb',
196
+            'Wincache',
197
+            'Xcache',
198
+            'Devnull',
199 199
         ];
200 200
     }
201 201
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
       'fallback' => 'files', //Fall back when old driver is not support
57 57
       'securityKey' => 'auto',
58 58
       'htaccess' => true,
59
-      'path' => '',// if not set will be the value of sys_get_temp_dir()
59
+      'path' => '', // if not set will be the value of sys_get_temp_dir()
60 60
       "limited_memory_each_object" => 4096, // maximum size (bytes) of object store in memory
61 61
       "compress_data" => false, // compress stored data, if the backend supports it
62 62
     ];
@@ -87,16 +87,16 @@  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
             $badPracticeOmeter[$driver] = 1;
92 92
             $class = self::getNamespacePath() . $driver . '\Driver';
93
-            self::$instances[ $instance ] = new $class($config);
94
-        } else if(++$badPracticeOmeter[$driver] >= 5){
93
+            self::$instances[$instance] = new $class($config);
94
+        } else if (++$badPracticeOmeter[$driver] >= 5) {
95 95
            trigger_error('[' . $driver . '] Calling many times CacheManager::getInstance() for already instanced drivers is a bad practice and have a significant impact on performances.
96 96
            See https://github.com/PHPSocialNetwork/phpfastcache/wiki/[V5]-Why-calling-getInstance%28%29-each-time-is-a-bad-practice-%3F');
97 97
         }
98 98
 
99
-        return self::$instances[ $instance ];
99
+        return self::$instances[$instance];
100 100
     }
101 101
 
102 102
     /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public static function __callStatic($name, $arguments)
131 131
     {
132
-        $options = (array_key_exists(0, $arguments) && is_array($arguments) ? $arguments[ 0 ] : []);
132
+        $options = (array_key_exists(0, $arguments) && is_array($arguments) ? $arguments[0] : []);
133 133
 
134 134
         return self::getInstance($name, $options);
135 135
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         if (is_array($name)) {
172 172
             self::$config = array_merge(self::$config, $name);
173 173
         } else {
174
-            self::$config[ $name ] = $value;
174
+            self::$config[$name] = $value;
175 175
         }
176 176
     }
177 177
 
Please login to merge, or discard this patch.
tests/Psr6InterfaceImplements.test.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 if (!is_object($driverInstance)) {
24 24
     echo '[FAIL] CacheManager::getInstance() returned an invalid variable type:' . gettype($driverInstance) . "\n";
25 25
     $status = 1;
26
-}else if(!($driverInstance instanceof CacheItemPoolInterface)){
26
+} else if (!($driverInstance instanceof CacheItemPoolInterface)) {
27 27
     echo '[FAIL] CacheManager::getInstance() returned an invalid class:' . get_class($driverInstance) . "\n";
28 28
     $status = 1;
29
-}else{
29
+} else {
30 30
     echo '[PASS] CacheManager::getInstance() returned a valid CacheItemPoolInterface object: ' . get_class($driverInstance) . "\n";
31 31
 }
32 32
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
 if (!is_object($driverInstance)) {
24 24
     echo '[FAIL] CacheManager::getInstance() returned an invalid variable type:' . gettype($driverInstance) . "\n";
25 25
     $status = 1;
26
-}else if(!($driverInstance instanceof CacheItemPoolInterface)){
26
+} else if(!($driverInstance instanceof CacheItemPoolInterface)){
27 27
     echo '[FAIL] CacheManager::getInstance() returned an invalid class:' . get_class($driverInstance) . "\n";
28 28
     $status = 1;
29
-}else{
29
+} else{
30 30
     echo '[PASS] CacheManager::getInstance() returned a valid CacheItemPoolInterface object: ' . get_class($driverInstance) . "\n";
31 31
 }
32 32
 
Please login to merge, or discard this patch.