Passed
Push — master ( 50ea4d...f73787 )
by Georges
12:15 queued 13s
created
lib/Phpfastcache/CacheManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@
 block discarded – undo
318 318
         $found = false;
319 319
         self::$instances = \array_filter(
320 320
             \array_map(
321
-                static function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
321
+                static function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found) {
322 322
                     if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) {
323 323
                         $found = true;
324 324
                         return null;
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcache/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function getStats(): DriverStatistic
74 74
     {
75
-        $stats = (array)$this->instance->getstats();
75
+        $stats = (array) $this->instance->getstats();
76 76
         $stats['uptime'] = (isset($stats['uptime']) ? $stats['uptime'] : 0);
77 77
         $stats['version'] = (isset($stats['version']) ? $stats['version'] : 'UnknownVersion');
78 78
         $stats['bytes'] = (isset($stats['bytes']) ? $stats['version'] : 0);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             ->setData(implode(', ', array_keys($this->itemInstances)))
84 84
             ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822)))
85 85
             ->setRawData($stats)
86
-            ->setSize((int)$stats['bytes']);
86
+            ->setSize((int) $stats['bytes']);
87 87
     }
88 88
 
89 89
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcached/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             ->setData(implode(', ', array_keys($this->itemInstances)))
79 79
             ->setInfo(sprintf("The memcache daemon v%s is up since %s.\n For more information see RawData.", $stats['version'], $date->format(DATE_RFC2822)))
80 80
             ->setRawData($stats)
81
-            ->setSize((int)$stats['bytes']);
81
+            ->setSize((int) $stats['bytes']);
82 82
     }
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zendshm/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function getStats(): DriverStatistic
57 57
     {
58
-        $stats = (array)zend_shm_cache_info();
58
+        $stats = (array) zend_shm_cache_info();
59 59
         return (new DriverStatistic())
60 60
             ->setData(implode(', ', array_keys($this->itemInstances)))
61 61
             ->setInfo(sprintf("The Zend memory have %d item(s) in cache.\n For more information see RawData.", $stats['items_total']))
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $this->assertCacheItemType($item, Item::class);
110 110
 
111
-        return (bool)zend_shm_cache_delete($item->getKey());
111
+        return (bool) zend_shm_cache_delete($item->getKey());
112 112
     }
113 113
 
114 114
     protected function driverClear(): bool
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
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
     {
110 110
         $this->assertCacheItemType($item, Item::class);
111 111
 
112
-        return (bool)zend_disk_cache_delete($item->getKey());
112
+        return (bool) zend_disk_cache_delete($item->getKey());
113 113
     }
114 114
 
115 115
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Predis/Driver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         return (new DriverStatistic())
75 75
             ->setData(implode(', ', array_keys($this->itemInstances)))
76 76
             ->setRawData($info)
77
-            ->setSize((int)$size)
77
+            ->setSize((int) $size)
78 78
             ->setInfo(
79 79
                 sprintf(
80 80
                     "The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
          * @see https://redis.io/commands/expire
168 168
          */
169 169
         if ($ttl <= 0) {
170
-            return (bool)$this->instance->expire($item->getKey(), 0);
170
+            return (bool) $this->instance->expire($item->getKey(), 0);
171 171
         }
172 172
 
173 173
         return $this->instance->setex($item->getKey(), $ttl, $this->encode($this->driverPreWrap($item)))->getPayload() === 'OK';
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     {
183 183
         $this->assertCacheItemType($item, Item::class);
184 184
 
185
-        return (bool)$this->instance->del([$item->getKey()]);
185
+        return (bool) $this->instance->del([$item->getKey()]);
186 186
     }
187 187
 
188 188
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Leveldb/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         $this->assertCacheItemType($item, Item::class);
80 80
 
81
-        return (bool)$this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item)));
81
+        return (bool) $this->instance->set($item->getKey(), $this->encode($this->driverPreWrap($item)));
82 82
     }
83 83
 
84 84
     /**
Please login to merge, or discard this patch.
lib/Phpfastcache/Config/ConfigurationOptionInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,23 +58,23 @@
 block discarded – undo
58 58
     /**
59 59
      * @return callable|string
60 60
      */
61
-    public function getDefaultKeyHashFunction(): callable|string;
61
+    public function getDefaultKeyHashFunction(): callable | string;
62 62
     /**
63 63
      * @param callable|string $defaultKeyHashFunction
64 64
      * @return ConfigurationOption
65 65
      * @throws  PhpfastcacheInvalidConfigurationException
66 66
      */
67
-    public function setDefaultKeyHashFunction(callable|string $defaultKeyHashFunction): static;
67
+    public function setDefaultKeyHashFunction(callable | string $defaultKeyHashFunction): static;
68 68
     /**
69 69
      * @return callable|string
70 70
      */
71
-    public function getDefaultFileNameHashFunction(): callable|string;
71
+    public function getDefaultFileNameHashFunction(): callable | string;
72 72
     /**
73 73
      * @param callable|string $defaultFileNameHashFunction
74 74
      * @return ConfigurationOption
75 75
      * @throws  PhpfastcacheInvalidConfigurationException
76 76
      */
77
-    public function setDefaultFileNameHashFunction(callable|string $defaultFileNameHashFunction): static;
77
+    public function setDefaultFileNameHashFunction(callable | string $defaultFileNameHashFunction): static;
78 78
 
79 79
     /**
80 80
      * @return string
Please login to merge, or discard this patch.
lib/Phpfastcache/Core/Item/CacheItemTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      * @throws PhpfastcacheInvalidArgumentException
119 119
      * @throws \Exception
120 120
      */
121
-    public function expiresAfter(int|\DateInterval|null $time): static
121
+    public function expiresAfter(int | \DateInterval | null $time): static
122 122
     {
123 123
         if (\is_numeric($time)) {
124 124
             if ($time <= 0) {
Please login to merge, or discard this patch.