Auto commit for release 'branch-v6.2' on 2024-12-14

This commit is contained in:
github-actions
2024-12-14 21:55:42 +01:00
parent 28d7e24d30
commit e2289ce1e6
54 changed files with 911 additions and 723 deletions

View File

@@ -46,7 +46,6 @@ class BillReminder extends Notification
private int $diff;
private string $field;
public function __construct(Bill $bill, string $field, int $diff)
{
$this->bill = $bill;
@@ -54,7 +53,6 @@ class BillReminder extends Notification
$this->diff = $diff;
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
@@ -71,7 +69,8 @@ class BillReminder extends Notification
{
return (new MailMessage())
->markdown('emails.bill-warning', ['field' => $this->field, 'diff' => $this->diff, 'bill' => $this->bill])
->subject($this->getSubject());
->subject($this->getSubject())
;
}
/**
@@ -87,7 +86,8 @@ class BillReminder extends Notification
->attachment(static function ($attachment) use ($bill, $url): void {
$attachment->title((string) trans('firefly.visit_bill', ['name' => $bill->name]), $url);
})
->content($this->getSubject());
->content($this->getSubject())
;
}
public function toNtfy(User $notifiable): Message
@@ -107,7 +107,8 @@ class BillReminder extends Notification
public function toPushover(User $notifiable): PushoverMessage
{
return PushoverMessage::create((string) trans('email.bill_warning_please_action'))
->title($this->getSubject());
->title($this->getSubject())
;
}
private function getSubject(): string
@@ -116,6 +117,7 @@ class BillReminder extends Notification
if (0 === $this->diff) {
$message = (string) trans(sprintf('email.bill_warning_subject_now_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
}
return $message;
}