Skip to content

Commit b635ac9

Browse files
tomschlickactions-user
authored andcommitted
Fix styling
1 parent 179c4c3 commit b635ac9

17 files changed

+61
-39
lines changed

src/AuthNotifications.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications;
46

57
use AlwaysOpen\AuthNotifications\Events\LoginWasChanged;

src/AuthNotificationsServiceProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications;
46

5-
use AlwaysOpen\AuthNotifications\AuthNotifications;
67
use AlwaysOpen\AuthNotifications\Listeners\UserObserver;
78
use Illuminate\Contracts\Events\Dispatcher;
89
use Illuminate\Support\Str;
@@ -26,7 +27,7 @@ public function boot(): void
2627
$model::observe(UserObserver::class);
2728

2829

29-
collect(config('auth-notifications.listen_to'))->each(function ($item) {
30+
collect(config('auth-notifications.listen_to'))->each(function ($item): void {
3031
app(Dispatcher::class)->listen(
3132
$item['event'],
3233
[

src/Events/LoginWasChanged.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Events;
46

57
use Illuminate\Broadcasting\InteractsWithSockets;

src/Events/PasswordWasChanged.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Events;
46

57
use Illuminate\Broadcasting\InteractsWithSockets;
6-
use Illuminate\Broadcasting\PrivateChannel;
78
use Illuminate\Foundation\Events\Dispatchable;
89
use Illuminate\Queue\SerializesModels;
910

src/Events/TwoFactorWasDisabled.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Events;
46

57
use Illuminate\Broadcasting\InteractsWithSockets;
6-
use Illuminate\Broadcasting\PrivateChannel;
78
use Illuminate\Foundation\Events\Dispatchable;
89
use Illuminate\Queue\SerializesModels;
910

src/Events/TwoFactorWasEnabled.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Events;
46

57
use Illuminate\Broadcasting\InteractsWithSockets;
6-
use Illuminate\Broadcasting\PrivateChannel;
78
use Illuminate\Foundation\Events\Dispatchable;
89
use Illuminate\Queue\SerializesModels;
910

src/Listeners/UserObserver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace AlwaysOpen\AuthNotifications\Listeners;
3+
declare(strict_types=1);
44

5-
use App\Models\User;
5+
namespace AlwaysOpen\AuthNotifications\Listeners;
66

77
class UserObserver
88
{
@@ -20,7 +20,7 @@ public function updated($user): void
2020
config('auth-notifications.listen_to.password_changed.event')::dispatch($user);
2121
}
2222

23-
if ($user->wasChanged(config('auth-notifications.listen_to.twofactor_enabled.field')) && !empty($user->{config('auth-notifications.listen_to.twofactor_enabled.field')})) {
23+
if ($user->wasChanged(config('auth-notifications.listen_to.twofactor_enabled.field')) && ! empty($user->{config('auth-notifications.listen_to.twofactor_enabled.field')})) {
2424
config('auth-notifications.listen_to.twofactor_enabled.event')::dispatch($user);
2525
}
2626

src/Notifications/Credentials/LoginChanged.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Notifications\Credentials;
46

57
use AlwaysOpen\AuthNotifications\Events\LoginWasChanged;
68
use Illuminate\Bus\Queueable;
7-
use Illuminate\Contracts\Queue\ShouldQueue;
89
use Illuminate\Notifications\Messages\MailMessage;
910
use Illuminate\Notifications\Notification;
1011

@@ -29,7 +30,7 @@ public function toMail(mixed $notifiable): MailMessage
2930

3031
$originalAddress = $notifiable->getOriginal($field);
3132

32-
return (new MailMessage)
33+
return (new MailMessage())
3334
->cc($originalAddress)
3435
->subject("Account Security: " . ucfirst($field) . " successfully changed!")
3536
->line("Your {$field} has been successfully changed to {$value}. If you did not make this change, please contact us immediately.");

src/Notifications/Credentials/PasswordChanged.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Notifications\Credentials;
46

57
use AlwaysOpen\AuthNotifications\Events\PasswordWasChanged;
68
use Illuminate\Bus\Queueable;
7-
use Illuminate\Contracts\Queue\ShouldQueue;
89
use Illuminate\Notifications\Messages\MailMessage;
910
use Illuminate\Notifications\Notification;
1011

@@ -24,7 +25,7 @@ public function via(mixed $notifiable): array
2425

2526
public function toMail(mixed $notifiable): MailMessage
2627
{
27-
return (new MailMessage)
28+
return (new MailMessage())
2829
->subject('Account Security: Password successfully changed!')
2930
->line('Your password has been successfully changed. If you did not make this change, please contact us immediately.');
3031
}

src/Notifications/Credentials/TwoFactorDisabled.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace AlwaysOpen\AuthNotifications\Notifications\Credentials;
46

57
use AlwaysOpen\AuthNotifications\Events\TwoFactorWasDisabled;
@@ -23,7 +25,7 @@ public function via(mixed $notifiable): array
2325

2426
public function toMail(mixed $notifiable): MailMessage
2527
{
26-
return (new MailMessage)
28+
return (new MailMessage())
2729
->subject('Account Security: Two Factor Authentication disabled!')
2830
->line('Two factor authentication has been disabled for your account. If you did not make this change, please contact us immediately.');
2931
}

0 commit comments

Comments
 (0)