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
![]() |
|||||
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
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
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
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
44 | { |
||||
45 | return (new MailExportReady($this->user)); |
||||
0 ignored issues
–
show
|
|||||
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
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
55 | { |
||||
56 | return [ |
||||
57 | // |
||||
58 | ]; |
||||
59 | } |
||||
60 | } |
||||
61 |