Completed
Push — develop ( 10b573...34b970 )
by Abdelrahman
09:38
created

RegistrationSuccessNotification   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A via() 0 4 1
A toMail() 0 9 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Fort\Notifications;
6
7
use Illuminate\Bus\Queueable;
8
use Illuminate\Notifications\Notification;
9
use Illuminate\Contracts\Queue\ShouldQueue;
10
use Illuminate\Notifications\Messages\MailMessage;
11
12
class RegistrationSuccessNotification extends Notification implements ShouldQueue
13
{
14
    use Queueable;
15
16
    /**
17
     * Get the notification's channels.
18
     *
19
     * @param mixed $notifiable
20
     *
21
     * @return array|string
22
     */
23
    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...
24
    {
25
        return ['mail'];
26
    }
27
28
    /**
29
     * Build the mail representation of the notification.
30
     *
31
     * @param mixed $notifiable
32
     *
33
     * @return \Illuminate\Notifications\Messages\MailMessage
34
     */
35
    public function toMail($notifiable): MailMessage
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...
36
    {
37
        return (new MailMessage())
38
            ->subject(trans('cortex/fort::emails.register.welcome.subject'))
39
            ->line(config('rinvex.fort.registration.moderated')
40
                ? trans('cortex/fort::emails.register.welcome.intro_moderation')
41
                : trans('cortex/fort::emails.register.welcome.intro_default')
42
            );
43
    }
44
}
45