Skip to content

Commit 9e5a6ff

Browse files
nikajorjikagithub-actions[bot]
authored andcommitted
Fix styling
1 parent 7bf29b5 commit 9e5a6ff

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

routes/inbox.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
use Redberry\MailboxForLaravel\Http\Controllers\AssetController;
55
use Redberry\MailboxForLaravel\Http\Controllers\ClearInboxController;
66
use Redberry\MailboxForLaravel\Http\Controllers\InboxController;
7-
use Redberry\MailboxForLaravel\Http\Controllers\PublicAssetController;
87
use Redberry\MailboxForLaravel\Http\Controllers\SeenController;
98
use Redberry\MailboxForLaravel\Http\Controllers\SendTestMailController;
109

11-
if (!config('inbox.enabled', true)) {
10+
if (! config('inbox.enabled', true)) {
1211
return;
1312
}
1413

src/Http/Controllers/InboxController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Redberry\MailboxForLaravel\Http\Controllers;
44

5-
use Illuminate\Http\JsonResponse;
65
use Illuminate\Http\Request;
76
use Illuminate\Support\Facades\View;
87
use Redberry\MailboxForLaravel\CaptureService;

src/Support/MessageNormalizer.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public static function normalize(
3131

3232
return self::normalizeEmail($message, $envelope, $raw, $storeAttachmentsInline);
3333
}
34+
3435
// RawMessage (non-Email) fallback
3536
return self::normalizeRaw($message, $envelope, $raw);
3637
}
@@ -43,7 +44,7 @@ private static function normalizeRaw(
4344
): array {
4445
return [
4546
'version' => 1,
46-
'saved_at' => (new \DateTimeImmutable())->format(\DateTimeInterface::ATOM),
47+
'saved_at' => (new \DateTimeImmutable)->format(\DateTimeInterface::ATOM),
4748
'subject' => null,
4849
'from' => [],
4950
'to' => [],
@@ -58,7 +59,6 @@ private static function normalizeRaw(
5859
];
5960
}
6061

61-
6262
/** @return array<string,mixed> */
6363
private static function normalizeEmail(
6464
Email $email,
@@ -74,7 +74,6 @@ private static function normalizeEmail(
7474
$attachments = [];
7575
foreach ($email->getAttachments() as $part) {
7676
/** @var DataPart $part */
77-
7877
$filename = $part->getFilename();
7978
$contentId = $part->getPreparedHeaders()->has('Content-ID')
8079
? trim($part->getPreparedHeaders()->get('Content-ID')->getBodyAsString(), '<>')
@@ -84,7 +83,6 @@ private static function normalizeEmail(
8483
? $part->getPreparedHeaders()->get('Content-Disposition')->getBodyAsString()
8584
: null;
8685

87-
8886
$contentType = $part->getPreparedHeaders()->has('Content-Type')
8987
? $part->getPreparedHeaders()->get('Content-Type')->getBodyAsString()
9088
: null;
@@ -112,7 +110,7 @@ private static function normalizeEmail(
112110
'inline' => $contentId !== null,
113111
'size' => $size,
114112
'content' => $bodyBase64, // base64 or null
115-
], static fn($v) => $v !== null);
113+
], static fn ($v) => $v !== null);
116114
}
117115

118116
// Prefer explicitly set envelope sender/recipients, fallback to headers
@@ -152,7 +150,6 @@ private static function normalizeEmail(
152150

153151
/**
154152
* @param Address[] $addresses
155-
*
156153
* @return array<int,array{name?:string,email:string}>
157154
*/
158155
private static function addressesToArray(iterable $addresses): array
@@ -177,11 +174,10 @@ private static function addressToArray(Address $address): array
177174
]);
178175
}
179176

180-
181177
private static function firstHeader(Email $email, string $name): ?string
182178
{
183179
$headers = $email->getHeaders();
184-
if (!$headers->has($name)) {
180+
if (! $headers->has($name)) {
185181
return null;
186182
}
187183

0 commit comments

Comments
 (0)