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