@@ -179,39 +179,39 @@ discard block |
||
179 | 179 | if(isset($config['masks']['message'])) { |
180 | 180 | if(class_exists($config['masks']['message'])) { |
181 | 181 | $this->default_message_mask = $config['masks']['message']; |
182 | - }else{ |
|
182 | + } else{ |
|
183 | 183 | throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['message']); |
184 | 184 | } |
185 | - }else{ |
|
185 | + } else{ |
|
186 | 186 | if(class_exists($default_config['message'])) { |
187 | 187 | $this->default_message_mask = $default_config['message']; |
188 | - }else{ |
|
188 | + } else{ |
|
189 | 189 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); |
190 | 190 | } |
191 | 191 | } |
192 | 192 | if(isset($config['masks']['attachment'])) { |
193 | 193 | if(class_exists($config['masks']['attachment'])) { |
194 | 194 | $this->default_message_mask = $config['masks']['attachment']; |
195 | - }else{ |
|
195 | + } else{ |
|
196 | 196 | throw new MaskNotFoundException("Unknown mask provided: ".$config['masks']['attachment']); |
197 | 197 | } |
198 | - }else{ |
|
198 | + } else{ |
|
199 | 199 | if(class_exists($default_config['attachment'])) { |
200 | 200 | $this->default_message_mask = $default_config['attachment']; |
201 | - }else{ |
|
201 | + } else{ |
|
202 | 202 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); |
203 | 203 | } |
204 | 204 | } |
205 | - }else{ |
|
205 | + } else{ |
|
206 | 206 | if(class_exists($default_config['message'])) { |
207 | 207 | $this->default_message_mask = $default_config['message']; |
208 | - }else{ |
|
208 | + } else{ |
|
209 | 209 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['message']); |
210 | 210 | } |
211 | 211 | |
212 | 212 | if(class_exists($default_config['attachment'])) { |
213 | 213 | $this->default_message_mask = $default_config['attachment']; |
214 | - }else{ |
|
214 | + } else{ |
|
215 | 215 | throw new MaskNotFoundException("Unknown mask provided: ".$default_config['attachment']); |
216 | 216 | } |
217 | 217 | } |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | } |
374 | 374 | |
375 | 375 | return $folders; |
376 | - }else{ |
|
376 | + } else{ |
|
377 | 377 | throw new MailboxFetchingException($this->getLastError()); |
378 | 378 | } |
379 | 379 | } |
@@ -407,7 +407,9 @@ discard block |
||
407 | 407 | public function createFolder($name, $expunge = true) { |
408 | 408 | $this->checkConnection(); |
409 | 409 | $status = imap_createmailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
410 | - if($expunge) $this->expunge(); |
|
410 | + if($expunge) { |
|
411 | + $this->expunge(); |
|
412 | + } |
|
411 | 413 | |
412 | 414 | return $status; |
413 | 415 | } |
@@ -424,7 +426,9 @@ discard block |
||
424 | 426 | public function renameFolder($old_name, $new_name, $expunge = true) { |
425 | 427 | $this->checkConnection(); |
426 | 428 | $status = imap_renamemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($old_name), $this->getAddress() . imap_utf7_encode($new_name)); |
427 | - if($expunge) $this->expunge(); |
|
429 | + if($expunge) { |
|
430 | + $this->expunge(); |
|
431 | + } |
|
428 | 432 | |
429 | 433 | return $status; |
430 | 434 | } |
@@ -440,7 +444,9 @@ discard block |
||
440 | 444 | public function deleteFolder($name, $expunge = true) { |
441 | 445 | $this->checkConnection(); |
442 | 446 | $status = imap_deletemailbox($this->getConnection(), $this->getAddress() . imap_utf7_encode($name)); |
443 | - if($expunge) $this->expunge(); |
|
447 | + if($expunge) { |
|
448 | + $this->expunge(); |
|
449 | + } |
|
444 | 450 | |
445 | 451 | return $status; |
446 | 452 | } |