Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 14:24:28 +01:00
parent 2eebcb21f1
commit f53923f16c
187 changed files with 429 additions and 482 deletions

View File

@@ -67,7 +67,7 @@ class TestNotification extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.admin-test', ['email' => $this->address])
->subject((string) trans('email.admin_test_subject'));
}
@@ -80,7 +80,7 @@ class TestNotification extends Notification
*/
public function toSlack($notifiable)
{
return (new SlackMessage)->content((string) trans('email.admin_test_subject'));
return (new SlackMessage())->content((string) trans('email.admin_test_subject'));
}
/**

View File

@@ -68,7 +68,7 @@ class UserInvitation extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.invitation-created', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email])
->subject((string) trans('email.invitation_created_subject'));
}
@@ -81,7 +81,7 @@ class UserInvitation extends Notification
*/
public function toSlack($notifiable)
{
return (new SlackMessage)->content((string) trans('email.invitation_created_body', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email]));
return (new SlackMessage())->content((string) trans('email.invitation_created_body', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email]));
}
/**

View File

@@ -22,7 +22,6 @@
declare(strict_types=1);
namespace FireflyIII\Notifications\Admin;
use FireflyIII\User;
@@ -69,7 +68,7 @@ class UserRegistration extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.registered-admin', ['email' => $this->user->email, 'id' => $this->user->id])
->subject((string) trans('email.registered_subject_admin'));
}
@@ -82,7 +81,7 @@ class UserRegistration extends Notification
*/
public function toSlack($notifiable)
{
return (new SlackMessage)->content((string) trans('email.admin_new_user_registered', ['email' => $this->user->email, 'id' => $this->user->id]));
return (new SlackMessage())->content((string) trans('email.admin_new_user_registered', ['email' => $this->user->email, 'id' => $this->user->id]));
}
/**

View File

@@ -68,8 +68,7 @@ class VersionCheckResult extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.new-version', ['message' => $this->message])
->subject((string) trans('email.new_version_email_subject'));
}
@@ -82,7 +81,7 @@ class VersionCheckResult extends Notification
*/
public function toSlack($notifiable)
{
return (new SlackMessage)->content($this->message)
return (new SlackMessage())->content($this->message)
->attachment(function ($attachment) {
$attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases');
});
@@ -101,4 +100,3 @@ class VersionCheckResult extends Notification
];
}
}