Passed
Pull Request — master (#113)
by
unknown
03:35
created
src/Folder.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
         $this->setDelimiter($delimiter);
124 124
         $this->path      = $folder_name;
125
-        $this->full_name  = $this->decodeName($folder_name);
125
+        $this->full_name = $this->decodeName($folder_name);
126 126
         $this->name      = $this->getSimpleName($this->delimiter, $this->full_name);
127 127
 
128 128
         $this->parseAttributes($attributes);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      * @throws Exceptions\ConnectionFailedException
137 137
      * @throws Exceptions\RuntimeException
138 138
      */
139
-    public function query($charset = 'UTF-8'){
139
+    public function query($charset = 'UTF-8') {
140 140
         $this->getClient()->checkConnection();
141 141
         $this->getClient()->openFolder($this->path);
142 142
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      * @throws Exceptions\ConnectionFailedException
149 149
      * @throws Exceptions\RuntimeException
150 150
      */
151
-    public function search($charset = 'UTF-8'){
151
+    public function search($charset = 'UTF-8') {
152 152
         return $this->query($charset);
153 153
     }
154 154
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      * @throws Exceptions\ConnectionFailedException
158 158
      * @throws Exceptions\RuntimeException
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
 block discarded – undo
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");
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      * @throws Exceptions\MessageNotFoundException
252 252
      * @throws Exceptions\RuntimeException
253 253
      */
254
-    public function overview($sequence = null){
254
+    public function overview($sequence = null) {
255 255
         $this->client->openFolder($this->path);
256 256
         $sequence = $sequence === null ? "1:*" : $sequence;
257 257
         $uid = ClientManager::get('options.sequence', IMAP::ST_MSGN) == IMAP::ST_UID;
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
          */
277 277
 
278 278
         if ($internal_date != null) {
279
-            if ($internal_date instanceof Carbon){
279
+            if ($internal_date instanceof Carbon) {
280 280
                 $internal_date = $internal_date->format('d-M-Y H:i:s O');
281 281
             }
282 282
         }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function delete($expunge = true) {
312 312
         $status = $this->client->getConnection()->deleteFolder($this->path);
313
-        if($expunge) $this->client->expunge();
313
+        if ($expunge) $this->client->expunge();
314 314
 
315 315
         $event = $this->getEvent("folder", "deleted");
316 316
         $event::dispatch($this);
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
             try {
372 372
                 $line = $connection->nextLine();
373 373
                 if (($pos = strpos($line, "EXISTS")) !== false) {
374
-                    $msgn = (int) substr($line, 2, $pos -2);
374
+                    $msgn = (int) substr($line, 2, $pos - 2);
375 375
                     $connection->done();
376 376
 
377 377
                     $openFolder = $this->client->openFolder($this->path, true);
@@ -385,8 +385,8 @@  discard block
 block discarded – undo
385 385
 
386 386
                     $connection->idle();
387 387
                 }
388
-            }catch (Exceptions\RuntimeException $e) {
389
-                if(strpos($e->getMessage(), "connection closed") === false) {
388
+            } catch (Exceptions\RuntimeException $e) {
389
+                if (strpos($e->getMessage(), "connection closed") === false) {
390 390
                     throw $e;
391 391
                 }
392 392
                 if ($auto_reconnect === true) {
@@ -435,8 +435,8 @@  discard block
 block discarded – undo
435 435
      * Set the delimiter
436 436
      * @param $delimiter
437 437
      */
438
-    public function setDelimiter($delimiter){
439
-        if(in_array($delimiter, [null, '', ' ', false]) === true) {
438
+    public function setDelimiter($delimiter) {
439
+        if (in_array($delimiter, [null, '', ' ', false]) === true) {
440 440
             $delimiter = ClientManager::get('options.delimiter', '/');
441 441
         }
442 442
 
Please login to merge, or discard this patch.