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.

RegistrationEmail::via()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 4
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Afrittella\BackProject\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Notifications\Notification;
7
use Illuminate\Notifications\Messages\MailMessage;
8
9 View Code Duplication
class RegistrationEmail extends Notification
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    use Queueable;
12
13
    public $user;
14
15
    /**
16
     * Create a new notification instance.
17
     *
18
     * @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...
19
     */
20
    public function __construct($user)
21
    {
22
        $this->user = $user;
23
    }
24
25
    /**
26
     * Get the notification's delivery channels.
27
     *
28
     * @param  mixed  $notifiable
29
     * @return string[]
30
     */
31
    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...
32
    {
33
        return ['mail'];
34
    }
35
36
    /**
37
     * Get the mail representation of the notification.
38
     *
39
     * @param  mixed  $notifiable
40
     * @return \Illuminate\Notifications\Messages\MailMessage
41
     */
42
    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...
43
    {
44
        return (new MailMessage)->markdown('back-project::mail.'.app()->getLocale().'.user.registration', ['user' => $this->user]);
45
    }
46
47
    /**
48
     * Get the array representation of the notification.
49
     *
50
     * @param  mixed  $notifiable
51
     * @return array
52
     */
53
    public function toArray($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...
54
    {
55
        return [
56
            //
57
        ];
58
    }
59
}
60