@@ -114,7 +114,7 @@ protected function enableStartTls() {
114
114
*/
115
115
public function nextLine (Response $ response ): string {
116
116
$ line = "" ;
117
- while (($ next_char = fread ($ this ->stream , 1 )) !== false && !in_array ($ next_char , ["" ,"\n" ])) {
117
+ while (($ next_char = fread ($ this ->stream , 1 )) !== false && !in_array ($ next_char , ["" , "\n" ])) {
118
118
$ line .= $ next_char ;
119
119
}
120
120
if ($ line === "" && ($ next_char === false || $ next_char === "" )) {
@@ -300,7 +300,7 @@ public function readResponse(Response $response, string $tag, bool $dontParse =
300
300
$ tokens = [trim (substr ($ tokens , 0 , 3 ))];
301
301
}
302
302
303
- $ original = is_array ($ original )? $ original : [$ original ];
303
+ $ original = is_array ($ original ) ? $ original : [$ original ];
304
304
305
305
// last line has response code
306
306
if ($ tokens [0 ] == 'OK ' ) {
@@ -492,7 +492,7 @@ public function logout(): Response {
492
492
if (!$ this ->stream ) {
493
493
$ this ->reset ();
494
494
return new Response (0 , $ this ->debug );
495
- }elseif ($ this ->meta ()["timed_out " ]) {
495
+ } elseif ($ this ->meta ()["timed_out " ]) {
496
496
$ this ->reset ();
497
497
return new Response (0 , $ this ->debug );
498
498
}
@@ -501,7 +501,8 @@ public function logout(): Response {
501
501
try {
502
502
$ result = $ this ->requestAndResponse ('LOGOUT ' , [], true );
503
503
fclose ($ this ->stream );
504
- } catch (\Throwable ) {}
504
+ } catch (\Throwable ) {
505
+ }
505
506
506
507
$ this ->reset ();
507
508
@@ -769,7 +770,7 @@ public function fetch(array|string $items, array|int $from, mixed $to = null, in
769
770
* @throws RuntimeException
770
771
*/
771
772
public function content (int |array $ uids , string $ rfc = "RFC822 " , int |string $ uid = IMAP ::ST_UID ): Response {
772
- return $ this ->fetch (["$ rfc.TEXT " ], is_array ($ uids )? $ uids: [$ uids ], null , $ uid );
773
+ return $ this ->fetch (["$ rfc.TEXT " ], is_array ($ uids ) ? $ uids : [$ uids ], null , $ uid );
773
774
}
774
775
775
776
/**
@@ -783,7 +784,7 @@ public function content(int|array $uids, string $rfc = "RFC822", int|string $uid
783
784
* @throws RuntimeException
784
785
*/
785
786
public function headers (int |array $ uids , string $ rfc = "RFC822 " , int |string $ uid = IMAP ::ST_UID ): Response {
786
- return $ this ->fetch (["$ rfc.HEADER " ], is_array ($ uids )? $ uids: [$ uids ], null , $ uid );
787
+ return $ this ->fetch (["$ rfc.HEADER " ], is_array ($ uids ) ? $ uids : [$ uids ], null , $ uid );
787
788
}
788
789
789
790
/**
@@ -796,7 +797,7 @@ public function headers(int|array $uids, string $rfc = "RFC822", int|string $uid
796
797
* @throws RuntimeException
797
798
*/
798
799
public function flags (int |array $ uids , int |string $ uid = IMAP ::ST_UID ): Response {
799
- return $ this ->fetch (["FLAGS " ], is_array ($ uids )? $ uids: [$ uids ], null , $ uid );
800
+ return $ this ->fetch (["FLAGS " ], is_array ($ uids ) ? $ uids : [$ uids ], null , $ uid );
800
801
}
801
802
802
803
/**
@@ -809,7 +810,7 @@ public function flags(int|array $uids, int|string $uid = IMAP::ST_UID): Response
809
810
* @throws RuntimeException
810
811
*/
811
812
public function sizes (int |array $ uids , int |string $ uid = IMAP ::ST_UID ): Response {
812
- return $ this ->fetch (["RFC822.SIZE " ], is_array ($ uids )? $ uids: [$ uids ], null , $ uid );
813
+ return $ this ->fetch (["RFC822.SIZE " ], is_array ($ uids ) ? $ uids : [$ uids ], null , $ uid );
813
814
}
814
815
815
816
/**
0 commit comments