@@ -338,13 +338,13 @@ |
||
| 338 | 338 | return imap_renamemailbox($this->connection, $this->getAddress() . imap_utf7_encode($old_name), $this->getAddress() . imap_utf7_encode($new_name)); |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - /** |
|
| 342 | - * Delete Folder |
|
| 343 | - * @param string $name |
|
| 344 | - * |
|
| 345 | - * @return bool |
|
| 346 | - * @throws ConnectionFailedException |
|
| 347 | - */ |
|
| 341 | + /** |
|
| 342 | + * Delete Folder |
|
| 343 | + * @param string $name |
|
| 344 | + * |
|
| 345 | + * @return bool |
|
| 346 | + * @throws ConnectionFailedException |
|
| 347 | + */ |
|
| 348 | 348 | public function deleteFolder($name) { |
| 349 | 349 | $this->checkConnection(); |
| 350 | 350 | return imap_deletemailbox($this->connection, $this->getAddress() . imap_utf7_encode($name)); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | */ |
| 323 | 323 | public function createFolder($name) { |
| 324 | 324 | $this->checkConnection(); |
| 325 | - return imap_createmailbox($this->connection, $this->getAddress() . imap_utf7_encode($name)); |
|
| 325 | + return imap_createmailbox($this->connection, $this->getAddress().imap_utf7_encode($name)); |
|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | /** |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | public function renameFolder($old_name, $new_name) { |
| 337 | 337 | $this->checkConnection(); |
| 338 | - return imap_renamemailbox($this->connection, $this->getAddress() . imap_utf7_encode($old_name), $this->getAddress() . imap_utf7_encode($new_name)); |
|
| 338 | + return imap_renamemailbox($this->connection, $this->getAddress().imap_utf7_encode($old_name), $this->getAddress().imap_utf7_encode($new_name)); |
|
| 339 | 339 | } |
| 340 | 340 | |
| 341 | 341 | /** |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | */ |
| 348 | 348 | public function deleteFolder($name) { |
| 349 | 349 | $this->checkConnection(); |
| 350 | - return imap_deletemailbox($this->connection, $this->getAddress() . imap_utf7_encode($name)); |
|
| 350 | + return imap_deletemailbox($this->connection, $this->getAddress().imap_utf7_encode($name)); |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | /** |
@@ -238,14 +238,14 @@ |
||
| 238 | 238 | /** |
| 239 | 239 | * @return string|null |
| 240 | 240 | */ |
| 241 | - public function getMimeType(){ |
|
| 241 | + public function getMimeType() { |
|
| 242 | 242 | return (new \finfo())->buffer($this->getContent(), FILEINFO_MIME_TYPE); |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | /** |
| 246 | 246 | * @return string|null |
| 247 | 247 | */ |
| 248 | - public function getExtension(){ |
|
| 248 | + public function getExtension() { |
|
| 249 | 249 | return ExtensionGuesser::getInstance()->guess($this->getMimeType()); |
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | \ No newline at end of file |
@@ -295,7 +295,7 @@ |
||
| 295 | 295 | $numMessages = imap_num_msg($this->getClient()->getConnection()); |
| 296 | 296 | if($limit == null || $limit > $numMessages){ |
| 297 | 297 | $maxMessages = $numMessages; |
| 298 | - }else{ |
|
| 298 | + } else{ |
|
| 299 | 299 | $maxMessages = $limit; |
| 300 | 300 | } |
| 301 | 301 | if ($availableMessages !== false) { |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | * / ( ("+" / "-") 4DIGIT ) ; Local differential |
| 263 | 263 | * ; hours+min. (HHMM) |
| 264 | 264 | */ |
| 265 | - public function searchMessages(array $where, $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = false, $charset = "UTF-8", $limit = null, $page = 1) { |
|
| 265 | + public function searchMessages(array $where, $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = false, $charset = "UTF-8", $limit = null, $page = 1) { |
|
| 266 | 266 | |
| 267 | 267 | $this->getClient()->checkConnection(); |
| 268 | 268 | |
@@ -293,13 +293,13 @@ discard block |
||
| 293 | 293 | $availableMessages = array_reverse(imap_search($this->getClient()->getConnection(), $query, SE_UID, $charset)); |
| 294 | 294 | |
| 295 | 295 | $numMessages = imap_num_msg($this->getClient()->getConnection()); |
| 296 | - if($limit == null || $limit > $numMessages){ |
|
| 296 | + if ($limit == null || $limit > $numMessages) { |
|
| 297 | 297 | $maxMessages = $numMessages; |
| 298 | - }else{ |
|
| 298 | + } else { |
|
| 299 | 299 | $maxMessages = $limit; |
| 300 | 300 | } |
| 301 | 301 | if ($availableMessages !== false) { |
| 302 | - for ($msglist = ($page * $maxMessages) - $limit; $msglist < $page * $maxMessages; $msglist++){ |
|
| 302 | + for ($msglist = ($page * $maxMessages) - $limit; $msglist < $page * $maxMessages; $msglist++) { |
|
| 303 | 303 | $msgno = $availableMessages[$msglist]; |
| 304 | 304 | $message = new Message($msgno, $msglist, $this->getClient(), $fetch_options, $fetch_body, $fetch_attachment, $fetch_flags); |
| 305 | 305 | $messages->put($message->getMessageId(), $message); |