Test Failed
Branch develop (a8dd82)
by Andreas
09:23
created
plugins/smime/php/class.pluginsmimemodule.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,9 +25,11 @@
 block discarded – undo
25 25
 	 * @return bool true on success or false on failure
26 26
 	 */
27 27
 	public function execute() {
28
-		foreach ($this->data as $actionType => $actionData) try {
28
+		foreach ($this->data as $actionType => $actionData) {
29
+			try {
29 30
 			if (!isset($actionType))
30 31
 				continue;
32
+		}
31 33
 			switch ($actionType) {
32 34
 			case 'certificate':
33 35
 				$data = $this->verifyCertificate($actionData);
Please login to merge, or discard this patch.
plugins/smime/php/util.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,8 +98,9 @@
 block discarded – undo
98 98
 	// Get messages from certificates
99 99
 	foreach ($privateCerts as $privateCert) {
100 100
 		$privateCertMessage = mapi_msgstore_openentry($store, $privateCert[PR_ENTRYID]);
101
-		if ($privateCertMessage === false)
102
-			continue;
101
+		if ($privateCertMessage === false) {
102
+					continue;
103
+		}
103 104
 		$pkcs12 = "";
104 105
 		$certs = [];
105 106
 		// Read pkcs12 cert from message
Please login to merge, or discard this patch.
phpfastcache/lib/Phpfastcache/Exceptions/PhpfastcacheIOException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
     /**
25 25
      * @inheritdoc
26 26
      */
27
-    public function __construct(string $message = "", int $code = 0, \Throwable $previous = null)
28
-    {
27
+    public function __construct(string $message = "", int $code = 0, \Throwable $previous = null) {
29 28
         $lastError = error_get_last();
30 29
         if ($lastError) {
31 30
             $message .= "\n";
Please login to merge, or discard this patch.
lib/Phpfastcache/Exceptions/PhpfastcacheCorruptedDataException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
      * @param string $message
23 23
      * @param mixed|null $corruptedData
24 24
      */
25
-    public function __construct(protected $message = '', protected mixed $corruptedData = null)
26
-    {
25
+    public function __construct(protected $message = '', protected mixed $corruptedData = null) {
27 26
         parent::__construct($message);
28 27
     }
29 28
 }
Please login to merge, or discard this patch.
vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Sqlite/Driver.php 1 patch
Braces   +15 added lines, -9 removed lines patch added patch discarded remove patch
@@ -106,7 +106,8 @@  discard block
 block discarded – undo
106 106
                 ]
107 107
             );
108 108
             $row = $stm->fetch(PDO::FETCH_ASSOC);
109
-        } catch (PDOException $e) {
109
+        }
110
+        catch (PDOException $e) {
110 111
             try {
111 112
                 $stm = $this->getDb($item->getEncodedKey(), true)
112 113
                     ->prepare("SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1");
@@ -116,7 +117,8 @@  discard block
 block discarded – undo
116 117
                     ]
117 118
                 );
118 119
                 $row = $stm->fetch(PDO::FETCH_ASSOC);
119
-            } catch (PDOException $e) {
120
+            }
121
+            catch (PDOException $e) {
120 122
                 return null;
121 123
             }
122 124
         }
@@ -168,8 +170,7 @@  discard block
 block discarded – undo
168 170
      * @param string $keyword
169 171
      * @return int
170 172
      */
171
-    public function getDbIndex(string $keyword)
172
-    {
173
+    public function getDbIndex(string $keyword) {
173 174
         if (!isset($this->indexing)) {
174 175
             $tableCreated = false;
175 176
             if (!file_exists($this->sqliteDir . '/indexing')) {
@@ -193,9 +194,11 @@  discard block
 block discarded – undo
193 194
             $row = $stm->fetch(PDO::FETCH_ASSOC);
194 195
             if (!isset($row['db'])) {
195 196
                 $db = 1;
196
-            } elseif ($row['db'] <= 1) {
197
+            }
198
+            elseif ($row['db'] <= 1) {
197 199
                 $db = 1;
198
-            } else {
200
+            }
201
+            else {
199 202
                 $db = $row['db'];
200 203
             }
201 204
 
@@ -221,7 +224,8 @@  discard block
 block discarded – undo
221 224
         $row = $stm->fetch(PDO::FETCH_ASSOC);
222 225
         if (isset($row['db']) && $row['db'] != '') {
223 226
             $db = $row['db'];
224
-        } else {
227
+        }
228
+        else {
225 229
             /*
226 230
              * Insert new to Indexing
227 231
              */
@@ -292,7 +296,8 @@  discard block
 block discarded – undo
292 296
             );
293 297
 
294 298
             return true;
295
-        } catch (PDOException $e) {
299
+        }
300
+        catch (PDOException $e) {
296 301
             return false;
297 302
         }
298 303
     }
@@ -314,7 +319,8 @@  discard block
 block discarded – undo
314 319
                     ':exp' => time(),
315 320
                 ]
316 321
             );
317
-        } catch (PDOException $e) {
322
+        }
323
+        catch (PDOException $e) {
318 324
             return false;
319 325
         }
320 326
     }
Please login to merge, or discard this patch.
phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Memcache/Driver.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
      * @throws PhpfastcacheDriverCheckException
60 60
      * @throws PhpfastcacheIOException
61 61
      */
62
-    public function __construct(ConfigurationOption $config, string $instanceId, EventManagerInterface $em)
63
-    {
62
+    public function __construct(ConfigurationOption $config, string $instanceId, EventManagerInterface $em) {
64 63
         self::checkCollision('Memcache');
65 64
         $this->__parentConstruct($config, $instanceId, $em);
66 65
     }
@@ -107,14 +106,16 @@  discard block
 block discarded – undo
107 106
                  */
108 107
                 if (!empty($server['path'])) {
109 108
                     $this->instance->addServer($server['path'], 0);
110
-                } elseif (!empty($server['host'])) {
109
+                }
110
+                elseif (!empty($server['host'])) {
111 111
                     $this->instance->addServer($server['host'], $server['port']);
112 112
                 }
113 113
 
114 114
                 if (!empty($server['saslUser']) && !empty($server['saslPassword'])) {
115 115
                     throw new PhpfastcacheDriverException('Unlike Memcached, Memcache does not support SASL authentication');
116 116
                 }
117
-            } catch (Exception $e) {
117
+            }
118
+            catch (Exception $e) {
118 119
                 throw new PhpfastcacheDriverConnectException(
119 120
                     sprintf(
120 121
                         'Failed to connect to memcache host/path "%s" with the following error: %s',
Please login to merge, or discard this patch.
phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbasev3/Driver.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,8 @@  discard block
 block discarded – undo
96 96
              * CouchbaseBucket::get() returns a GetResult interface
97 97
              */
98 98
             return $this->decodeDocument((array)$this->getCollection()->get($item->getEncodedKey())->content());
99
-        } catch (DocumentNotFoundException) {
99
+        }
100
+        catch (DocumentNotFoundException) {
100 101
             return null;
101 102
         }
102 103
     }
@@ -122,7 +123,8 @@  discard block
 block discarded – undo
122 123
             }
123 124
 
124 125
             return $results;
125
-        } catch (DocumentNotFoundException) {
126
+        }
127
+        catch (DocumentNotFoundException) {
126 128
             return [];
127 129
         }
128 130
     }
@@ -143,7 +145,8 @@  discard block
 block discarded – undo
143 145
                 (new UpsertOptions())->expiry($item->getTtl())
144 146
             );
145 147
             return true;
146
-        } catch (CouchbaseException) {
148
+        }
149
+        catch (CouchbaseException) {
147 150
             return false;
148 151
         }
149 152
     }
@@ -158,9 +161,11 @@  discard block
 block discarded – undo
158 161
 
159 162
         try {
160 163
             return $this->getCollection()->remove($encodedKey)->mutationToken() !== null;
161
-        } catch (DocumentNotFoundException) {
164
+        }
165
+        catch (DocumentNotFoundException) {
162 166
             return true;
163
-        } catch (CouchbaseException) {
167
+        }
168
+        catch (CouchbaseException) {
164 169
             return false;
165 170
         }
166 171
     }
@@ -175,7 +180,8 @@  discard block
 block discarded – undo
175 180
         try {
176 181
             $this->getCollection()->removeMulti(array_map(fn(string $key) => $this->getEncodedKey($key), $keys));
177 182
             return true;
178
-        } catch (CouchbaseException) {
183
+        }
184
+        catch (CouchbaseException) {
179 185
             return false;
180 186
         }
181 187
     }
Please login to merge, or discard this patch.
phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Couchbasev3/Config.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
     /**
52 52
      * @return int
53 53
      */
54
-    public function getPort()
55
-    {
54
+    public function getPort() {
56 55
         return $this->port;
57 56
     }
58 57
 
Please login to merge, or discard this patch.
vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Drivers/Files/Driver.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,8 @@  discard block
 block discarded – undo
67 67
 
68 68
         try {
69 69
             $content = $this->readFile($filePath);
70
-        } catch (PhpfastcacheIOException) {
70
+        }
71
+        catch (PhpfastcacheIOException) {
71 72
             return null;
72 73
         }
73 74
 
@@ -89,7 +90,8 @@  discard block
 block discarded – undo
89 90
 
90 91
         try {
91 92
             return $this->writeFile($filePath, $data, $this->getConfig()->isSecureFileManipulation());
92
-        } catch (Exception) {
93
+        }
94
+        catch (Exception) {
93 95
             return false;
94 96
         }
95 97
     }
Please login to merge, or discard this patch.