ForgotPassword::toMail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 9
rs 10
1
<?php
2
3
namespace FaithGen\SDK\Notifications\Ministry;
4
5
use FaithGen\SDK\Models\Ministry;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Contracts\Queue\ShouldQueue;
8
use Illuminate\Notifications\Messages\MailMessage;
9
use Illuminate\Notifications\Notification;
10
11
class ForgotPassword extends Notification implements ShouldQueue
12
{
13
    use Queueable;
14
    /**
15
     * @var Ministry
16
     */
17
    private $ministry;
18
19
    /**
20
     * Create a new notification instance.
21
     *
22
     * @param Ministry $ministry
23
     */
24
    public function __construct(Ministry $ministry)
25
    {
26
        $this->ministry = $ministry;
27
    }
28
29
    /**
30
     * Get the notification's delivery channels.
31
     *
32
     * @param mixed $notifiable
33
     * @return array
34
     */
35
    public function via($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

35
    public function via(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
36
    {
37
        return ['mail'];
38
    }
39
40
    /**
41
     * Get the mail representation of the notification.
42
     *
43
     * @param mixed $notifiable
44
     * @return \Illuminate\Notifications\Messages\MailMessage
45
     */
46
    public function toMail($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

46
    public function toMail(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
47
    {
48
        return (new MailMessage)
49
            ->greeting('Hello '.$this->ministry->name)
50
            ->line('You have requested for a password change, Please click the link below to update it!')
51
            ->action('Reset Password', url('/'))
52
            ->from('[email protected]', 'Faith Gen')
53
            ->subject('Forgot password!')
54
            ->line('Thank you for using our application!');
55
    }
56
57
    /**
58
     * Get the array representation of the notification.
59
     *
60
     * @param mixed $notifiable
61
     * @return array
62
     */
63
    public function toArray($notifiable)
0 ignored issues
show
Unused Code introduced by
The parameter $notifiable is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

63
    public function toArray(/** @scrutinizer ignore-unused */ $notifiable)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
64
    {
65
        return [
66
            //
67
        ];
68
    }
69
}
70