Issues (10)

src/Notifications/ApproveSubscription.php (2 issues)

Severity
1
<?php
2
3
namespace Faithgen\Miscellaneous\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Contracts\Queue\ShouldQueue;
7
use Illuminate\Notifications\Messages\MailMessage;
8
use Illuminate\Notifications\Notification;
9
10
class ApproveSubscription extends Notification implements ShouldQueue
11
{
12
    use Queueable;
13
14
    public function __construct()
15
    {
16
    }
17
18
    /**
19
     * Get the notification's delivery channels.
20
     *
21
     * @param  mixed  $notifiable
22
     *
23
     * @return array
24
     */
25
    public function via($notifiable)
0 ignored issues
show
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

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

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