Passed
Push — master ( 0d1074...eef78d )
by Malte
02:00
created
src/Client.php 1 patch
Braces   +15 added lines, -13 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $value = $this->default_account_config[$key];
199 199
         if(isset($config[$key])) {
200 200
             $value = $config[$key];
201
-        }elseif(isset($default_config[$key])) {
201
+        } elseif(isset($default_config[$key])) {
202 202
             $value = $default_config[$key];
203 203
         }
204 204
         $this->$key = $value;
@@ -232,39 +232,39 @@  discard block
 block discarded – undo
232 232
             if(isset($config['masks']['message'])) {
233 233
                 if(class_exists($config['masks']['message'])) {
234 234
                     $this->default_message_mask = $config['masks']['message'];
235
-                }else{
235
+                } else{
236 236
                     throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['message']);
237 237
                 }
238
-            }else{
238
+            } else{
239 239
                 if(class_exists($default_config['message'])) {
240 240
                     $this->default_message_mask = $default_config['message'];
241
-                }else{
241
+                } else{
242 242
                     throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']);
243 243
                 }
244 244
             }
245 245
             if(isset($config['masks']['attachment'])) {
246 246
                 if(class_exists($config['masks']['attachment'])) {
247 247
                     $this->default_message_mask = $config['masks']['attachment'];
248
-                }else{
248
+                } else{
249 249
                     throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['attachment']);
250 250
                 }
251
-            }else{
251
+            } else{
252 252
                 if(class_exists($default_config['attachment'])) {
253 253
                     $this->default_message_mask = $default_config['attachment'];
254
-                }else{
254
+                } else{
255 255
                     throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']);
256 256
                 }
257 257
             }
258
-        }else{
258
+        } else{
259 259
             if(class_exists($default_config['message'])) {
260 260
                 $this->default_message_mask = $default_config['message'];
261
-            }else{
261
+            } else{
262 262
                 throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']);
263 263
             }
264 264
 
265 265
             if(class_exists($default_config['attachment'])) {
266 266
                 $this->default_message_mask = $default_config['attachment'];
267
-            }else{
267
+            } else{
268 268
                 throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']);
269 269
             }
270 270
         }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
             $this->connection = new ImapProtocol($this->validate_cert, $this->encryption);
330 330
             $this->connection->setConnectionTimeout($timeout);
331 331
             $this->connection->setProxy($this->proxy);
332
-        }else{
332
+        } else{
333 333
             if (extension_loaded('imap') === false) {
334 334
                 throw new ConnectionFailedException("connection setup failed", 0, new ProtocolNotSupportedException($protocol." is an unsupported protocol"));
335 335
             }
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
             }
458 458
 
459 459
             return $folders;
460
-        }else{
460
+        } else{
461 461
             throw new FolderFetchingException("failed to fetch any folders");
462 462
         }
463 463
     }
@@ -493,7 +493,9 @@  discard block
 block discarded – undo
493 493
         $this->checkConnection();
494 494
         $status = $this->connection->createFolder($folder);
495 495
 
496
-        if($expunge) $this->expunge();
496
+        if($expunge) {
497
+            $this->expunge();
498
+        }
497 499
 
498 500
         $folder = $this->getFolder($folder);
499 501
         if($status && $folder) {
Please login to merge, or discard this patch.