Total Complexity | 4 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class ThreadCreated extends Notification implements ShouldQueue |
||
13 | { |
||
14 | use Queueable; |
||
15 | |||
16 | /** |
||
17 | * @var Thread |
||
18 | */ |
||
19 | public Thread $thread; |
||
20 | |||
21 | /** |
||
22 | * Create a new notification instance. |
||
23 | * |
||
24 | * @param Thread $thread |
||
25 | * @return void |
||
26 | */ |
||
27 | public function __construct(Thread $thread) |
||
28 | { |
||
29 | $this->thread = $thread; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * Get the notification's delivery channels. |
||
34 | * |
||
35 | * @param mixed $notifiable |
||
36 | * @return array |
||
37 | */ |
||
38 | public function via($notifiable) |
||
39 | { |
||
40 | return $notifiable->notify_via; |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Get the array representation of the notification. |
||
45 | * |
||
46 | * @param mixed $notifiable |
||
47 | * @return array |
||
48 | */ |
||
49 | public function toArray($notifiable) |
||
|
|||
50 | { |
||
51 | return [ |
||
52 | 'payload' => (new ThreadResource($this->thread))->resolve(), |
||
53 | ]; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Get the mail representation of the notification. |
||
58 | * |
||
59 | * @param mixed $notifiable |
||
60 | * @return \Illuminate\Notifications\Messages\MailMessage |
||
61 | */ |
||
62 | public function toMail($notifiable) |
||
68 | } |
||
69 | } |
||
70 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.