mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Clean up code.
This commit is contained in:
@@ -24,6 +24,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Notifications\User;
|
||||
|
||||
use FireflyIII\Notifications\ReturnsAvailableChannels;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
@@ -43,25 +45,33 @@ class TransactionCreation extends Notification
|
||||
$this->collection = $collection;
|
||||
}
|
||||
|
||||
|
||||
public function toArray($notifiable)
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function toArray(User $notifiable)
|
||||
{
|
||||
return [
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
|
||||
public function toMail($notifiable)
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
return (new MailMessage())
|
||||
->markdown('emails.report-new-journals', ['transformed' => $this->collection])
|
||||
->subject(trans_choice('email.new_journals_subject', count($this->collection)))
|
||||
;
|
||||
->subject(trans_choice('email.new_journals_subject', count($this->collection)));
|
||||
}
|
||||
|
||||
|
||||
public function via($notifiable)
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function via(User $notifiable)
|
||||
{
|
||||
return ['mail'];
|
||||
// todo only over email?
|
||||
return ReturnsAvailableChannels::returnChannels('user', $notifiable);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user