@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $defaultAccount = config('imap.default'); |
136 | 136 | $defaultConfig = config("imap.accounts.$defaultAccount"); |
137 | 137 | |
138 | - foreach($this->validConfigKeys as $key){ |
|
138 | + foreach ($this->validConfigKeys as $key) { |
|
139 | 139 | $this->$key = isset($config[$key]) ? $config[$key] : $defaultConfig[$key]; |
140 | 140 | } |
141 | 141 | |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * |
148 | 148 | * @return resource |
149 | 149 | */ |
150 | - public function getConnection(){ |
|
150 | + public function getConnection() { |
|
151 | 151 | return $this->connection; |
152 | 152 | } |
153 | 153 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $attempts, |
214 | 214 | config('imap.options.open') |
215 | 215 | ); |
216 | - $this->connected = !! $this->connection; |
|
216 | + $this->connected = !!$this->connection; |
|
217 | 217 | } catch (\ErrorException $e) { |
218 | 218 | $errors = imap_errors(); |
219 | 219 | $message = $e->getMessage().'. '.implode("; ", (is_array($errors) ? $errors : array())); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | public function disconnect() { |
233 | 233 | if ($this->isConnected()) { |
234 | 234 | $this->errors = array_merge($this->errors, imap_errors() ?: []); |
235 | - $this->connected = ! imap_close($this->connection, CL_EXPUNGE); |
|
235 | + $this->connected = !imap_close($this->connection, CL_EXPUNGE); |
|
236 | 236 | } |
237 | 237 | |
238 | 238 | return $this; |
@@ -249,11 +249,11 @@ discard block |
||
249 | 249 | * |
250 | 250 | * @return Folder |
251 | 251 | */ |
252 | - public function getFolder($folder_name, $attributes = 32, $delimiter = null){ |
|
252 | + public function getFolder($folder_name, $attributes = 32, $delimiter = null) { |
|
253 | 253 | |
254 | 254 | $delimiter = $delimiter == null ? config('imap.options.delimiter', '/') : $delimiter; |
255 | 255 | |
256 | - $oFolder = new Folder($this, (object)[ |
|
256 | + $oFolder = new Folder($this, (object) [ |
|
257 | 257 | 'name' => $this->getAddress().$folder_name, |
258 | 258 | 'attributes' => $attributes, |
259 | 259 | 'delimiter' => $delimiter |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | * |
321 | 321 | * @return bool |
322 | 322 | */ |
323 | - public function createFolder($name){ |
|
323 | + public function createFolder($name) { |
|
324 | 324 | return imap_createmailbox($this->connection, imap_utf7_encode($name)); |
325 | 325 | } |
326 | 326 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | * |
420 | 420 | * @return array |
421 | 421 | */ |
422 | - public function getQuota(){ |
|
422 | + public function getQuota() { |
|
423 | 423 | return imap_get_quota($this->connection, 'user.'.$this->username); |
424 | 424 | } |
425 | 425 | |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | * |
431 | 431 | * @return array |
432 | 432 | */ |
433 | - public function getQuotaRoot($quota_root = 'INBOX'){ |
|
433 | + public function getQuotaRoot($quota_root = 'INBOX') { |
|
434 | 434 | return imap_get_quotaroot($this->connection, $quota_root); |
435 | 435 | } |
436 | 436 | |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | * |
440 | 440 | * @return int |
441 | 441 | */ |
442 | - public function countMessages(){ |
|
442 | + public function countMessages() { |
|
443 | 443 | return imap_num_msg($this->connection); |
444 | 444 | } |
445 | 445 | |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | * |
449 | 449 | * @return int |
450 | 450 | */ |
451 | - public function countRecentMessages(){ |
|
451 | + public function countRecentMessages() { |
|
452 | 452 | return imap_num_recent($this->connection); |
453 | 453 | } |
454 | 454 | |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | * |
458 | 458 | * @return array |
459 | 459 | */ |
460 | - public function getAlerts(){ |
|
460 | + public function getAlerts() { |
|
461 | 461 | return imap_alerts(); |
462 | 462 | } |
463 | 463 | |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | * |
467 | 467 | * @return array |
468 | 468 | */ |
469 | - public function getErrors(){ |
|
469 | + public function getErrors() { |
|
470 | 470 | $this->errors = array_merge($this->errors, imap_errors() ?: []); |
471 | 471 | |
472 | 472 | return $this->errors; |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | * |
478 | 478 | * @return string |
479 | 479 | */ |
480 | - public function getLastError(){ |
|
480 | + public function getLastError() { |
|
481 | 481 | return imap_last_error(); |
482 | 482 | } |
483 | 483 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | * |
487 | 487 | * @return bool |
488 | 488 | */ |
489 | - public function expunge(){ |
|
489 | + public function expunge() { |
|
490 | 490 | return imap_expunge($this->connection); |
491 | 491 | } |
492 | 492 | |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | * Recent [int(0)] number of recent messages in the mailbox |
502 | 502 | * } |
503 | 503 | */ |
504 | - public function checkCurrentMailbox(){ |
|
504 | + public function checkCurrentMailbox() { |
|
505 | 505 | return imap_check($this->connection); |
506 | 506 | } |
507 | 507 | } |