GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AdminResetPassword::toMail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Serverfireteam\Panel;
4
5
use Illuminate\Notifications\Notification;
6
use Illuminate\Notifications\Messages\MailMessage;
7
8
class AdminResetPassword extends Notification
9
{
10
    /**
11
     * The password reset token.
12
     *
13
     * @var string
14
     */
15
    public $token;
16
17
    /**
18
     * Create a notification instance.
19
     *
20
     * @param  string  $token
21
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
22
     */
23
    public function __construct($token)
24
    {
25
        $this->token = $token;
26
    }
27
28
    /**
29
     * Get the notification's channels.
30
     *
31
     * @param  mixed  $notifiable
32
     * @return array|string
33
     */
34
    public function via($notifiable)
35
    {
36
        return ['mail'];
37
    }
38
39
    /**
40
     * Build the mail representation of the notification.
41
     *
42
     * @param  mixed  $notifiable
43
     * @return \Illuminate\Notifications\Messages\MailMessage
44
     */
45
    public function toMail($notifiable)
46
    {
47
        return (new MailMessage)
48
            ->line('You are receiving this email because we received a password reset request for your account.')
49
            ->action('Reset Password', url('panel/password/reset', $this->token))
50
            ->line('If you did not request a password reset, no further action is required.');
51
    }
52
}
53