@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $defaultAccount = config('imap.default'); |
129 | 129 | $defaultConfig = config("imap.accounts.$defaultAccount"); |
130 | 130 | |
131 | - foreach($defaultConfig as $key => $default){ |
|
131 | + foreach ($defaultConfig as $key => $default) { |
|
132 | 132 | $this->$key = isset($config[$key]) ? $config[$key] : $default; |
133 | 133 | } |
134 | 134 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * |
141 | 141 | * @return resource |
142 | 142 | */ |
143 | - public function getConnection(){ |
|
143 | + public function getConnection() { |
|
144 | 144 | return $this->connection; |
145 | 145 | } |
146 | 146 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $attempts, |
207 | 207 | config('imap.options.open') |
208 | 208 | ); |
209 | - $this->connected = !! $this->connection; |
|
209 | + $this->connected = !!$this->connection; |
|
210 | 210 | } catch (\ErrorException $e) { |
211 | 211 | $errors = imap_errors(); |
212 | 212 | $message = $e->getMessage().'. '.implode("; ", (is_array($errors) ? $errors : array())); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | public function disconnect() { |
226 | 226 | if ($this->isConnected()) { |
227 | 227 | $this->errors = array_merge($this->errors, imap_errors() ?: []); |
228 | - $this->connected = ! imap_close($this->connection, CL_EXPUNGE); |
|
228 | + $this->connected = !imap_close($this->connection, CL_EXPUNGE); |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | return $this; |
@@ -242,11 +242,11 @@ discard block |
||
242 | 242 | * |
243 | 243 | * @return Folder |
244 | 244 | */ |
245 | - public function getFolder($folder_name, $attributes = 32, $delimiter = null){ |
|
245 | + public function getFolder($folder_name, $attributes = 32, $delimiter = null) { |
|
246 | 246 | |
247 | 247 | $delimiter = $delimiter == null ? config('imap.options.delimiter', '/') : $delimiter; |
248 | 248 | |
249 | - $oFolder = new Folder($this, (object)[ |
|
249 | + $oFolder = new Folder($this, (object) [ |
|
250 | 250 | 'name' => $this->getAddress().$folder_name, |
251 | 251 | 'attributes' => $attributes, |
252 | 252 | 'delimiter' => $delimiter |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | * |
314 | 314 | * @return bool |
315 | 315 | */ |
316 | - public function createFolder($name){ |
|
316 | + public function createFolder($name) { |
|
317 | 317 | return imap_createmailbox($this->connection, imap_utf7_encode($name)); |
318 | 318 | } |
319 | 319 | |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * |
413 | 413 | * @return array |
414 | 414 | */ |
415 | - public function getQuota(){ |
|
415 | + public function getQuota() { |
|
416 | 416 | return imap_get_quota($this->connection, 'user.'.$this->username); |
417 | 417 | } |
418 | 418 | |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | * |
424 | 424 | * @return array |
425 | 425 | */ |
426 | - public function getQuotaRoot($quota_root = 'INBOX'){ |
|
426 | + public function getQuotaRoot($quota_root = 'INBOX') { |
|
427 | 427 | return imap_get_quotaroot($this->connection, $quota_root); |
428 | 428 | } |
429 | 429 | |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | * |
433 | 433 | * @return int |
434 | 434 | */ |
435 | - public function countMessages(){ |
|
435 | + public function countMessages() { |
|
436 | 436 | return imap_num_msg($this->connection); |
437 | 437 | } |
438 | 438 | |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | * |
442 | 442 | * @return int |
443 | 443 | */ |
444 | - public function countRecentMessages(){ |
|
444 | + public function countRecentMessages() { |
|
445 | 445 | return imap_num_recent($this->connection); |
446 | 446 | } |
447 | 447 | |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | * |
451 | 451 | * @return array |
452 | 452 | */ |
453 | - public function getAlerts(){ |
|
453 | + public function getAlerts() { |
|
454 | 454 | return imap_alerts(); |
455 | 455 | } |
456 | 456 | |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | * |
460 | 460 | * @return array |
461 | 461 | */ |
462 | - public function getErrors(){ |
|
462 | + public function getErrors() { |
|
463 | 463 | $this->errors = array_merge($this->errors, imap_errors() ?: []); |
464 | 464 | |
465 | 465 | return $this->errors; |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | * |
471 | 471 | * @return string |
472 | 472 | */ |
473 | - public function getLastError(){ |
|
473 | + public function getLastError() { |
|
474 | 474 | return imap_last_error(); |
475 | 475 | } |
476 | 476 | |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | * |
480 | 480 | * @return bool |
481 | 481 | */ |
482 | - public function expunge(){ |
|
482 | + public function expunge() { |
|
483 | 483 | return imap_expunge($this->connection); |
484 | 484 | } |
485 | 485 | |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | * Recent [int(0)] number of recent messages in the mailbox |
495 | 495 | * } |
496 | 496 | */ |
497 | - public function checkCurrentMailbox(){ |
|
497 | + public function checkCurrentMailbox() { |
|
498 | 498 | return imap_check($this->connection); |
499 | 499 | } |
500 | 500 | } |