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

RegistrationSuccessNotification::toMail()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 1
nop 1
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
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