Passed
Push — v7 ( ebd842...f31319 )
by Georges
01:32
created
lib/Phpfastcache/Helper/Psr16Adapter.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 use Phpfastcache\Core\Item\ExtendedCacheItemInterface;
20 20
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheDriverCheckException, PhpfastcacheInvalidArgumentException, PhpfastcacheRootException, PhpfastcacheSimpleCacheException
22
+    PhpfastcacheDriverCheckException, PhpfastcacheInvalidArgumentException, PhpfastcacheRootException, PhpfastcacheSimpleCacheException
23 23
 };
24 24
 use Psr\SimpleCache\CacheInterface;
25 25
 
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
     {
77 77
         try {
78 78
             $cacheItem = $this->internalCacheInstance
79
-              ->getItem($key)
80
-              ->set($value);
79
+                ->getItem($key)
80
+                ->set($value);
81 81
             if (\is_int($ttl) && $ttl <= 0) {
82 82
                 $cacheItem->expiresAt((new \DateTime('@0')));
83 83
             } elseif (\is_int($ttl) || $ttl instanceof \DateInterval) {
Please login to merge, or discard this patch.
lib/Phpfastcache/Config/ConfigurationOption.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
          */
95 95
         if(array_diff_key($array, get_object_vars($this))){
96 96
             throw new PhpfastcacheInvalidConfigurationException(sprintf(
97
-              'Invalid option(s) for the config %s: %s',
98
-              static::class,
99
-              implode(', ',  array_keys(array_diff_key($array, get_object_vars($this))))
97
+                'Invalid option(s) for the config %s: %s',
98
+                static::class,
99
+                implode(', ',  array_keys(array_diff_key($array, get_object_vars($this))))
100 100
             ));
101 101
         }
102 102
 
@@ -128,10 +128,10 @@  discard block
 block discarded – undo
128 128
                     $typeHintExpected = ($parameter instanceof \ReflectionParameter ? ($parameter->getType() === 'object' ? $parameter->getClass() : $parameter->getType()) : 'Unknown type');
129 129
 
130 130
                     throw new PhpfastcacheInvalidConfigurationException(sprintf(
131
-                      'Invalid type hint found for "%s", expected "%s" got "%s"',
132
-                      lcfirst(substr($method, 3)),
133
-                      $typeHintExpected,
134
-                      $typeHintGot
131
+                        'Invalid type hint found for "%s", expected "%s" got "%s"',
132
+                        lcfirst(substr($method, 3)),
133
+                        $typeHintExpected,
134
+                        $typeHintGot
135 135
                     ));
136 136
                 }
137 137
             }
@@ -396,10 +396,10 @@  discard block
 block discarded – undo
396 396
          * by opening a pull request :)
397 397
          */
398 398
         static $safeFileExtensions = [
399
-          'txt',
400
-          'cache',
401
-          'db',
402
-          'pfc',
399
+            'txt',
400
+            'cache',
401
+            'db',
402
+            'pfc',
403 403
         ];
404 404
 
405 405
         if (\strpos($cacheFileExtension, '.') !== false) {
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
         }
408 408
         if (!\in_array($cacheFileExtension, $safeFileExtensions, true)) {
409 409
             throw new PhpfastcacheInvalidConfigurationException(
410
-              "{$cacheFileExtension} is not a safe extension, currently allowed extension: " . \implode(', ', $safeFileExtensions)
410
+                "{$cacheFileExtension} is not a safe extension, currently allowed extension: " . \implode(', ', $safeFileExtensions)
411 411
             );
412 412
         }
413 413
 
Please login to merge, or discard this patch.
lib/Phpfastcache/CacheManager.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Phpfastcache\Config\ConfigurationOption;
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Exceptions\{
21
-  PhpfastcacheDeprecatedException, PhpfastcacheDriverCheckException, PhpfastcacheDriverNotFoundException, PhpfastcacheInstanceNotFoundException, PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidConfigurationException
21
+    PhpfastcacheDeprecatedException, PhpfastcacheDriverCheckException, PhpfastcacheDriverNotFoundException, PhpfastcacheInstanceNotFoundException, PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidConfigurationException
22 22
 };
23 23
 
24 24
 /**
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
         if (is_array($config)) {
100 100
             $config = new ConfigurationOption($config);
101 101
             trigger_error(
102
-              'The CacheManager will drops the support of primitive configuration arrays, use a "\Phpfastcache\Config\ConfigurationOption" object instead',
103
-              E_USER_DEPRECATED
102
+                'The CacheManager will drops the support of primitive configuration arrays, use a "\Phpfastcache\Config\ConfigurationOption" object instead',
103
+                E_USER_DEPRECATED
104 104
             );
105 105
         }elseif ($config === null){
106 106
             $config = self::getDefaultConfig();
@@ -291,27 +291,27 @@  discard block
 block discarded – undo
291 291
          * @todo Reflection reader
292 292
          */
293 293
         return [
294
-          'Apc',
295
-          'Apcu',
296
-          'Cassandra',
297
-          'Couchbase',
298
-          'Couchdb',
299
-          'Devnull',
300
-          'Files',
301
-          'Leveldb',
302
-          'Memcache',
303
-          'Memcached',
304
-          'Memstatic',
305
-          'Mongodb',
306
-          'Predis',
307
-          'Redis',
308
-          'Riak',
309
-          'Ssdb',
310
-          'Sqlite',
311
-          'Wincache',
312
-          'Xcache',
313
-          'Zenddisk',
314
-          'Zendshm',
294
+            'Apc',
295
+            'Apcu',
296
+            'Cassandra',
297
+            'Couchbase',
298
+            'Couchdb',
299
+            'Devnull',
300
+            'Files',
301
+            'Leveldb',
302
+            'Memcache',
303
+            'Memcached',
304
+            'Memstatic',
305
+            'Mongodb',
306
+            'Predis',
307
+            'Redis',
308
+            'Riak',
309
+            'Ssdb',
310
+            'Sqlite',
311
+            'Wincache',
312
+            'Xcache',
313
+            'Zenddisk',
314
+            'Zendshm',
315 315
         ];
316 316
     }
317 317
 
@@ -324,9 +324,9 @@  discard block
 block discarded – undo
324 324
          * @todo Reflection reader
325 325
          */
326 326
         return \array_merge(self::getStaticSystemDrivers(), [
327
-          'Devtrue',
328
-          'Devfalse',
329
-          'Cookie',
327
+            'Devtrue',
328
+            'Devfalse',
329
+            'Cookie',
330 330
         ]);
331 331
     }
332 332
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Ssdb/Driver.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface};
19 19
 use Phpfastcache\Entities\DriverStatistic;
20 20
 use Phpfastcache\Exceptions\{
21
-  PhpfastcacheInvalidArgumentException, PhpfastcacheDriverCheckException, PhpfastcacheDriverException
21
+    PhpfastcacheInvalidArgumentException, PhpfastcacheDriverCheckException, PhpfastcacheDriverException
22 22
 };
23 23
 use Phpfastcache\Util\ArrayObject;
24 24
 use phpssdb\Core\{SimpleSSDB, SSDBException};
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
          * using hardcoded offset of pair key-value :-(
148 148
          */
149 149
         $stat->setInfo(\sprintf("Ssdb-server v%s with a total of %s call(s).\n For more information see RawData.", $info[ 2 ], $info[ 6 ]))
150
-          ->setRawData($info)
151
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
152
-          ->setSize($this->instance->dbsize());
150
+            ->setRawData($info)
151
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
152
+            ->setSize($this->instance->dbsize());
153 153
 
154 154
         return $stat;
155 155
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Ssdb/Item.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
20 20
 use Phpfastcache\Drivers\Ssdb\Driver as SsdbDriver;
21 21
 use Phpfastcache\Exceptions\{
22
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23 23
 };
24 24
 
25 25
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zendshm/Driver.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 use Phpfastcache\Core\Pool\{DriverBaseTrait, ExtendedCacheItemPoolInterface};
18 18
 use Phpfastcache\Entities\DriverStatistic;
19 19
 use Phpfastcache\Exceptions\{
20
-  PhpfastcacheInvalidArgumentException
20
+    PhpfastcacheInvalidArgumentException
21 21
 };
22 22
 use Psr\Cache\CacheItemInterface;
23 23
 
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $stats = (array)zend_shm_cache_info();
133 133
         return (new DriverStatistic())
134
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
135
-          ->setInfo(\sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats[ 'items_total' ]))
136
-          ->setRawData($stats)
137
-          ->setSize($stats[ 'memory_total' ]);
134
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
135
+            ->setInfo(\sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats[ 'items_total' ]))
136
+            ->setRawData($stats)
137
+            ->setSize($stats[ 'memory_total' ]);
138 138
     }
139 139
 }
140 140
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zendshm/Item.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
19 19
 use Phpfastcache\Drivers\Zendshm\Driver as ZendSHMDriver;
20 20
 use Phpfastcache\Exceptions\{
21
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
21
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
22 22
 };
23 23
 
24 24
 /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Couchdb/Driver.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 namespace Phpfastcache\Drivers\Couchdb;
17 17
 
18 18
 use Doctrine\CouchDB\{
19
-  CouchDBClient as CouchdbClient, CouchDBException
19
+    CouchDBClient as CouchdbClient, CouchDBException
20 20
 };
21 21
 use Phpfastcache\Config\ConfigurationOption;
22 22
 use Phpfastcache\Core\Pool\{
23
-  DriverBaseTrait, ExtendedCacheItemPoolInterface
23
+    DriverBaseTrait, ExtendedCacheItemPoolInterface
24 24
 };
25 25
 use Phpfastcache\Exceptions\{
26
-  PhpfastcacheDriverException, PhpfastcacheInvalidArgumentException, PhpfastcacheLogicException
26
+    PhpfastcacheDriverException, PhpfastcacheInvalidArgumentException, PhpfastcacheLogicException
27 27
 };
28 28
 use Phpfastcache\Entities\DriverStatistic;
29 29
 use Phpfastcache\Util\ArrayObject;
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
         $url .= $clientConfig[ 'path' ];
76 76
 
77 77
         $this->instance = CouchDBClient::create([
78
-          'dbname' => $this->getDatabaseName(),
79
-          'url' => $url,
80
-          'timeout' => $clientConfig[ 'timeout' ],
78
+            'dbname' => $this->getDatabaseName(),
79
+            'url' => $url,
80
+            'timeout' => $clientConfig[ 'timeout' ],
81 81
         ]);
82 82
 
83 83
         $this->createDatabase();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         if ($item instanceof Item) {
123 123
             try {
124 124
                 $this->instance->putDocument(['data' => $this->encode($this->driverPreWrap($item))], $item->getEncodedKey(),
125
-                  $this->getLatestDocumentRevision($item->getEncodedKey()));
125
+                    $this->getLatestDocumentRevision($item->getEncodedKey()));
126 126
             } catch (CouchDBException $e) {
127 127
                 throw new PhpfastcacheDriverException('Got error while trying to upsert a document: ' . $e->getMessage(), null, $e);
128 128
             }
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
         $path = '/' . $this->getDatabaseName() . '/' . urlencode($docId);
180 180
 
181 181
         $response = $this->instance->getHttpClient()->request(
182
-          'HEAD',
183
-          $path,
184
-          null,
185
-          false
182
+            'HEAD',
183
+            $path,
184
+            null,
185
+            false
186 186
         );
187 187
         if (!empty($response->headers[ 'etag' ])) {
188 188
             return \trim($response->headers[ 'etag' ], " '\"\t\n\r\0\x0B");
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
         $info = $this->instance->getDatabaseInfo();
237 237
 
238 238
         return (new DriverStatistic())
239
-          ->setSize($info[ 'sizes' ][ 'active' ])
240
-          ->setRawData($info)
241
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
242
-          ->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData.");
239
+            ->setSize($info[ 'sizes' ][ 'active' ])
240
+            ->setRawData($info)
241
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
242
+            ->setInfo('Couchdb version ' . $this->instance->getVersion() . "\n For more information see RawData.");
243 243
     }
244 244
 }
245 245
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Couchdb/Item.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 use Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface;
21 21
 use Phpfastcache\Drivers\Couchdb\Driver as CouchdbDriver;
22 22
 use Phpfastcache\Exceptions\{
23
-  PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
23
+    PhpfastcacheInvalidArgumentException, PhpfastcacheInvalidArgumentTypeException
24 24
 };
25 25
 
26 26
 /**
Please login to merge, or discard this patch.