MailNotification   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A via() 0 4 1
A newMailMessage() 0 9 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