Skip to content

Commit c4a6734

Browse files
committed
fix lint
1 parent 315eb7d commit c4a6734

File tree

15 files changed

+20
-21
lines changed

15 files changed

+20
-21
lines changed

database/migrations/6_transform_logs_cc_bcc_array.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
public function up(): void
1212
{
13-
$tableName = (new Log())->getTable();
13+
$tableName = (new Log)->getTable();
1414

1515
DB::table($tableName)
1616
->whereNotNull('cc')

src/Actions/Templates/Preview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(private readonly Render $render)
1818
*/
1919
public function run(array $data): string
2020
{
21-
$template = Template::find($data['templateId']) ?: new Template();
21+
$template = Template::find($data['templateId']) ?: new Template;
2222
$template->content = $data['content'];
2323

2424
return rescue(

src/Commands/TokenCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function handle(): int
2222
);
2323

2424
info('Generated token:');
25-
note((new GenerateToken())->run($name));
25+
note((new GenerateToken)->run($name));
2626

2727
return self::SUCCESS;
2828
}

src/Exceptions/SendingFailedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function context(): array
3535
return [
3636
'logId' => $this->log?->id,
3737
'trigger' => $this->log?->trigger,
38-
'variables' => $this->log?->variables ?: new ArrayObject(),
38+
'variables' => $this->log?->variables ?: new ArrayObject,
3939
];
4040
}
4141
}

src/Helpers/TemplateManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function extractVariableNames(): array
3333
{
3434
$source = $this->template->layout?->content . $this->template->content;
3535

36-
$twig = new Environment(new ArrayLoader());
36+
$twig = new Environment(new ArrayLoader);
3737

3838
try {
3939
$nodes = $twig->parse(

src/Http/Controllers/SocialAuthController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SocialAuthController extends Controller
1717
public function redirect(): RedirectResponse
1818
{
1919
if (!MailCarrier::getSocialAuthDriver()) {
20-
throw new SocialAuthNotEnabledException();
20+
throw new SocialAuthNotEnabledException;
2121
}
2222

2323
return Socialite::driver(MailCarrier::getSocialAuthDriver())->redirect();
@@ -29,7 +29,7 @@ public function redirect(): RedirectResponse
2929
public function callback(SocialLogin $login): RedirectResponse
3030
{
3131
if (!MailCarrier::getSocialAuthDriver()) {
32-
throw new SocialAuthNotEnabledException();
32+
throw new SocialAuthNotEnabledException;
3333
}
3434

3535
/** @var \Laravel\Socialite\AbstractUser $user */

src/Http/Requests/SendMailRequest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ public function rules(): array
2525
'template' => 'required|exists:\MailCarrier\Models\Template,slug',
2626
'trigger' => 'sometimes|string|max:255',
2727
'subject' => 'required|string|max:255',
28-
'sender' => ['sometimes', new ContactRule()],
28+
'sender' => ['sometimes', new ContactRule],
2929
'cc' => 'sometimes|array',
3030
'bcc' => 'sometimes|array',
31-
'cc.*' => [new ContactRule()],
32-
'bcc.*' => [new ContactRule()],
31+
'cc.*' => [new ContactRule],
32+
'bcc.*' => [new ContactRule],
3333
'variables' => 'sometimes|array',
3434
'tags' => 'sometimes|array',
3535
'metadata' => 'sometimes|array',
@@ -68,9 +68,9 @@ public function rules(): array
6868
],
6969
'recipients.*.variables' => 'sometimes|array',
7070
'recipients.*.cc' => 'sometimes|array',
71-
'recipients.*.cc.*' => [new ContactRule()],
71+
'recipients.*.cc.*' => [new ContactRule],
7272
'recipients.*.bcc' => 'sometimes|array',
73-
'recipients.*.bcc.*' => [new ContactRule()],
73+
'recipients.*.bcc.*' => [new ContactRule],
7474

7575
// Recipients attachments
7676
'recipients.*.attachments' => 'sometimes|array',

src/MailCarrierManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function upload(string $content, string $fileName): string
118118
);
119119

120120
if (!$uploadResponse) {
121-
throw new UploadException();
121+
throw new UploadException;
122122
}
123123

124124
return $filePath;

src/MailCarrierServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function packageRegistered(): void
7474
$this->app->register(\Laravel\Socialite\SocialiteServiceProvider::class);
7575
}
7676

77-
$this->app->scoped('mailcarrier', fn (): MailCarrierManager => new MailCarrierManager());
77+
$this->app->scoped('mailcarrier', fn (): MailCarrierManager => new MailCarrierManager);
7878
}
7979

8080
/**

src/Models/Casts/CastUsingJsonFlags.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ class CastUsingJsonFlags
1010
public function __construct(
1111
public int $encode = 0,
1212
public int $decode = 0,
13-
) {
14-
}
13+
) {}
1514
}

0 commit comments

Comments
 (0)