Issues (9)

src/MailTemplateChannel.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace DansMaCulotte\MailTemplate;
4
5
use DansMaCulotte\MailTemplate\Drivers\Driver;
6
use Illuminate\Notifications\Notification;
7
8
class MailTemplateChannel
9
{
10
    /**
11
     * Send the given notification.
12
     *
13
     * @param mixed $notifiable
14
     * @param Notification $notification
15
     * @return void
16
     */
17
    public function send($notifiable, Notification $notification)
18
    {
19
        $message = $notification->toMailTemplate($notifiable);
0 ignored issues
show
The method toMailTemplate() does not exist on Illuminate\Notifications\Notification. It seems like you code against a sub-type of Illuminate\Notifications\Notification such as DansMaCulotte\MailTempla...sts\WelcomeNotification. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        /** @scrutinizer ignore-call */ 
20
        $message = $notification->toMailTemplate($notifiable);
Loading history...
20
21
        if ($message instanceof Driver) {
22
            $message->send();
23
        }
24
    }
25
}
26