Completed
Pull Request — master (#677)
by Georges
04:24 queued 02:39
created
lib/Phpfastcache/Core/Pool/DriverBaseTrait.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
             throw new PhpfastcacheDriverCheckException(\sprintf(self::DRIVER_CHECK_FAILURE, $this->getDriverName()));
71 71
         }
72 72
 
73
-        try{
73
+        try {
74 74
             $this->driverConnect();
75
-        }catch(\Exception $e){
75
+        } catch (\Exception $e) {
76 76
             throw new PhpfastcacheDriverConnectException(\sprintf(
77 77
                 self::DRIVER_CONNECT_FAILURE,
78 78
                 $this->getDriverName(),
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     protected function decode($value)
143 143
     {
144
-        return \unserialize((string)$value);
144
+        return \unserialize((string) $value);
145 145
     }
146 146
 
147 147
     /**
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
              * that has slow performances
282 282
              */
283 283
 
284
-            $tagsItem->set(\array_merge((array)$data, [$item->getKey() => $expTimestamp]));
284
+            $tagsItem->set(\array_merge((array) $data, [$item->getKey() => $expTimestamp]));
285 285
 
286 286
             /**
287 287
              * Set the expiration date
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
         $tagsItems = $this->getItems($this->getTagKeys($item->getRemovedTags()));
304 304
 
305 305
         foreach ($tagsItems as $tagsItem) {
306
-            $data = (array)$tagsItem->get();
306
+            $data = (array) $tagsItem->get();
307 307
 
308 308
             unset($data[$item->getKey()]);
309 309
             $tagsItem->set($data);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         try{
74 74
             $this->driverConnect();
75
-        }catch(\Exception $e){
75
+        } catch(\Exception $e){
76 76
             throw new PhpfastcacheDriverConnectException(\sprintf(
77 77
                 self::DRIVER_CONNECT_FAILURE,
78 78
                 $this->getDriverName(),
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Couchbase/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     /**
29 29
      * @var int
30 30
      */
31
-    protected $port = 8091;// SSL: 18091
31
+    protected $port = 8091; // SSL: 18091
32 32
 
33 33
     /**
34 34
      * @var string
Please login to merge, or discard this patch.
lib/Phpfastcache/CacheManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                 $fallback = $config->getFallback();
166 166
                 $config->setFallback('');
167 167
                 \trigger_error(\sprintf('The "%s" driver is unavailable at the moment, the fallback driver "%s" has been used instead.', $driver,
168
-                    $fallback),  \E_USER_WARNING);
168
+                    $fallback), \E_USER_WARNING);
169 169
                 return self::getInstance($fallback, $config->getFallbackConfig());
170 170
             } catch (PhpfastcacheInvalidArgumentException $e) {
171 171
                 throw new PhpfastcacheInvalidConfigurationException('Invalid fallback driver configuration', 0, $e);
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
     public static function clearInstance(ExtendedCacheItemPoolInterface $cachePoolInstance): bool
284 284
     {
285 285
         $found = false;
286
-        self::$instances = \array_filter(\array_map(function (ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found){
287
-            if(\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)){
286
+        self::$instances = \array_filter(\array_map(function(ExtendedCacheItemPoolInterface $cachePool) use ($cachePoolInstance, &$found){
287
+            if (\spl_object_hash($cachePool) === \spl_object_hash($cachePoolInstance)) {
288 288
                 $found = true;
289 289
                 return null;
290 290
             }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcache/Config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,16 +108,16 @@
 block discarded – undo
108 108
     public function setServers(array $servers): self
109 109
     {
110 110
         foreach ($servers as $server) {
111
-            if($diff = \array_diff(['host', 'port', 'saslUser', 'saslPassword'], \array_keys($server))){
112
-                throw new PhpfastcacheInvalidConfigurationException('Missing keys for memcached server: '. \implode(', ', $diff));
111
+            if ($diff = \array_diff(['host', 'port', 'saslUser', 'saslPassword'], \array_keys($server))) {
112
+                throw new PhpfastcacheInvalidConfigurationException('Missing keys for memcached server: ' . \implode(', ', $diff));
113 113
             }
114
-            if($diff = \array_diff( \array_keys($server), ['host', 'port', 'saslUser', 'saslPassword'])){
115
-                throw new PhpfastcacheInvalidConfigurationException('Unknown keys for memcached server: '. \implode(', ', $diff));
114
+            if ($diff = \array_diff(\array_keys($server), ['host', 'port', 'saslUser', 'saslPassword'])) {
115
+                throw new PhpfastcacheInvalidConfigurationException('Unknown keys for memcached server: ' . \implode(', ', $diff));
116 116
             }
117
-            if(!\is_string($server['host'])){
117
+            if (!\is_string($server['host'])) {
118 118
                 throw new PhpfastcacheInvalidConfigurationException('Host must be a valid string in "$server" configuration array');
119 119
             }
120
-            if(!\is_int($server['port'])){
120
+            if (!\is_int($server['port'])) {
121 121
                 throw new PhpfastcacheInvalidConfigurationException('Port must be a valid integer in "$server" configuration array');
122 122
             }
123 123
         }
Please login to merge, or discard this patch.
lib/Phpfastcache/Drivers/Memcached/Config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,16 +108,16 @@
 block discarded – undo
108 108
     public function setServers(array $servers): self
109 109
     {
110 110
         foreach ($servers as $server) {
111
-            if($diff = \array_diff(['host', 'port', 'saslUser', 'saslPassword'], \array_keys($server))){
112
-                throw new PhpfastcacheInvalidConfigurationException('Missing keys for memcached server: '. \implode(', ', $diff));
111
+            if ($diff = \array_diff(['host', 'port', 'saslUser', 'saslPassword'], \array_keys($server))) {
112
+                throw new PhpfastcacheInvalidConfigurationException('Missing keys for memcached server: ' . \implode(', ', $diff));
113 113
             }
114
-            if($diff = \array_diff( \array_keys($server), ['host', 'port', 'saslUser', 'saslPassword'])){
115
-                throw new PhpfastcacheInvalidConfigurationException('Unknown keys for memcached server: '. \implode(', ', $diff));
114
+            if ($diff = \array_diff(\array_keys($server), ['host', 'port', 'saslUser', 'saslPassword'])) {
115
+                throw new PhpfastcacheInvalidConfigurationException('Unknown keys for memcached server: ' . \implode(', ', $diff));
116 116
             }
117
-            if(!\is_string($server['host'])){
117
+            if (!\is_string($server['host'])) {
118 118
                 throw new PhpfastcacheInvalidConfigurationException('Host must be a valid string in "$server" configuration array');
119 119
             }
120
-            if(!\is_int($server['port'])){
120
+            if (!\is_int($server['port'])) {
121 121
                 throw new PhpfastcacheInvalidConfigurationException('Port must be a valid integer in "$server" configuration array');
122 122
             }
123 123
         }
Please login to merge, or discard this patch.