Test Setup Failed
Push — v7 ( 54ae7c...4665c0 )
by Georges
02:28
created
lib/Phpfastcache/EventManager.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace phpFastCache;
17 17
 
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
          * due to performance issue on huge
77 77
          * loop dispatching operations
78 78
          */
79
-        if (isset($this->events[ $eventName ])) {
80
-            foreach ($this->events[ $eventName ] as $event) {
79
+        if (isset($this->events[$eventName])) {
80
+            foreach ($this->events[$eventName] as $event) {
81 81
                 call_user_func_array($event, $args);
82 82
             }
83 83
         }
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
     {
94 94
         if (\strpos($name, 'on') === 0) {
95 95
             $name = \substr($name, 2);
96
-            if (\is_callable($arguments[ 0 ])) {
97
-                if (isset($arguments[ 1 ]) && \is_string($arguments[ 0 ])) {
98
-                    $this->events[ $name ][ $arguments[ 1 ] ] = $arguments[ 0 ];
96
+            if (\is_callable($arguments[0])) {
97
+                if (isset($arguments[1]) && \is_string($arguments[0])) {
98
+                    $this->events[$name][$arguments[1]] = $arguments[0];
99 99
                 } else {
100
-                    $this->events[ $name ][] = $arguments[ 0 ];
100
+                    $this->events[$name][] = $arguments[0];
101 101
                 }
102 102
             } else {
103
-                throw new phpFastCacheInvalidArgumentException(sprintf('Expected Callable, got "%s"', \gettype($arguments[ 0 ])));
103
+                throw new phpFastCacheInvalidArgumentException(sprintf('Expected Callable, got "%s"', \gettype($arguments[0])));
104 104
             }
105 105
         } else {
106 106
             throw new \BadMethodCallException('An event must start with "on" such as "onCacheGetItem"');
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function unbindEventCallback($eventName, $callbackName): bool
116 116
     {
117
-        $return = isset($this->events[ $eventName ][ $callbackName ]);
118
-        unset($this->events[ $eventName ][ $callbackName ]);
117
+        $return = isset($this->events[$eventName][$callbackName]);
118
+        unset($this->events[$eventName][$callbackName]);
119 119
 
120 120
         return $return;
121 121
     }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Devtrue/Item.php 2 patches
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\Devtrue\Driver as DevtrueDriver;
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Devtrue;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Riak/Item.php 2 patches
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\Riak\Driver as RiakDriver;
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Riak;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Sqlite/Item.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Sqlite;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zenddisk/Item.php 2 patches
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\Zenddisk\Driver as ZendDiskDriver;
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @author Lucas Brucksch <[email protected]>
11 11
  *
12 12
  */
13
-declare(strict_types=1);
13
+declare(strict_types = 1);
14 14
 
15 15
 namespace Phpfastcache\Drivers\Zenddisk;
16 16
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Zenddisk/Driver.php 2 patches
Indentation   +4 added lines, -4 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
         $stat = new DriverStatistic();
133 133
         $stat->setInfo('[ZendDisk] A void info string')
134
-          ->setSize(0)
135
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
136
-          ->setRawData(false);
134
+            ->setSize(0)
135
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
136
+            ->setRawData(false);
137 137
 
138 138
         return $stat;
139 139
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
  * @author Lucas Brucksch <[email protected]>
11 11
  *
12 12
  */
13
-declare(strict_types=1);
13
+declare(strict_types = 1);
14 14
 
15 15
 namespace Phpfastcache\Drivers\Zenddisk;
16 16
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Redis/Item.php 2 patches
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\Redis\Driver as RedisDriver;
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Redis;
17 17
 
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Redis/Driver.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
 
18 18
 use Phpfastcache\Config\ConfigurationOption;
19 19
 use Phpfastcache\Core\Pool\{
20
-  DriverBaseTrait, ExtendedCacheItemPoolInterface
20
+    DriverBaseTrait, ExtendedCacheItemPoolInterface
21 21
 };
22 22
 use Phpfastcache\Entities\DriverStatistic;
23 23
 use Phpfastcache\Exceptions\{
24
-  phpFastCacheInvalidArgumentException, phpFastCacheLogicException
24
+    phpFastCacheInvalidArgumentException, phpFastCacheLogicException
25 25
 };
26 26
 use Phpfastcache\Util\ArrayObject;
27 27
 use Psr\Cache\CacheItemInterface;
@@ -162,10 +162,10 @@  discard block
 block discarded – undo
162 162
         $date = (new \DateTime())->setTimestamp(time() - $info[ 'uptime_in_seconds' ]);
163 163
 
164 164
         return (new DriverStatistic())
165
-          ->setData(\implode(', ', \array_keys($this->itemInstances)))
166
-          ->setRawData($info)
167
-          ->setSize((int)$info[ 'used_memory' ])
168
-          ->setInfo(\sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
165
+            ->setData(\implode(', ', \array_keys($this->itemInstances)))
166
+            ->setRawData($info)
167
+            ->setSize((int)$info[ 'used_memory' ])
168
+            ->setInfo(\sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
169 169
             $info[ 'redis_version' ], $date->format(DATE_RFC2822)));
170 170
     }
171 171
 }
172 172
\ 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
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Redis;
17 17
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if ($this->config->getOption('path')) {
64 64
             $isConnected = $this->instance->connect($this->config->getOption('path'));
65 65
         } else {
66
-            $isConnected = $this->instance->connect($this->config->getOption('host'), $this->config->getOption('port'), (int)$this->config->getOption('timeout'));
66
+            $isConnected = $this->instance->connect($this->config->getOption('host'), $this->config->getOption('port'), (int) $this->config->getOption('timeout'));
67 67
         }
68 68
 
69 69
         if (!$isConnected && $this->config->getOption('path')) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
          * Check for Cross-Driver type confusion
133 133
          */
134 134
         if ($item instanceof Item) {
135
-            return (bool)$this->instance->del($item->getKey());
135
+            return (bool) $this->instance->del($item->getKey());
136 136
         }
137 137
 
138 138
         throw new phpFastCacheInvalidArgumentException('Cross-Driver type confusion detected');
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
     {
160 160
         // used_memory
161 161
         $info = $this->instance->info();
162
-        $date = (new \DateTime())->setTimestamp(time() - $info[ 'uptime_in_seconds' ]);
162
+        $date = (new \DateTime())->setTimestamp(time() - $info['uptime_in_seconds']);
163 163
 
164 164
         return (new DriverStatistic())
165 165
           ->setData(\implode(', ', \array_keys($this->itemInstances)))
166 166
           ->setRawData($info)
167
-          ->setSize((int)$info[ 'used_memory' ])
167
+          ->setSize((int) $info['used_memory'])
168 168
           ->setInfo(\sprintf("The Redis daemon v%s is up since %s.\n For more information see RawData. \n Driver size includes the memory allocation size.",
169
-            $info[ 'redis_version' ], $date->format(DATE_RFC2822)));
169
+            $info['redis_version'], $date->format(DATE_RFC2822)));
170 170
     }
171 171
 }
172 172
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Wincache/Item.php 2 patches
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\Wincache\Driver as WincacheDriver;
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @author Georges.L (Geolim4)  <[email protected]>
12 12
  *
13 13
  */
14
-declare(strict_types=1);
14
+declare(strict_types = 1);
15 15
 
16 16
 namespace Phpfastcache\Drivers\Wincache;
17 17
 
Please login to merge, or discard this patch.