@@ -333,7 +333,9 @@ discard block |
||
333 | 333 | public function createFolder($name, $expunge = true) { |
334 | 334 | $this->checkConnection(); |
335 | 335 | $status = imap_createmailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
336 | - if($expunge) $this->expunge(); |
|
336 | + if($expunge) { |
|
337 | + $this->expunge(); |
|
338 | + } |
|
337 | 339 | |
338 | 340 | return $status; |
339 | 341 | } |
@@ -350,7 +352,9 @@ discard block |
||
350 | 352 | public function renameFolder($old_name, $new_name, $expunge = true) { |
351 | 353 | $this->checkConnection(); |
352 | 354 | $status = imap_renamemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($old_name), $this->getAddress() . imap_utf7_encode($new_name)); |
353 | - if($expunge) $this->expunge(); |
|
355 | + if($expunge) { |
|
356 | + $this->expunge(); |
|
357 | + } |
|
354 | 358 | |
355 | 359 | return $status; |
356 | 360 | } |
@@ -366,7 +370,9 @@ discard block |
||
366 | 370 | public function deleteFolder($name, $expunge = true) { |
367 | 371 | $this->checkConnection(); |
368 | 372 | $status = imap_deletemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
369 | - if($expunge) $this->expunge(); |
|
373 | + if($expunge) { |
|
374 | + $this->expunge(); |
|
375 | + } |
|
370 | 376 | |
371 | 377 | return $status; |
372 | 378 | } |
@@ -370,7 +370,9 @@ discard block |
||
370 | 370 | */ |
371 | 371 | public function delete($expunge = true) { |
372 | 372 | $status = imap_deletemailbox($this->client->getConnection(), $this->path); |
373 | - if($expunge) $this->client->expunge(); |
|
373 | + if($expunge) { |
|
374 | + $this->client->expunge(); |
|
375 | + } |
|
374 | 376 | |
375 | 377 | return $status; |
376 | 378 | } |
@@ -387,7 +389,9 @@ discard block |
||
387 | 389 | */ |
388 | 390 | public function move($target_mailbox, $expunge = true) { |
389 | 391 | $status = imap_renamemailbox($this->client->getConnection(), $this->path, $target_mailbox); |
390 | - if($expunge) $this->client->expunge(); |
|
392 | + if($expunge) { |
|
393 | + $this->client->expunge(); |
|
394 | + } |
|
391 | 395 | |
392 | 396 | return $status; |
393 | 397 | } |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | return strtoupper($parameter->value); |
711 | 711 | } |
712 | 712 | } |
713 | - }elseif (is_string($structure) === true){ |
|
713 | + } elseif (is_string($structure) === true){ |
|
714 | 714 | return mb_detect_encoding($structure); |
715 | 715 | } |
716 | 716 | |
@@ -780,7 +780,9 @@ discard block |
||
780 | 780 | */ |
781 | 781 | public function delete($expunge = true) { |
782 | 782 | $status = imap_delete($this->client->getConnection(), $this->uid, FT_UID); |
783 | - if($expunge) $this->client->expunge(); |
|
783 | + if($expunge) { |
|
784 | + $this->client->expunge(); |
|
785 | + } |
|
784 | 786 | |
785 | 787 | return $status; |
786 | 788 | } |
@@ -794,7 +796,9 @@ discard block |
||
794 | 796 | */ |
795 | 797 | public function restore($expunge = true) { |
796 | 798 | $status = imap_undelete($this->client->getConnection(), $this->uid, FT_UID); |
797 | - if($expunge) $this->client->expunge(); |
|
799 | + if($expunge) { |
|
800 | + $this->client->expunge(); |
|
801 | + } |
|
798 | 802 | |
799 | 803 | return $status; |
800 | 804 | } |