@@ -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)); |
@@ -59,17 +59,17 @@ discard block |
||
| 59 | 59 | foreach($criteria as $arguments){ |
| 60 | 60 | if(count($arguments) == 1){ |
| 61 | 61 | $this->where($arguments[0]); |
| 62 | - }elseif(count($arguments) == 2){ |
|
| 62 | + } elseif(count($arguments) == 2){ |
|
| 63 | 63 | $this->where($arguments[0], $arguments[1]); |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | - }else{ |
|
| 66 | + } else{ |
|
| 67 | 67 | $criteria = $this->validate_criteria($criteria); |
| 68 | 68 | $value = $this->parse_value($value); |
| 69 | 69 | |
| 70 | 70 | if($value === null || $value === ''){ |
| 71 | 71 | $this->query->push([$criteria]); |
| 72 | - }else{ |
|
| 72 | + } else{ |
|
| 73 | 73 | $this->query->push([$criteria, $value]); |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -84,7 +84,9 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function orWhere(\Closure $closure = null){ |
| 86 | 86 | $this->query->push(['OR']); |
| 87 | - if($closure !== null) $closure($this); |
|
| 87 | + if($closure !== null) { |
|
| 88 | + $closure($this); |
|
| 89 | + } |
|
| 88 | 90 | |
| 89 | 91 | return $this; |
| 90 | 92 | } |
@@ -96,7 +98,9 @@ discard block |
||
| 96 | 98 | */ |
| 97 | 99 | public function andWhere(\Closure $closure = null) { |
| 98 | 100 | $this->query->push(['AND']); |
| 99 | - if($closure !== null) $closure($this); |
|
| 101 | + if($closure !== null) { |
|
| 102 | + $closure($this); |
|
| 103 | + } |
|
| 100 | 104 | |
| 101 | 105 | return $this; |
| 102 | 106 | } |
@@ -97,7 +97,9 @@ discard block |
||
| 97 | 97 | * @throws MessageSearchValidationException |
| 98 | 98 | */ |
| 99 | 99 | protected function parse_date($date){ |
| 100 | - if($date instanceof \Carbon\Carbon) return $date; |
|
| 100 | + if($date instanceof \Carbon\Carbon) { |
|
| 101 | + return $date; |
|
| 102 | + } |
|
| 101 | 103 | |
| 102 | 104 | try { |
| 103 | 105 | $date = Carbon::parse($date); |
@@ -169,7 +171,7 @@ discard block |
||
| 169 | 171 | } else { |
| 170 | 172 | if($statement[1] === null){ |
| 171 | 173 | $query .= $statement[0]; |
| 172 | - }else{ |
|
| 174 | + } else{ |
|
| 173 | 175 | $query .= $statement[0].' "'.$statement[1].'"'; |
| 174 | 176 | } |
| 175 | 177 | } |
@@ -198,7 +200,9 @@ discard block |
||
| 198 | 200 | * @return $this |
| 199 | 201 | */ |
| 200 | 202 | public function limit($limit, $page = 1){ |
| 201 | - if($page >= 1) $this->page = $page; |
|
| 203 | + if($page >= 1) { |
|
| 204 | + $this->page = $page; |
|
| 205 | + } |
|
| 202 | 206 | $this->limit = $limit; |
| 203 | 207 | |
| 204 | 208 | return $this; |