Passed
Pull Request — master (#668)
by Mike P.
02:10
created
lib/Phpfastcache/Drivers/Leveldb/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
          * Check for Cross-Driver type confusion
85 85
          */
86 86
         if ($item instanceof Item) {
87
-            return (bool)$this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item)));
87
+            return (bool) $this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item)));
88 88
         }
89 89
 
90 90
         throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $this->instance->close();
117 117
             $this->instance = null;
118 118
         }
119
-        $result = (bool)LeveldbClient::destroy($this->getLeveldbFile());
119
+        $result = (bool) LeveldbClient::destroy($this->getLeveldbFile());
120 120
         $this->driverConnect();
121 121
 
122 122
         return $result;
Please login to merge, or discard this patch.
lib/Phpfastcache/Util/Directory.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@  discard block
 block discarded – undo
89 89
             return \unlink($source);
90 90
         }
91 91
 
92
-        $files = new RecursiveIteratorIterator
93
-        (
92
+        $files = new RecursiveIteratorIterator(
94 93
             new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS),
95 94
             RecursiveIteratorIterator::CHILD_FIRST
96 95
         );
@@ -142,7 +141,7 @@  discard block
 block discarded – undo
142 141
         /**
143 142
          * Allows to dereference char
144 143
          */
145
-        $__FILE__ = \preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__);// remove file protocols such as "phar://" etc.
144
+        $__FILE__ = \preg_replace('~^(([a-z0-9\-]+)://)~', '', __FILE__); // remove file protocols such as "phar://" etc.
146 145
         $prefix = $__FILE__[0] === \DIRECTORY_SEPARATOR ? \DIRECTORY_SEPARATOR : '';
147 146
         return $prefix . \implode(\DIRECTORY_SEPARATOR, $absolutes);
148 147
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Autoload/Autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 /**
28 28
  * Register Autoload
29 29
  */
30
-\spl_autoload_register(function ($entity) {
30
+\spl_autoload_register(function($entity) {
31 31
     $module = \explode('\\', $entity, 2);
32 32
     if (!\in_array($module[0], ['Phpfastcache', 'Psr'])) {
33 33
         /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Helper/ActOnAll.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function __construct()
41 41
     {
42
-        $this->instances =& CacheManager::getInternalInstances();
42
+        $this->instances = & CacheManager::getInternalInstances();
43 43
     }
44 44
 
45 45
     /**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     protected function getGenericCallback(): \Closure
49 49
     {
50
-        return function ($method, $args) {
50
+        return function($method, $args) {
51 51
             $return = [];
52 52
             foreach ($this->instances as $instance) {
53 53
                 $reflectionMethod = new \ReflectionMethod(\get_class($instance), $method);
Please login to merge, or discard this patch.
lib/Phpfastcache/Helper/Psr16Adapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
     public function getMultiple($keys, $default = null)
134 134
     {
135 135
         try {
136
-            return array_map(function (ExtendedCacheItemInterface $item) {
136
+            return array_map(function(ExtendedCacheItemInterface $item) {
137 137
                 return $item->get();
138 138
             }, $this->internalCacheInstance->getItems($keys));
139 139
         } catch (PhpfastcacheInvalidArgumentException $e) {
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/ItemExtendedTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             $this->data[] = $data;
283 283
         } else {
284 284
             if (\is_string($data)) {
285
-                $this->data .= (string)$data;
285
+                $this->data .= (string) $data;
286 286
             } else {
287 287
                 throw new PhpfastcacheInvalidArgumentException('$data must be either array nor string.');
288 288
             }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             \array_unshift($this->data, $data);
304 304
         } else {
305 305
             if (\is_string($data)) {
306
-                $this->data = (string)$data . $this->data;
306
+                $this->data = (string) $data . $this->data;
307 307
             } else {
308 308
                 throw new PhpfastcacheInvalidArgumentException('$data must be either array nor string.');
309 309
             }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Couchbase/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
          */
114 114
         if ($item instanceof Item) {
115 115
             try {
116
-                return (bool)$this->getBucket()->upsert(
116
+                return (bool) $this->getBucket()->upsert(
117 117
                     $item->getEncodedKey(),
118 118
                     $this->encode($this->driverPreWrap($item)),
119 119
                     ['expiry' => $item->getTtl()]
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
          */
139 139
         if ($item instanceof Item) {
140 140
             try {
141
-                return (bool)$this->getBucket()->remove($item->getEncodedKey());
141
+                return (bool) $this->getBucket()->remove($item->getEncodedKey());
142 142
             } catch (\Couchbase\Exception $e) {
143 143
                 return $e->getCode() === COUCHBASE_KEY_ENOENT;
144 144
             }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Apc/Driver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         if ($item instanceof Item) {
90 90
             $ttl = $item->getExpirationDate()->getTimestamp() - \time();
91 91
 
92
-            return (bool)apc_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
92
+            return (bool) apc_store($item->getKey(), $this->driverPreWrap($item), ($ttl > 0 ? $ttl : 0));
93 93
         }
94 94
 
95 95
         throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
          * Check for Cross-Driver type confusion
107 107
          */
108 108
         if ($item instanceof Item) {
109
-            return (bool)apc_delete($item->getKey());
109
+            return (bool) apc_delete($item->getKey());
110 110
         }
111 111
 
112 112
         throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function getStats(): DriverStatistic
133 133
     {
134
-        $stats = (array)apc_cache_info('user');
134
+        $stats = (array) apc_cache_info('user');
135 135
         $date = (new \DateTime())->setTimestamp($stats['start_time']);
136 136
 
137 137
         return (new DriverStatistic())
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zenddisk/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
          * Check for Cross-Driver type confusion
95 95
          */
96 96
         if ($item instanceof Item) {
97
-            return (bool)zend_disk_cache_delete($item->getKey());
97
+            return (bool) zend_disk_cache_delete($item->getKey());
98 98
         }
99 99
 
100 100
         throw new PhpfastcacheInvalidArgumentException('Cross-Driver type confusion detected');
Please login to merge, or discard this patch.