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

@@ -77,7 +77,7 @@ class BillReminder extends Notification
$subject = (string) trans(sprintf('email.bill_warning_subject_now_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
}
return (new MailMessage)
return (new MailMessage())
->markdown('emails.bill-warning', ['field' => $this->field, 'diff' => $this->diff, 'bill' => $this->bill])
->subject($subject);
}
@@ -96,7 +96,7 @@ class BillReminder extends Notification
}
$bill = $this->bill;
$url = route('bills.show', [$bill->id]);
return (new SlackMessage)
return (new SlackMessage())
->warning()
->attachment(function ($attachment) use ($bill, $url) {
$attachment->title((string) trans('firefly.visit_bill', ['name' => $bill->name]), $url);

View File

@@ -61,7 +61,7 @@ class NewAccessToken extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.token-created')
->subject((string) trans('email.access_token_created_subject'));
}
@@ -73,7 +73,7 @@ class NewAccessToken extends Notification
*/
public function toSlack($notifiable)
{
return (new SlackMessage)->content((string) trans('email.access_token_created_body'));
return (new SlackMessage())->content((string) trans('email.access_token_created_body'));
}
/**

View File

@@ -64,7 +64,7 @@ class TransactionCreation extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.report-new-journals', ['transformed' => $this->collection])
->subject((string) trans_choice('email.new_journals_subject', count($this->collection)));
}

View File

@@ -22,7 +22,6 @@
declare(strict_types=1);
namespace FireflyIII\Notifications\User;
use Exception;
@@ -77,7 +76,7 @@ class UserLogin extends Notification
$host = $hostName;
}
return (new MailMessage)
return (new MailMessage())
->markdown('emails.new-ip', ['time' => $time, 'ipAddress' => $this->ip, 'host' => $host])
->subject((string) trans('email.login_from_new_ip'));
}
@@ -100,7 +99,7 @@ class UserLogin extends Notification
$host = $hostName;
}
return (new SlackMessage)->content((string) trans('email.slack_login_from_new_ip', ['host' => $host, 'ip' => $this->ip]));
return (new SlackMessage())->content((string) trans('email.slack_login_from_new_ip', ['host' => $host, 'ip' => $this->ip]));
}
/**
@@ -116,4 +115,3 @@ class UserLogin extends Notification
];
}
}

View File

@@ -63,7 +63,7 @@ class UserNewPassword extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.password', ['url' => $this->url])
->subject((string) trans('email.reset_pw_subject'));
}

View File

@@ -60,7 +60,7 @@ class UserRegistration extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)
return (new MailMessage())
->markdown('emails.registered', ['address' => route('index')])
->subject((string) trans('email.registered_subject'));
}
@@ -78,4 +78,3 @@ class UserRegistration extends Notification
];
}
}