SendTestEmail::toMail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace App\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Notifications\Messages\MailMessage;
8
use Illuminate\Notifications\Notification;
9
10
class SendTestEmail extends Notification
11
{
12
    use Queueable;
13
14
    /**
15
     * Get the notification's delivery channels
16
     */
17
    public function via($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

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

17
    public function via(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        return ['mail'];
20
    }
21
22
    /**
23
     * Get the mail representation of the notification
24
     */
25
    public function toMail($notifiable)
26
    {
27
        return (new MailMessage)
28
                    ->greeting('Hello '.$notifiable->full_name)
29
                    ->line('This is a test email from the Tech Bench');
30
    }
31
}
32