Passed
Push — master ( aad7db...4b5f38 )
by Malte
04:57 queued 02:17
created
src/Folder.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -237,7 +237,9 @@  discard block
 block discarded – undo
237 237
     public function move($new_name, $expunge = true) {
238 238
         $this->client->checkConnection();
239 239
         $status = $this->client->getConnection()->renameFolder($this->full_name, $new_name);
240
-        if($expunge) $this->client->expunge();
240
+        if($expunge) {
241
+            $this->client->expunge();
242
+        }
241 243
 
242 244
         $folder = $this->client->getFolder($new_name);
243 245
         $event = $this->getEvent("folder", "moved");
@@ -300,7 +302,9 @@  discard block
 block discarded – undo
300 302
      */
301 303
     public function delete($expunge = true) {
302 304
         $status = $this->client->getConnection()->deleteFolder($this->path);
303
-        if($expunge) $this->client->expunge();
305
+        if($expunge) {
306
+            $this->client->expunge();
307
+        }
304 308
 
305 309
         $event = $this->getEvent("folder", "deleted");
306 310
         $event::dispatch($this);
@@ -368,10 +372,10 @@  discard block
 block discarded – undo
368 372
 
369 373
                     $connection->idle();
370 374
                 }
371
-            }catch (Exceptions\RuntimeException $e) {
375
+            } catch (Exceptions\RuntimeException $e) {
372 376
                 if(strpos($e->getMessage(), "connection closed") === false) {
373 377
                     throw $e;
374
-                }else{
378
+                } else{
375 379
                     $this->client->connect();
376 380
                     $this->client->openFolder($this->path);
377 381
                     $connection = $this->client->getConnection();
Please login to merge, or discard this patch.
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/LegacyProtocol.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
                 $name = $this->decodeFolderName($item->name);
291 291
                 $result[$name] = ['delimiter' => $item->delimiter, 'flags' => []];
292 292
             }
293
-        }else{
293
+        } else{
294 294
             throw new RuntimeException(\imap_last_error());
295 295
         }
296 296
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
         if ($mode == "+"){
315 315
             $status = \imap_setflag_full($this->stream, $from, $flag, IMAP::SE_UID);
316
-        }else{
316
+        } else{
317 317
             $status = \imap_clearflag_full($this->stream, $from, $flag, IMAP::SE_UID);
318 318
         }
319 319
 
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.
src/Query/WhereQuery.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         if (strpos(strtolower($name), "where") === false){
85 85
             $method = 'where'.ucfirst($name);
86
-        }else{
86
+        } else{
87 87
             $method = lcfirst($name);
88 88
         }
89 89
 
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
                 }
129 129
                 return $this->where($key, $value);
130 130
             }
131
-        }else{
131
+        } else{
132 132
             $criteria = $this->validate_criteria($criteria);
133 133
             $value = $this->parse_value($value);
134 134
 
135 135
             if($value === null || $value === ''){
136 136
                 $this->query->push([$criteria]);
137
-            }else{
137
+            } else{
138 138
                 $this->query->push([$criteria, $value]);
139 139
             }
140 140
         }
@@ -149,7 +149,9 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function orWhere(\Closure $closure = null) {
151 151
         $this->query->push(['OR']);
152
-        if($closure !== null) $closure($this);
152
+        if($closure !== null) {
153
+            $closure($this);
154
+        }
153 155
 
154 156
         return $this;
155 157
     }
@@ -161,7 +163,9 @@  discard block
 block discarded – undo
161 163
      */
162 164
     public function andWhere(\Closure $closure = null) {
163 165
         $this->query->push(['AND']);
164
-        if($closure !== null) $closure($this);
166
+        if($closure !== null) {
167
+            $closure($this);
168
+        }
165 169
 
166 170
         return $this;
167 171
     }
Please login to merge, or discard this patch.
src/ClientManager.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,13 +72,13 @@  discard block
 block discarded – undo
72 72
             if($value === null) {
73 73
                 if(isset(self::$config[$part])) {
74 74
                     $value = self::$config[$part];
75
-                }else{
75
+                } else{
76 76
                     break;
77 77
                 }
78
-            }else{
78
+            } else{
79 79
                 if(isset($value[$part])) {
80 80
                     $value = $value[$part];
81
-                }else{
81
+                } else{
82 82
                     break;
83 83
                 }
84 84
             }
@@ -227,11 +227,15 @@  discard block
 block discarded – undo
227 227
         $arrays = func_get_args();
228 228
         $base = array_shift($arrays);
229 229
 
230
-        if(!is_array($base)) $base = empty($base) ? array() : array($base);
230
+        if(!is_array($base)) {
231
+            $base = empty($base) ? array() : array($base);
232
+        }
231 233
 
232 234
         foreach($arrays as $append) {
233 235
 
234
-            if(!is_array($append)) $append = array($append);
236
+            if(!is_array($append)) {
237
+                $append = array($append);
238
+            }
235 239
 
236 240
             foreach($append as $key => $value) {
237 241
 
@@ -243,7 +247,9 @@  discard block
 block discarded – undo
243 247
                 if(is_array($value) or is_array($base[$key])) {
244 248
                     $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]);
245 249
                 } else if(is_numeric($key)) {
246
-                    if(!in_array($value, $base)) $base[] = $value;
250
+                    if(!in_array($value, $base)) {
251
+                        $base[] = $value;
252
+                    }
247 253
                 } else {
248 254
                     $base[$key] = $value;
249 255
                 }
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.