ConfirmEmail   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toMail() 0 9 1
1
<?php
2
3
namespace Gamer\Notifications;
4
5
class ConfirmEmail extends MailNotification
6
{
7
    public $token;
8
9
    /**
10
     * Create a new notification instance.
11
     *
12
     * @param string $token
13
     */
14
    public function __construct($token)
15
    {
16
        $this->token = $token;
17
    }
18
19
    /**
20
     * Get the mail representation of the notification.
21
     *
22
     * @param  mixed $notifiable
23
     * @return \Illuminate\Notifications\Messages\MailMessage
24
     */
25
    public function toMail($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...
26
    {
27
        $appName = ['appName' => setting('app-name')];
28
        return $this->newMailMessage()
29
            ->subject(trans('auth.email_confirm_subject', $appName))
30
            ->greeting(trans('auth.email_confirm_greeting', $appName))
31
            ->line(trans('auth.email_confirm_text'))
32
            ->action(trans('auth.email_confirm_action'), baseUrl('/register/confirm/' . $this->token));
33
    }
34
}
35