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
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A via() 0 4 1
A newMailMessage() 0 9 1
1
<?php namespace Transmissor\Notifications;
2
3
use Illuminate\Bus\Queueable;
4
use Illuminate\Contracts\Queue\ShouldQueue;
5
use Illuminate\Notifications\Messages\MailMessage;
6
use Illuminate\Notifications\Notification;
7
8
class MailNotification extends Notification implements ShouldQueue
9
{
10
    use Queueable;
11
12
    /**
13
     * Get the notification's channels.
14
     *
15
     * @param  mixed $notifiable
16
     * @return array|string
17
     */
18
    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...
19
    {
20
        return ['mail'];
21
    }
22
23
    /**
24
     * Create a new mail message.
25
     *
26
     * @return MailMessage
27
     */
28
    protected function newMailMessage()
29
    {
30
        return (new MailMessage)->view(
31
            [
32
            'html' => 'vendor.notifications.email',
33
            'text' => 'vendor.notifications.email-plain'
34
            ]
35
        );
36
    }
37
}
38