Passed
Push — master ( c2d3c3...2d4925 )
by Innocent
06:21
created

ApproveSubscription::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Faithgen\Miscellaneous\Notifications;
4
5
use Faithgen\Miscellaneous\Models\Subscription;
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 ApproveSubscription extends Notification implements ShouldQueue
12
{
13
    use Queueable;
14
15
    public function __construct()
16
    {
17
    }
18
19
    /**
20
     * Get the notification's delivery channels.
21
     *
22
     * @param  mixed  $notifiable
23
     *
24
     * @return array
25
     */
26
    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

26
    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...
27
    {
28
        return ['mail'];
29
    }
30
31
    /**
32
     * Get the mail representation of the notification.
33
     *
34
     * @param  mixed  $notifiable
35
     *
36
     * @return \Illuminate\Notifications\Messages\MailMessage
37
     */
38
    public function toMail($notifiable)
39
    {
40
        return (new MailMessage)
41
            ->line('You are receiving this notification because you are subscribing to FaithGen.')
42
            ->action('Approve Subscription', url("/api/subscriptions/{$notifiable->id}/{$notifiable->email}"))
43
            ->line('Thank you for using our application!');
44
    }
45
46
    /**
47
     * Get the array representation of the notification.
48
     *
49
     * @param  mixed  $notifiable
50
     *
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. ( Ignorable by Annotation )

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

53
    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...
54
    {
55
        return [
56
            //
57
        ];
58
    }
59
}
60