. */ 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; /** * Class TransactionCreation */ class TransactionCreation extends Notification { use Queueable; private array $collection; public function __construct(array $collection) { $this->collection = $collection; } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function toArray(User $notifiable) { return [ ]; } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ 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))); } /** * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function via(User $notifiable) { return ['mail']; } }