@@ -346,13 +346,13 @@ |
||
| 346 | 346 | return imap_renamemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($old_name), $this->getAddress() . imap_utf7_encode($new_name)); |
| 347 | 347 | } |
| 348 | 348 | |
| 349 | - /** |
|
| 350 | - * Delete Folder |
|
| 351 | - * @param string $name |
|
| 352 | - * |
|
| 353 | - * @return bool |
|
| 354 | - * @throws ConnectionFailedException |
|
| 355 | - */ |
|
| 349 | + /** |
|
| 350 | + * Delete Folder |
|
| 351 | + * @param string $name |
|
| 352 | + * |
|
| 353 | + * @return bool |
|
| 354 | + * @throws ConnectionFailedException |
|
| 355 | + */ |
|
| 356 | 356 | public function deleteFolder($name) { |
| 357 | 357 | $this->checkConnection(); |
| 358 | 358 | return imap_deletemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * |
| 114 | 114 | * @var array $validConfigKeys |
| 115 | 115 | */ |
| 116 | - protected $validConfigKeys = ['host', 'port', 'encryption', 'validate_cert', 'username', 'password','protocol']; |
|
| 116 | + protected $validConfigKeys = ['host', 'port', 'encryption', 'validate_cert', 'username', 'password', 'protocol']; |
|
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * Client constructor. |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | public function createFolder($name) { |
| 332 | 332 | $this->checkConnection(); |
| 333 | - return imap_createmailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
|
| 333 | + return imap_createmailbox($this->getConnection(), $this->getAddress().imap_utf7_encode($name)); |
|
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | /** |
@@ -343,7 +343,7 @@ discard block |
||
| 343 | 343 | */ |
| 344 | 344 | public function renameFolder($old_name, $new_name) { |
| 345 | 345 | $this->checkConnection(); |
| 346 | - return imap_renamemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($old_name), $this->getAddress() . imap_utf7_encode($new_name)); |
|
| 346 | + return imap_renamemailbox($this->getConnection(), $this->getAddress().imap_utf7_encode($old_name), $this->getAddress().imap_utf7_encode($new_name)); |
|
| 347 | 347 | } |
| 348 | 348 | |
| 349 | 349 | /** |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | */ |
| 356 | 356 | public function deleteFolder($name) { |
| 357 | 357 | $this->checkConnection(); |
| 358 | - return imap_deletemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
|
| 358 | + return imap_deletemailbox($this->getConnection(), $this->getAddress().imap_utf7_encode($name)); |
|
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | /** |
@@ -443,7 +443,7 @@ discard block |
||
| 443 | 443 | if (!$this->validate_cert) { |
| 444 | 444 | $address .= '/novalidate-cert'; |
| 445 | 445 | } |
| 446 | - if (in_array($this->encryption,['tls','ssl'])) { |
|
| 446 | + if (in_array($this->encryption, ['tls', 'ssl'])) { |
|
| 447 | 447 | $address .= '/'.$this->encryption; |
| 448 | 448 | } |
| 449 | 449 | $address .= '}'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * If however the default account is missing a parameter the package default account parameter will be used. |
| 59 | 59 | * This can be disabled by setting imap.default in your config file to 'false' |
| 60 | 60 | */ |
| 61 | - private function setVendorConfig(){ |
|
| 61 | + private function setVendorConfig() { |
|
| 62 | 62 | |
| 63 | 63 | $config_key = 'imap'; |
| 64 | 64 | $path = __DIR__.'/../../config/'.$config_key.'.php'; |
@@ -70,17 +70,17 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | $config = $this->app['config']->get($config_key); |
| 72 | 72 | |
| 73 | - if(is_array($config)){ |
|
| 74 | - if(isset($config['default'])){ |
|
| 75 | - if(isset($config['accounts']) && $config['default'] != false){ |
|
| 73 | + if (is_array($config)) { |
|
| 74 | + if (isset($config['default'])) { |
|
| 75 | + if (isset($config['accounts']) && $config['default'] != false) { |
|
| 76 | 76 | |
| 77 | 77 | $default_config = $vendor_config['accounts']['default']; |
| 78 | - if(isset($config['accounts'][$config['default']])){ |
|
| 78 | + if (isset($config['accounts'][$config['default']])) { |
|
| 79 | 79 | $default_config = array_merge($default_config, $config['accounts'][$config['default']]); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - if(is_array($config['accounts'])){ |
|
| 83 | - foreach($config['accounts'] as $account_key => $account){ |
|
| 82 | + if (is_array($config['accounts'])) { |
|
| 83 | + foreach ($config['accounts'] as $account_key => $account) { |
|
| 84 | 84 | $config['accounts'][$account_key] = array_merge($default_config, $account); |
| 85 | 85 | } |
| 86 | 86 | } |