Issues (364)

app/Notifications/UnsubscribeSuccessfully.php (3 issues)

1
<?php
2
3
namespace App\Notifications;
4
5
use Illuminate\Bus\Queueable;
6
use Illuminate\Notifications\Messages\MailMessage;
7
use Illuminate\Notifications\Notification;
8
9
class UnsubscribeSuccessfully extends Notification
10
{
11
    use Queueable;
12
13
    protected $plan;
14
15
    /**
16
     * Create a new notification instance.
17
     *
18
     * @return void
19
     */
20
    public function __construct($plan_id)
21
    {
22
        $stripe = new \Stripe\StripeClient(\Config::get('services.stripe.secret'));
23
        $this->plan = $stripe->plans->retrieve($plan_id);
24
    }
25
26
    /**
27
     * Get the notification's delivery channels.
28
     *
29
     * @return array
30
     */
31
    public function via(mixed $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

31
    public function via(/** @scrutinizer ignore-unused */ mixed $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...
32
    {
33
        return ['mail'];
34
    }
35
36
    /**
37
     * Get the mail representation of the notification.
38
     *
39
     * @return \Illuminate\Notifications\Messages\MailMessage
40
     */
41
    public function toMail(mixed $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

41
    public function toMail(/** @scrutinizer ignore-unused */ mixed $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...
42
    {
43
        return (new MailMessage())
44
                    ->subject('Unsubscribed Successfully!')
45
                    ->line('You have unsubscribed successfully!')
46
                    ->line('Subscription Plan:'.$this->plan->nickname)
47
                    ->line('Thank you for using Genealogia!');
48
    }
49
50
    /**
51
     * Get the array representation of the notification.
52
     *
53
     * @return array
54
     */
55
    public function toArray(mixed $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

55
    public function toArray(/** @scrutinizer ignore-unused */ mixed $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...
56
    {
57
        return [
58
59
        ];
60
    }
61
}
62