Passed
Push — v7 ( 2da68a...ef6b54 )
by Georges
01:58
created
lib/Phpfastcache/Drivers/Couchbase/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\Couchbase\Driver as CouchbaseDriver;
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/Sqlite/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\Sqlite\Driver as SqliteDriver;
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/Memstatic/Driver.php 2 patches
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
21
+    PhpfastcacheInvalidArgumentException
22 22
 };
23 23
 use Psr\Cache\CacheItemInterface;
24 24
 
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $stat = new DriverStatistic();
131 131
         $stat->setInfo('[Memstatic] A memory static driver')
132
-          ->setSize(mb_strlen(\serialize($this->staticStack)))
133
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
134
-          ->setRawData($this->staticStack);
132
+            ->setSize(mb_strlen(\serialize($this->staticStack)))
133
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
134
+            ->setRawData($this->staticStack);
135 135
 
136 136
         return $stat;
137 137
     }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
     protected function driverRead(CacheItemInterface $item)
61 61
     {
62 62
         $key = \md5($item->getKey());
63
-        if (isset($this->staticStack[ $key ])) {
64
-            return $this->staticStack[ $key ];
63
+        if (isset($this->staticStack[$key])) {
64
+            return $this->staticStack[$key];
65 65
         }
66 66
         return null;
67 67
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
          * Check for Cross-Driver type confusion
78 78
          */
79 79
         if ($item instanceof Item) {
80
-            $this->staticStack[ \md5($item->getKey()) ] = $this->driverPreWrap($item);
80
+            $this->staticStack[\md5($item->getKey())] = $this->driverPreWrap($item);
81 81
             return true;
82 82
         }
83 83
 
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
          */
97 97
         if ($item instanceof Item) {
98 98
             $key = \md5($item->getKey());
99
-            if (isset($this->staticStack[ $key ])) {
100
-                unset($this->staticStack[ $key ]);
99
+            if (isset($this->staticStack[$key])) {
100
+                unset($this->staticStack[$key]);
101 101
                 return true;
102 102
             }
103 103
             return false;
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memstatic/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\Memstatic\Driver as MemstaticDriver;
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/Xcache/Driver.php 2 patches
Indentation   +5 added lines, -5 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
21
+    PhpfastcacheInvalidArgumentException
22 22
 };
23 23
 use Psr\Cache\CacheItemInterface;
24 24
 
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
             $info = xcache_info(XC_TYPE_VAR, 0);
126 126
 
127 127
             return (new DriverStatistic())
128
-              ->setSize(abs($info[ 'size' ] - $info[ 'avail' ]))
129
-              ->setData(\implode(', ', \array_keys($this->itemInstances)))
130
-              ->setInfo(\sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, \str_replace(' ', ', ', XCACHE_MODULES)))
131
-              ->setRawData($info);
128
+                ->setSize(abs($info[ 'size' ] - $info[ 'avail' ]))
129
+                ->setData(\implode(', ', \array_keys($this->itemInstances)))
130
+                ->setInfo(\sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, \str_replace(' ', ', ', XCACHE_MODULES)))
131
+                ->setRawData($info);
132 132
         }
133 133
         throw new \RuntimeException("PhpFastCache is not able to read Xcache configuration. Please put this to your php.ini:\n
134 134
             [xcache.admin]
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
             $info = xcache_info(XC_TYPE_VAR, 0);
126 126
 
127 127
             return (new DriverStatistic())
128
-              ->setSize(abs($info[ 'size' ] - $info[ 'avail' ]))
128
+              ->setSize(abs($info['size'] - $info['avail']))
129 129
               ->setData(\implode(', ', \array_keys($this->itemInstances)))
130 130
               ->setInfo(\sprintf("Xcache v%s with following modules loaded:\n %s", XCACHE_VERSION, \str_replace(' ', ', ', XCACHE_MODULES)))
131 131
               ->setRawData($info);
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Xcache/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\Xcache\Driver as XcacheDriver;
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/Predis/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\Predis\Driver as PredisDriver;
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/Apc/Driver.php 2 patches
Indentation   +5 added lines, -5 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
21
+    PhpfastcacheInvalidArgumentException
22 22
 };
23 23
 use Psr\Cache\CacheItemInterface;
24 24
 
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
         $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]);
134 134
 
135 135
         return (new DriverStatistic())
136
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
137
-          ->setInfo(\sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
136
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
137
+            ->setInfo(\sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
138 138
             $stats[ 'num_entries' ]))
139
-          ->setRawData($stats)
140
-          ->setSize($stats[ 'mem_size' ]);
139
+            ->setRawData($stats)
140
+            ->setSize($stats[ 'mem_size' ]);
141 141
     }
142 142
 }
143 143
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         if ($item instanceof Item) {
88 88
             $ttl = $item->getExpirationDate()->getTimestamp() - \time();
89 89
 
90
-            return (bool)apc_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
90
+            return (bool) apc_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
91 91
         }
92 92
 
93 93
         throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
          * Check for Cross-Driver type confusion
105 105
          */
106 106
         if ($item instanceof Item) {
107
-            return (bool)apc_delete($item->getKey());
107
+            return (bool) apc_delete($item->getKey());
108 108
         }
109 109
 
110 110
         throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -129,14 +129,14 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function getStats(): DriverStatistic
131 131
     {
132
-        $stats = (array)apc_cache_info('user');
133
-        $date = (new \DateTime())->setTimestamp($stats[ 'start_time' ]);
132
+        $stats = (array) apc_cache_info('user');
133
+        $date = (new \DateTime())->setTimestamp($stats['start_time']);
134 134
 
135 135
         return (new DriverStatistic())
136 136
           ->setData(\implode(', ', \array_keys($this->itemInstances)))
137 137
           ->setInfo(\sprintf("The APC cache is up since %s, and have %d item(s) in cache.\n For more information see RawData.", $date->format(DATE_RFC2822),
138
-            $stats[ 'num_entries' ]))
138
+            $stats['num_entries']))
139 139
           ->setRawData($stats)
140
-          ->setSize($stats[ 'mem_size' ]);
140
+          ->setSize($stats['mem_size']);
141 141
     }
142 142
 }
143 143
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Apc/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\Apc\Driver as ApcDriver;
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.