Test Failed
Push — master ( 64e257...5218bb )
by
unknown
23:17 queued 13:24
created
phpfastcache/lib/Phpfastcache/Util/ClassNamespaceResolverTrait.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,8 @@  discard block
 block discarded – undo
135 135
             $t = $tokens[$index];
136 136
             if (T_STRING === $t[0]) {
137 137
                 $class .= $t[1];
138
-            } elseif ('' !== $class && T_WHITESPACE === $t[0]) {
138
+            }
139
+            elseif ('' !== $class && T_WHITESPACE === $t[0]) {
139 140
                 break;
140 141
             }
141 142
         }
@@ -160,7 +161,8 @@  discard block
 block discarded – undo
160 161
                     break;
161 162
                 }
162 163
             }
163
-        } else {
164
+        }
165
+        else {
164 166
             while (isset($tokens[++$index][1])) {
165 167
                 if (\in_array($tokens[$index][0], [T_STRING, T_NS_SEPARATOR], true)) {
166 168
                     $namespace .= $tokens[$index][1];
Please login to merge, or discard this patch.
php/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Util/Directory.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@  discard block
 block discarded – undo
38 38
              */
39 39
             if ($file->isFile()) {
40 40
                 $size += filesize($file->getRealPath());
41
-            } elseif ($includeDirAllocSize) {
41
+            }
42
+            elseif ($includeDirAllocSize) {
42 43
                 $size += $file->getSize();
43 44
             }
44 45
         }
@@ -101,10 +102,12 @@  discard block
 block discarded – undo
101 102
                     if (self::rrmdir($fileInfo->getRealPath()) === false) {
102 103
                         return false;
103 104
                     }
104
-                } elseif (unlink($realpath) === false) {
105
+                }
106
+                elseif (unlink($realpath) === false) {
105 107
                     return false;
106 108
                 }
107
-            } else {
109
+            }
110
+            else {
108 111
                 return false;
109 112
             }
110 113
         }
@@ -133,7 +136,8 @@  discard block
 block discarded – undo
133 136
             }
134 137
             if ('..' === $part) {
135 138
                 array_pop($absolutes);
136
-            } else {
139
+            }
140
+            else {
137 141
                 $absolutes[] = $part;
138 142
             }
139 143
         }
Please login to merge, or discard this patch.
phpfastcache/lib/Phpfastcache/Cluster/Drivers/FullReplication/Driver.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,12 +49,14 @@
 block discarded – undo
49 49
                     if ($item->get() != $poolItemData) {
50 50
                         $poolsToResync[] = $driverPool;
51 51
                     }
52
-                } else {
52
+                }
53
+                else {
53 54
                     if ($item->get() !== $poolItemData) {
54 55
                         $poolsToResync[] = $driverPool;
55 56
                     }
56 57
                 }
57
-            } else {
58
+            }
59
+            else {
58 60
                 $poolsToResync[] = $driverPool;
59 61
             }
60 62
         }
Please login to merge, or discard this patch.
phpfastcache/lib/Phpfastcache/Cluster/Drivers/RandomReplication/Driver.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
      * @param callable $operation
59 59
      * @return mixed
60 60
      */
61
-    protected function makeOperation(callable $operation)
62
-    {
61
+    protected function makeOperation(callable $operation) {
63 62
         return $operation($this->getMasterPool());
64 63
     }
65 64
 }
Please login to merge, or discard this patch.
phpfastcache/lib/Phpfastcache/Cluster/Drivers/SemiReplication/Driver.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@  discard block
 block discarded – undo
43 43
                     $item = $poolItem;
44 44
                     break;
45 45
                 }
46
-            } catch (PhpfastcacheExceptionInterface) {
46
+            }
47
+            catch (PhpfastcacheExceptionInterface) {
47 48
                 $eCount++;
48 49
             }
49 50
         }
@@ -73,7 +74,8 @@  discard block
 block discarded – undo
73 74
                 if ($poolItem->isHit()) {
74 75
                     return true;
75 76
                 }
76
-            } catch (PhpfastcacheExceptionInterface) {
77
+            }
78
+            catch (PhpfastcacheExceptionInterface) {
77 79
                 $eCount++;
78 80
             }
79 81
         }
@@ -99,7 +101,8 @@  discard block
 block discarded – undo
99 101
                 if ($result = $driverPool->clear()) {
100 102
                     $hasClearedOnce = $result;
101 103
                 }
102
-            } catch (PhpfastcacheExceptionInterface) {
104
+            }
105
+            catch (PhpfastcacheExceptionInterface) {
103 106
                 $eCount++;
104 107
             }
105 108
         }
@@ -127,7 +130,8 @@  discard block
 block discarded – undo
127 130
                 if ($result = $driverPool->deleteItem($key)) {
128 131
                     $hasDeletedOnce = $result;
129 132
                 }
130
-            } catch (PhpfastcacheExceptionInterface) {
133
+            }
134
+            catch (PhpfastcacheExceptionInterface) {
131 135
                 $eCount++;
132 136
             }
133 137
         }
@@ -157,7 +161,8 @@  discard block
 block discarded – undo
157 161
                 if ($result = $driverPool->save($poolItem)) {
158 162
                     $hasSavedOnce = $result;
159 163
                 }
160
-            } catch (PhpfastcacheExceptionInterface) {
164
+            }
165
+            catch (PhpfastcacheExceptionInterface) {
161 166
                 $eCount++;
162 167
             }
163 168
         }
@@ -183,7 +188,8 @@  discard block
 block discarded – undo
183 188
                 if ($result = $driverPool->commit()) {
184 189
                     $hasCommitOnce = $result;
185 190
                 }
186
-            } catch (PhpfastcacheExceptionInterface) {
191
+            }
192
+            catch (PhpfastcacheExceptionInterface) {
187 193
                 $eCount++;
188 194
             }
189 195
         }
Please login to merge, or discard this patch.
lib/Phpfastcache/Cluster/Drivers/MasterSlaveReplication/Driver.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
      * @throws PhpfastcacheDriverException
47 47
      * @throws PhpfastcacheIOException
48 48
      */
49
-    public function __construct(string $clusterName, EventManagerInterface $em, AggregatablePoolInterface ...$driverPools)
50
-    {
49
+    public function __construct(string $clusterName, EventManagerInterface $em, AggregatablePoolInterface ...$driverPools) {
51 50
         if (\count($driverPools) !== 2) {
52 51
             throw new PhpfastcacheInvalidArgumentException('A "master/slave" cluster requires exactly two pools to be working.');
53 52
         }
@@ -73,11 +72,11 @@  discard block
 block discarded – undo
73 72
      * @return mixed
74 73
      * @throws PhpfastcacheReplicationException
75 74
      */
76
-    protected function makeOperation(callable $operation)
77
-    {
75
+    protected function makeOperation(callable $operation) {
78 76
         try {
79 77
             return $operation($this->getMasterPool());
80
-        } catch (PhpfastcacheExceptionInterface $e) {
78
+        }
79
+        catch (PhpfastcacheExceptionInterface $e) {
81 80
             try {
82 81
                 $this->eventManager->dispatch(
83 82
                     Event::CACHE_REPLICATION_SLAVE_FALLBACK,
@@ -85,7 +84,8 @@  discard block
 block discarded – undo
85 84
                     \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function']
86 85
                 );
87 86
                 return $operation($this->getSlavePool());
88
-            } catch (PhpfastcacheExceptionInterface $e) {
87
+            }
88
+            catch (PhpfastcacheExceptionInterface $e) {
89 89
                 throw new PhpfastcacheReplicationException('Master and Slave thrown an exception !');
90 90
             }
91 91
         }
Please login to merge, or discard this patch.
phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/ClusterPoolAbstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
      * @throws PhpfastcacheDriverException
70 70
      * @throws PhpfastcacheIOException
71 71
      */
72
-    public function __construct(string $clusterName, EventManagerInterface $em, AggregatablePoolInterface ...$driverPools)
73
-    {
72
+    public function __construct(string $clusterName, EventManagerInterface $em, AggregatablePoolInterface ...$driverPools) {
74 73
         if (count($driverPools) < 2) {
75 74
             throw new PhpfastcacheInvalidArgumentException('A cluster requires at least two pools to be working.');
76 75
         }
Please login to merge, or discard this patch.
phpfastcache/phpfastcache/lib/Phpfastcache/Cluster/ClusterAggregator.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
      * @param array<AggregatablePoolInterface> $driverPools
46 46
      * @throws PhpfastcacheLogicException
47 47
      */
48
-    public function __construct(string $clusterAggregatorName = '', AggregatablePoolInterface ...$driverPools)
49
-    {
48
+    public function __construct(string $clusterAggregatorName = '', AggregatablePoolInterface ...$driverPools) {
50 49
         $clusterAggregatorName = trim($clusterAggregatorName);
51 50
         if (empty($clusterAggregatorName)) {
52 51
             try {
53 52
                 $clusterAggregatorName = 'cluster_' . \bin2hex(\random_bytes(15));
54
-            } catch (Exception) {
53
+            }
54
+            catch (Exception) {
55 55
                 $clusterAggregatorName = 'cluster_' . \str_shuffle(\spl_object_hash(new stdClass()));
56 56
             }
57 57
         }
@@ -81,7 +81,8 @@  discard block
 block discarded – undo
81 81
             }
82 82
 
83 83
             $this->driverPools[$splHash] = $driverPool;
84
-        } else {
84
+        }
85
+        else {
85 86
             throw new PhpfastcacheLogicException('This pool has been already aggregated !');
86 87
         }
87 88
     }
@@ -129,7 +130,8 @@  discard block
 block discarded – undo
129 130
         $splHash = \spl_object_hash($driverPool);
130 131
         if (isset($this->driverPools[$splHash])) {
131 132
             unset($this->driverPools[$splHash]);
132
-        } else {
133
+        }
134
+        else {
133 135
             throw new PhpfastcacheLogicException('This pool was not aggregated !');
134 136
         }
135 137
     }
@@ -153,7 +155,8 @@  discard block
 block discarded – undo
153 155
 
154 156
                 $this->cluster->getEventManager()->dispatch(Event::CACHE_CLUSTER_BUILT, $this, $this->cluster);
155 157
             }
156
-        } else {
158
+        }
159
+        else {
157 160
             throw new PhpfastcacheInvalidArgumentException('Unknown cluster strategy');
158 161
         }
159 162
 
Please login to merge, or discard this patch.
phpfastcache/lib/Phpfastcache/Event/EventReferenceParameter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
 
21 21
 class EventReferenceParameter
22 22
 {
23
-    public function __construct(protected mixed &$parameter, protected bool $allowTypeChange = false)
24
-    {
23
+    public function __construct(protected mixed &$parameter, protected bool $allowTypeChange = false) {
25 24
     }
26 25
 
27 26
     public function getParameterValue(): mixed
Please login to merge, or discard this patch.