ResetPassword   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toMail() 0 8 1
1
<?php
2
3
namespace Gamer\Notifications;
4
5
class ResetPassword extends MailNotification
6
{
7
    /**
8
     * The password reset token.
9
     *
10
     * @var string
11
     */
12
    public $token;
13
14
    /**
15
     * Create a notification instance.
16
     *
17
     * @param string $token
18
     */
19
    public function __construct($token)
20
    {
21
        $this->token = $token;
22
    }
23
24
    /**
25
     * Build the mail representation of the notification.
26
     *
27
     * @return \Illuminate\Notifications\Messages\MailMessage
28
     */
29
    public function toMail()
30
    {
31
            return $this->newMailMessage()
32
                ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')]))
33
                ->line(trans('auth.email_reset_text'))
34
                ->action(trans('auth.reset_password'), baseUrl('password/reset/' . $this->token))
35
                ->line(trans('auth.email_reset_not_requested'));
36
    }
37
}
38