Issues (367)

app/Notifications/ExportReady.php (5 issues)

1
<?php
2
3
namespace App\Notifications;
4
5
use App\Models\User;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Notifications\Notification;
8
use Illuminate\Contracts\Queue\ShouldQueue;
9
use App\Mail\ExportReady as MailExportReady;
10
use Illuminate\Notifications\Messages\MailMessage;
11
12
class ExportReady extends Notification
13
{
14
    use Queueable;
15
16
    /**
17
     * Create a new notification instance.
18
     *
19
     * @return void
20
     */
21
    public function __construct($user)
22
    {
23
        $this->user  = $user;
0 ignored issues
show
Bug Best Practice introduced by
The property user does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
24
    }
25
26
    /**
27
     * Get the notification's delivery channels.
28
     *
29
     * @param  mixed  $notifiable
30
     * @return array
31
     */
32
    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

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

43
    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...
44
    {
45
        return (new MailExportReady($this->user));
0 ignored issues
show
Bug Best Practice introduced by
The expression return new App\Mail\ExportReady($this->user) returns the type App\Mail\ExportReady which is incompatible with the documented return type Illuminate\Notifications\Messages\MailMessage.
Loading history...
46
    }
47
48
    /**
49
     * Get the array representation of the notification.
50
     *
51
     * @param  mixed  $notifiable
52
     * @return array
53
     */
54
    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

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