Passed
Push — master ( 8e9570...5748cf )
by Malte
02:58
created
src/Support/Masks/MessageMask.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function getCustomHTMLBody($callback = false) {
48 48
         $body = $this->getHtmlBody();
49
-        if($body === null) return null;
49
+        if($body === null) {
50
+            return null;
51
+        }
50 52
 
51 53
         if ($callback !== false) {
52 54
             $aAttachment = $this->parent->getAttachments();
@@ -54,7 +56,7 @@  discard block
 block discarded – undo
54 56
                 /** @var Attachment $oAttachment */
55 57
                 if(is_callable($callback)) {
56 58
                     $body = $callback($body, $oAttachment);
57
-                }elseif(is_string($callback)) {
59
+                } elseif(is_string($callback)) {
58 60
                     call_user_func($callback, [$body, $oAttachment]);
59 61
                 }
60 62
             });
Please login to merge, or discard this patch.
src/Support/Masks/Mask.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
                 return $this->attributes[$name];
68 68
             }
69 69
 
70
-        }elseif (strtolower(substr($method, 0, 3)) === 'set') {
70
+        } elseif (strtolower(substr($method, 0, 3)) === 'set') {
71 71
             $name = Str::snake(substr($method, 3));
72 72
 
73 73
             if(isset($this->attributes[$name])) {
Please login to merge, or discard this patch.
src/Connection/Protocols/Protocol.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         // so add them back in manually if we can
56 56
         if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) {
57 57
             $cryptoMethod = STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
58
-        }elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT')) {
58
+        } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT')) {
59 59
             $cryptoMethod = STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
60 60
         }
61 61
 
Please login to merge, or discard this patch.
examples/message_table.blade.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,11 +35,14 @@
 block discarded – undo
35 35
                 <td><?php echo $message->getAttachments()->count() > 0 ? 'yes' : 'no'; ?></td>
36 36
             </tr>
37 37
         <?php endforeach; ?>
38
-    <?php else: ?>
38
+    <?php else {
39
+    : ?>
39 40
         <tr>
40 41
             <td colspan="4">No messages found</td>
41 42
         </tr>
42
-    <?php endif; ?>
43
+    <?php endif;
44
+}
45
+?>
43 46
     </tbody>
44 47
 </table>
45 48
 
Please login to merge, or discard this patch.
examples/folder_structure.blade.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,14 @@
 block discarded – undo
31 31
                     <td><?php echo $folder->search()->unseen()->setFetchBody(false)->count(); ?></td>
32 32
                 </tr>
33 33
         <?php endforeach; ?>
34
-    <?php else: ?>
34
+    <?php else {
35
+    : ?>
35 36
         <tr>
36 37
             <td colspan="4">No folders found</td>
37 38
         </tr>
38
-    <?php endif; ?>
39
+    <?php endif;
40
+}
41
+?>
39 42
     </tbody>
40 43
 </table>
41 44
 
Please login to merge, or discard this patch.
src/Part.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
     protected function parse(){
122 122
         if ($this->header === null) {
123 123
             $body = $this->findHeaders();
124
-        }else{
124
+        } else{
125 125
             $body = $this->raw;
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/Connection/Protocols/LegacyProtocol.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                 $name = $this->decodeFolderName($item->name);
324 324
                 $result[$name] = ['delimiter' => $item->delimiter, 'flags' => []];
325 325
             }
326
-        }else{
326
+        } else{
327 327
             throw new RuntimeException(\imap_last_error());
328 328
         }
329 329
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
         if ($mode == "+"){
349 349
             $status = \imap_setflag_full($this->stream, $from, $flag, $uid ? IMAP::ST_UID : IMAP::NIL);
350
-        }else{
350
+        } else{
351 351
             $status = \imap_clearflag_full($this->stream, $from, $flag, $uid ? IMAP::ST_UID : IMAP::NIL);
352 352
         }
353 353
 
Please login to merge, or discard this patch.
src/Header.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -285,7 +285,9 @@  discard block
 block discarded – undo
285 285
         }
286 286
 
287 287
         foreach ($headers as $key => $values) {
288
-            if (isset($imap_headers[$key])) continue;
288
+            if (isset($imap_headers[$key])) {
289
+                continue;
290
+            }
289 291
             $value = null;
290 292
             switch ($key) {
291 293
                 case 'from':
@@ -506,7 +508,9 @@  discard block
 block discarded – undo
506 508
      * Try to extract the priority from a given raw header string
507 509
      */
508 510
     private function findPriority() {
509
-        if (($priority = $this->get("x_priority")) === null) return;
511
+        if (($priority = $this->get("x_priority")) === null) {
512
+            return;
513
+        }
510 514
         switch ((int)"$priority") {
511 515
             case IMAP::MESSAGE_PRIORITY_HIGHEST;
512 516
                 $priority = IMAP::MESSAGE_PRIORITY_HIGHEST;
Please login to merge, or discard this patch.
src/ClientManager.php 1 patch
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
             if($value === null) {
81 81
                 if(isset(self::$config[$part])) {
82 82
                     $value = self::$config[$part];
83
-                }else{
83
+                } else{
84 84
                     break;
85 85
                 }
86
-            }else{
86
+            } else{
87 87
                 if(isset($value[$part])) {
88 88
                     $value = $value[$part];
89
-                }else{
89
+                } else{
90 90
                     break;
91 91
                 }
92 92
             }
@@ -230,15 +230,21 @@  discard block
 block discarded – undo
230 230
 
231 231
         // From https://stackoverflow.com/a/173479
232 232
         $isAssoc = function(array $arr) {
233
-            if (array() === $arr) return false;
233
+            if (array() === $arr) {
234
+                return false;
235
+            }
234 236
             return array_keys($arr) !== range(0, count($arr) - 1);
235 237
         };
236 238
 
237
-        if(!is_array($base)) $base = empty($base) ? array() : array($base);
239
+        if(!is_array($base)) {
240
+            $base = empty($base) ? array() : array($base);
241
+        }
238 242
 
239 243
         foreach($arrays as $append) {
240 244
 
241
-            if(!is_array($append)) $append = array($append);
245
+            if(!is_array($append)) {
246
+                $append = array($append);
247
+            }
242 248
 
243 249
             foreach($append as $key => $value) {
244 250
 
@@ -262,7 +268,9 @@  discard block
 block discarded – undo
262 268
                     // results in $resultConfig['dispositions'] = ['attachment', 'inline']
263 269
                     $base[$key] = $this->array_merge_recursive_distinct($base[$key], $value);
264 270
                 } else if(is_numeric($key)) {
265
-                    if(!in_array($value, $base)) $base[] = $value;
271
+                    if(!in_array($value, $base)) {
272
+                        $base[] = $value;
273
+                    }
266 274
                 } else {
267 275
                     $base[$key] = $value;
268 276
                 }
Please login to merge, or discard this patch.