Skip to content

Commit b8ce799

Browse files
committed
file formatted
1 parent be9bded commit b8ce799

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Connection/Protocols/ImapProtocol.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ protected function enableStartTls() {
114114
*/
115115
public function nextLine(Response $response): string {
116116
$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"])) {
118118
$line .= $next_char;
119119
}
120120
if ($line === "" && ($next_char === false || $next_char === "")) {
@@ -300,7 +300,7 @@ public function readResponse(Response $response, string $tag, bool $dontParse =
300300
$tokens = [trim(substr($tokens, 0, 3))];
301301
}
302302

303-
$original = is_array($original)?$original : [$original];
303+
$original = is_array($original) ? $original : [$original];
304304

305305
// last line has response code
306306
if ($tokens[0] == 'OK') {
@@ -492,7 +492,7 @@ public function logout(): Response {
492492
if (!$this->stream) {
493493
$this->reset();
494494
return new Response(0, $this->debug);
495-
}elseif ($this->meta()["timed_out"]) {
495+
} elseif ($this->meta()["timed_out"]) {
496496
$this->reset();
497497
return new Response(0, $this->debug);
498498
}
@@ -501,7 +501,8 @@ public function logout(): Response {
501501
try {
502502
$result = $this->requestAndResponse('LOGOUT', [], true);
503503
fclose($this->stream);
504-
} catch (\Throwable) {}
504+
} catch (\Throwable) {
505+
}
505506

506507
$this->reset();
507508

@@ -769,7 +770,7 @@ public function fetch(array|string $items, array|int $from, mixed $to = null, in
769770
* @throws RuntimeException
770771
*/
771772
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);
773774
}
774775

775776
/**
@@ -783,7 +784,7 @@ public function content(int|array $uids, string $rfc = "RFC822", int|string $uid
783784
* @throws RuntimeException
784785
*/
785786
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);
787788
}
788789

789790
/**
@@ -796,7 +797,7 @@ public function headers(int|array $uids, string $rfc = "RFC822", int|string $uid
796797
* @throws RuntimeException
797798
*/
798799
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);
800801
}
801802

802803
/**
@@ -809,7 +810,7 @@ public function flags(int|array $uids, int|string $uid = IMAP::ST_UID): Response
809810
* @throws RuntimeException
810811
*/
811812
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);
813814
}
814815

815816
/**

0 commit comments

Comments
 (0)