@@ -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 | } |
@@ -114,23 +114,23 @@ discard block |
||
| 114 | 114 | $arrays = func_get_args(); |
| 115 | 115 | $base = array_shift($arrays); |
| 116 | 116 | |
| 117 | - if(!is_array($base)) $base = empty($base) ? array() : array($base); |
|
| 117 | + if (!is_array($base)) $base = empty($base) ? array() : array($base); |
|
| 118 | 118 | |
| 119 | - foreach($arrays as $append) { |
|
| 119 | + foreach ($arrays as $append) { |
|
| 120 | 120 | |
| 121 | - if(!is_array($append)) $append = array($append); |
|
| 121 | + if (!is_array($append)) $append = array($append); |
|
| 122 | 122 | |
| 123 | - foreach($append as $key => $value) { |
|
| 123 | + foreach ($append as $key => $value) { |
|
| 124 | 124 | |
| 125 | - if(!array_key_exists($key, $base) and !is_numeric($key)) { |
|
| 125 | + if (!array_key_exists($key, $base) and !is_numeric($key)) { |
|
| 126 | 126 | $base[$key] = $append[$key]; |
| 127 | 127 | continue; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - if(is_array($value) or is_array($base[$key])) { |
|
| 130 | + if (is_array($value) or is_array($base[$key])) { |
|
| 131 | 131 | $base[$key] = $this->array_merge_recursive_distinct($base[$key], $append[$key]); |
| 132 | - } else if(is_numeric($key)) { |
|
| 133 | - if(!in_array($value, $base)) $base[] = $value; |
|
| 132 | + } else if (is_numeric($key)) { |
|
| 133 | + if (!in_array($value, $base)) $base[] = $value; |
|
| 134 | 134 | } else { |
| 135 | 135 | $base[$key] = $value; |
| 136 | 136 | } |