@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $this->setDelimiter($delimiter); |
| 127 | 127 | $this->path = $folder_name; |
| 128 | - $this->full_name = $this->decodeName($folder_name); |
|
| 128 | + $this->full_name = $this->decodeName($folder_name); |
|
| 129 | 129 | $this->name = $this->getSimpleName($this->delimiter, $this->full_name); |
| 130 | 130 | |
| 131 | 131 | $this->parseAttributes($attributes); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @return WhereQuery |
| 139 | 139 | * @throws Exceptions\ConnectionFailedException |
| 140 | 140 | */ |
| 141 | - public function query($charset = 'UTF-8'){ |
|
| 141 | + public function query($charset = 'UTF-8') { |
|
| 142 | 142 | $this->getClient()->checkConnection(); |
| 143 | 143 | $this->getClient()->openFolder($this->path); |
| 144 | 144 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * @inheritdoc self::query($charset = 'UTF-8') |
| 150 | 150 | * @throws Exceptions\ConnectionFailedException |
| 151 | 151 | */ |
| 152 | - public function search($charset = 'UTF-8'){ |
|
| 152 | + public function search($charset = 'UTF-8') { |
|
| 153 | 153 | return $this->query($charset); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | * @inheritdoc self::query($charset = 'UTF-8') |
| 158 | 158 | * @throws Exceptions\ConnectionFailedException |
| 159 | 159 | */ |
| 160 | - public function messages($charset = 'UTF-8'){ |
|
| 160 | + public function messages($charset = 'UTF-8') { |
|
| 161 | 161 | return $this->query($charset); |
| 162 | 162 | } |
| 163 | 163 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | public function move($new_name, $expunge = true) { |
| 233 | 233 | $this->client->checkConnection(); |
| 234 | 234 | $status = $this->client->getConnection()->renameFolder($this->full_name, $new_name); |
| 235 | - if($expunge) $this->client->expunge(); |
|
| 235 | + if ($expunge) $this->client->expunge(); |
|
| 236 | 236 | |
| 237 | 237 | $folder = $this->client->getFolder($new_name); |
| 238 | 238 | $event = $this->getEvent("folder", "moved"); |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * @return array |
| 249 | 249 | * @throws ConnectionFailedException |
| 250 | 250 | */ |
| 251 | - public function overview($sequence = null){ |
|
| 251 | + public function overview($sequence = null) { |
|
| 252 | 252 | $this->client->openFolder($this->path); |
| 253 | 253 | $sequence = $sequence === null ? "1:*" : $sequence; |
| 254 | 254 | return $this->client->getConnection()->overview($sequence); |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | |
| 274 | 274 | if ($internal_date != null) { |
| 275 | - if ($internal_date instanceof Carbon){ |
|
| 275 | + if ($internal_date instanceof Carbon) { |
|
| 276 | 276 | $internal_date = $internal_date->format('d-M-Y H:i:s O'); |
| 277 | 277 | } |
| 278 | 278 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | */ |
| 307 | 307 | public function delete($expunge = true) { |
| 308 | 308 | $status = $this->client->getConnection()->deleteFolder($this->path); |
| 309 | - if($expunge) $this->client->expunge(); |
|
| 309 | + if ($expunge) $this->client->expunge(); |
|
| 310 | 310 | |
| 311 | 311 | $event = $this->getEvent("folder", "deleted"); |
| 312 | 312 | $event::dispatch($this); |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | $line = $connection->nextLine(); |
| 363 | 363 | var_dump($line); |
| 364 | 364 | if (($pos = strpos($line, "EXISTS")) !== false) { |
| 365 | - $msgn = (int) substr($line, 2, $pos -2); |
|
| 365 | + $msgn = (int) substr($line, 2, $pos - 2); |
|
| 366 | 366 | $connection->done(); |
| 367 | 367 | |
| 368 | 368 | $this->client->openFolder($this->path, true); |
@@ -374,8 +374,8 @@ discard block |
||
| 374 | 374 | |
| 375 | 375 | $connection->idle(); |
| 376 | 376 | } |
| 377 | - }catch (Exceptions\RuntimeException $e) { |
|
| 378 | - if(strpos($e->getMessage(), "connection closed") === false) { |
|
| 377 | + } catch (Exceptions\RuntimeException $e) { |
|
| 378 | + if (strpos($e->getMessage(), "connection closed") === false) { |
|
| 379 | 379 | throw $e; |
| 380 | 380 | } |
| 381 | 381 | } |
@@ -417,8 +417,8 @@ discard block |
||
| 417 | 417 | * Set the delimiter |
| 418 | 418 | * @param $delimiter |
| 419 | 419 | */ |
| 420 | - public function setDelimiter($delimiter){ |
|
| 421 | - if(in_array($delimiter, [null, '', ' ', false]) === true) { |
|
| 420 | + public function setDelimiter($delimiter) { |
|
| 421 | + if (in_array($delimiter, [null, '', ' ', false]) === true) { |
|
| 422 | 422 | $delimiter = ClientManager::get('options.delimiter', '/'); |
| 423 | 423 | } |
| 424 | 424 | |
@@ -232,7 +232,9 @@ discard block |
||
| 232 | 232 | public function move($new_name, $expunge = true) { |
| 233 | 233 | $this->client->checkConnection(); |
| 234 | 234 | $status = $this->client->getConnection()->renameFolder($this->full_name, $new_name); |
| 235 | - if($expunge) $this->client->expunge(); |
|
| 235 | + if($expunge) { |
|
| 236 | + $this->client->expunge(); |
|
| 237 | + } |
|
| 236 | 238 | |
| 237 | 239 | $folder = $this->client->getFolder($new_name); |
| 238 | 240 | $event = $this->getEvent("folder", "moved"); |
@@ -306,7 +308,9 @@ discard block |
||
| 306 | 308 | */ |
| 307 | 309 | public function delete($expunge = true) { |
| 308 | 310 | $status = $this->client->getConnection()->deleteFolder($this->path); |
| 309 | - if($expunge) $this->client->expunge(); |
|
| 311 | + if($expunge) { |
|
| 312 | + $this->client->expunge(); |
|
| 313 | + } |
|
| 310 | 314 | |
| 311 | 315 | $event = $this->getEvent("folder", "deleted"); |
| 312 | 316 | $event::dispatch($this); |
@@ -374,7 +378,7 @@ discard block |
||
| 374 | 378 | |
| 375 | 379 | $connection->idle(); |
| 376 | 380 | } |
| 377 | - }catch (Exceptions\RuntimeException $e) { |
|
| 381 | + } catch (Exceptions\RuntimeException $e) { |
|
| 378 | 382 | if(strpos($e->getMessage(), "connection closed") === false) { |
| 379 | 383 | throw $e; |
| 380 | 384 | } |