@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $value = $this->default_account_config[$key]; |
182 | 182 | if(isset($config[$key])) { |
183 | 183 | $value = $config[$key]; |
184 | - }elseif(isset($default_config[$key])) { |
|
184 | + } elseif(isset($default_config[$key])) { |
|
185 | 185 | $value = $default_config[$key]; |
186 | 186 | } |
187 | 187 | $this->$key = $value; |
@@ -215,39 +215,39 @@ discard block |
||
215 | 215 | if(isset($config['masks']['message'])) { |
216 | 216 | if(class_exists($config['masks']['message'])) { |
217 | 217 | $this->default_message_mask = $config['masks']['message']; |
218 | - }else{ |
|
218 | + } else{ |
|
219 | 219 | throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['message']); |
220 | 220 | } |
221 | - }else{ |
|
221 | + } else{ |
|
222 | 222 | if(class_exists($default_config['message'])) { |
223 | 223 | $this->default_message_mask = $default_config['message']; |
224 | - }else{ |
|
224 | + } else{ |
|
225 | 225 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); |
226 | 226 | } |
227 | 227 | } |
228 | 228 | if(isset($config['masks']['attachment'])) { |
229 | 229 | if(class_exists($config['masks']['attachment'])) { |
230 | 230 | $this->default_message_mask = $config['masks']['attachment']; |
231 | - }else{ |
|
231 | + } else{ |
|
232 | 232 | throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['attachment']); |
233 | 233 | } |
234 | - }else{ |
|
234 | + } else{ |
|
235 | 235 | if(class_exists($default_config['attachment'])) { |
236 | 236 | $this->default_message_mask = $default_config['attachment']; |
237 | - }else{ |
|
237 | + } else{ |
|
238 | 238 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); |
239 | 239 | } |
240 | 240 | } |
241 | - }else{ |
|
241 | + } else{ |
|
242 | 242 | if(class_exists($default_config['message'])) { |
243 | 243 | $this->default_message_mask = $default_config['message']; |
244 | - }else{ |
|
244 | + } else{ |
|
245 | 245 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); |
246 | 246 | } |
247 | 247 | |
248 | 248 | if(class_exists($default_config['attachment'])) { |
249 | 249 | $this->default_message_mask = $default_config['attachment']; |
250 | - }else{ |
|
250 | + } else{ |
|
251 | 251 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); |
252 | 252 | } |
253 | 253 | } |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $timeout = $this->connection !== false ? $this->connection->getConnectionTimeout() : null; |
312 | 312 | $this->connection = new ImapProtocol($this->validate_cert); |
313 | 313 | $this->connection->setConnectionTimeout($timeout); |
314 | - }else{ |
|
314 | + } else{ |
|
315 | 315 | if (extension_loaded('imap') === false) { |
316 | 316 | throw new ConnectionFailedException("connection setup failed", 0, new ProtocolNotSupportedException($protocol." is an unsupported protocol")); |
317 | 317 | } |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | } |
440 | 440 | |
441 | 441 | return $folders; |
442 | - }else{ |
|
442 | + } else{ |
|
443 | 443 | throw new FolderFetchingException("failed to fetch any folders"); |
444 | 444 | } |
445 | 445 | } |
@@ -475,7 +475,9 @@ discard block |
||
475 | 475 | $this->checkConnection(); |
476 | 476 | $status = $this->connection->createFolder($folder); |
477 | 477 | |
478 | - if($expunge) $this->expunge(); |
|
478 | + if($expunge) { |
|
479 | + $this->expunge(); |
|
480 | + } |
|
479 | 481 | |
480 | 482 | $folder = $this->getFolder($folder); |
481 | 483 | if($status && $folder) { |