@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | $value = $this->default_account_config[$key]; |
215 | 215 | if(isset($config[$key])) { |
216 | 216 | $value = $config[$key]; |
217 | - }elseif(isset($default_config[$key])) { |
|
217 | + } elseif(isset($default_config[$key])) { |
|
218 | 218 | $value = $default_config[$key]; |
219 | 219 | } |
220 | 220 | $this->$key = $value; |
@@ -246,39 +246,39 @@ discard block |
||
246 | 246 | if(isset($config['masks']['message'])) { |
247 | 247 | if(class_exists($config['masks']['message'])) { |
248 | 248 | $this->default_message_mask = $config['masks']['message']; |
249 | - }else{ |
|
249 | + } else{ |
|
250 | 250 | throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['message']); |
251 | 251 | } |
252 | - }else{ |
|
252 | + } else{ |
|
253 | 253 | if(class_exists($default_config['message'])) { |
254 | 254 | $this->default_message_mask = $default_config['message']; |
255 | - }else{ |
|
255 | + } else{ |
|
256 | 256 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); |
257 | 257 | } |
258 | 258 | } |
259 | 259 | if(isset($config['masks']['attachment'])) { |
260 | 260 | if(class_exists($config['masks']['attachment'])) { |
261 | 261 | $this->default_attachment_mask = $config['masks']['attachment']; |
262 | - }else{ |
|
262 | + } else{ |
|
263 | 263 | throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['attachment']); |
264 | 264 | } |
265 | - }else{ |
|
265 | + } else{ |
|
266 | 266 | if(class_exists($default_config['attachment'])) { |
267 | 267 | $this->default_attachment_mask = $default_config['attachment']; |
268 | - }else{ |
|
268 | + } else{ |
|
269 | 269 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); |
270 | 270 | } |
271 | 271 | } |
272 | - }else{ |
|
272 | + } else{ |
|
273 | 273 | if(class_exists($default_config['message'])) { |
274 | 274 | $this->default_message_mask = $default_config['message']; |
275 | - }else{ |
|
275 | + } else{ |
|
276 | 276 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); |
277 | 277 | } |
278 | 278 | |
279 | 279 | if(class_exists($default_config['attachment'])) { |
280 | 280 | $this->default_attachment_mask = $default_config['attachment']; |
281 | - }else{ |
|
281 | + } else{ |
|
282 | 282 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); |
283 | 283 | } |
284 | 284 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | $this->connection = new ImapProtocol($this->validate_cert, $this->encryption); |
343 | 343 | $this->connection->setConnectionTimeout($this->timeout); |
344 | 344 | $this->connection->setProxy($this->proxy); |
345 | - }else{ |
|
345 | + } else{ |
|
346 | 346 | if (extension_loaded('imap') === false) { |
347 | 347 | throw new ConnectionFailedException("connection setup failed", 0, new ProtocolNotSupportedException($protocol." is an unsupported protocol")); |
348 | 348 | } |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | } |
491 | 491 | |
492 | 492 | return $folders; |
493 | - }else{ |
|
493 | + } else{ |
|
494 | 494 | throw new FolderFetchingException("failed to fetch any folders"); |
495 | 495 | } |
496 | 496 | } |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | } |
531 | 531 | |
532 | 532 | return $folders; |
533 | - }else{ |
|
533 | + } else{ |
|
534 | 534 | throw new FolderFetchingException("failed to fetch any folders"); |
535 | 535 | } |
536 | 536 | } |
@@ -568,7 +568,9 @@ discard block |
||
568 | 568 | $this->checkConnection(); |
569 | 569 | $status = $this->connection->createFolder($folder); |
570 | 570 | |
571 | - if($expunge) $this->expunge(); |
|
571 | + if($expunge) { |
|
572 | + $this->expunge(); |
|
573 | + } |
|
572 | 574 | |
573 | 575 | $folder = $this->getFolderByPath($folder); |
574 | 576 | if($status && $folder) { |