mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
More PHP8.4 updates
This commit is contained in:
@@ -42,15 +42,8 @@ class BillReminder extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private Bill $bill;
|
||||
private int $diff;
|
||||
private string $field;
|
||||
|
||||
public function __construct(Bill $bill, string $field, int $diff)
|
||||
public function __construct(private Bill $bill, private string $field, private int $diff)
|
||||
{
|
||||
$this->bill = $bill;
|
||||
$this->field = $field;
|
||||
$this->diff = $diff;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -67,7 +60,7 @@ class BillReminder extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage())
|
||||
return new MailMessage()
|
||||
->markdown('emails.bill-warning', ['field' => $this->field, 'diff' => $this->diff, 'bill' => $this->bill])
|
||||
->subject($this->getSubject())
|
||||
;
|
||||
|
||||
@@ -62,7 +62,7 @@ class NewAccessToken extends Notification
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
|
||||
return (new MailMessage())
|
||||
return new MailMessage()
|
||||
->markdown('emails.token-created', ['ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])
|
||||
->subject((string) trans('email.access_token_created_subject'))
|
||||
;
|
||||
|
||||
@@ -36,11 +36,8 @@ class TransactionCreation extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private array $collection;
|
||||
|
||||
public function __construct(array $collection)
|
||||
public function __construct(private array $collection)
|
||||
{
|
||||
$this->collection = $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +54,7 @@ class TransactionCreation extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage())
|
||||
return new MailMessage()
|
||||
->markdown('emails.report-new-journals', ['transformed' => $this->collection])
|
||||
->subject(trans_choice('email.new_journals_subject', count($this->collection)))
|
||||
;
|
||||
|
||||
@@ -59,7 +59,7 @@ class UserLogin extends Notification
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
|
||||
return (new MailMessage())
|
||||
return new MailMessage()
|
||||
->markdown('emails.new-ip', ['ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])
|
||||
->subject((string) trans('email.login_from_new_ip'))
|
||||
;
|
||||
|
||||
@@ -43,11 +43,8 @@ class UserNewPassword extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
private string $url;
|
||||
|
||||
public function __construct(string $url)
|
||||
public function __construct(private string $url)
|
||||
{
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +66,7 @@ class UserNewPassword extends Notification
|
||||
$userAgent = Request::userAgent();
|
||||
$time = now(config('app.timezone'))->isoFormat((string) trans('config.date_time_js'));
|
||||
|
||||
return (new MailMessage())
|
||||
return new MailMessage()
|
||||
->markdown('emails.password', ['url' => $this->url, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])
|
||||
->subject((string) trans('email.reset_pw_subject'))
|
||||
;
|
||||
|
||||
@@ -52,7 +52,7 @@ class UserRegistration extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage())
|
||||
return new MailMessage()
|
||||
->markdown('emails.registered', ['address' => route('index')])
|
||||
->subject((string) trans('email.registered_subject'))
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user