MailNotification::via()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Gamer\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 MailNotification extends Notification implements ShouldQueue
11
{
12
    use Queueable;
13
14
    /**
15
     * Get the notification's channels.
16
     *
17
     * @param  mixed $notifiable
18
     * @return array|string
19
     */
20
    public function via($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed.

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

Loading history...
21
    {
22
        return ['mail'];
23
    }
24
25
    /**
26
     * Create a new mail message.
27
     *
28
     * @return MailMessage
29
     */
30
    protected function newMailMessage()
31
    {
32
        return (new MailMessage)->view(
33
            [
34
            'html' => 'vendor.notifications.email',
35
            'text' => 'vendor.notifications.email-plain'
36
            ]
37
        );
38
    }
39
}
40