MohsenAbrishami /
stethoscope
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace MohsenAbrishami\Stethoscope\Notifications; |
||||
| 4 | |||||
| 5 | use Illuminate\Notifications\Messages\MailMessage; |
||||
| 6 | use Illuminate\Notifications\Notification; |
||||
| 7 | |||||
| 8 | class LogReportNotification extends Notification |
||||
| 9 | { |
||||
| 10 | public $logs; |
||||
| 11 | |||||
| 12 | /** |
||||
| 13 | * Create a new notification instance. |
||||
| 14 | * |
||||
| 15 | * @return void |
||||
| 16 | */ |
||||
| 17 | public function __construct($logs) |
||||
| 18 | { |
||||
| 19 | $this->logs = $logs->logs; |
||||
| 20 | } |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * Get the notification's delivery channels. |
||||
| 24 | * |
||||
| 25 | * @param mixed $notifiable |
||||
| 26 | * @return array |
||||
| 27 | */ |
||||
| 28 | public function via($notifiable) |
||||
|
0 ignored issues
–
show
|
|||||
| 29 | { |
||||
| 30 | $notificationChannels = config('stethoscope.notifications.notifications.'.static::class); |
||||
| 31 | |||||
| 32 | return array_filter($notificationChannels); |
||||
| 33 | } |
||||
| 34 | |||||
| 35 | /** |
||||
| 36 | * Get the mail representation of the notification. |
||||
| 37 | * |
||||
| 38 | * @param mixed $notifiable |
||||
| 39 | * @return \Illuminate\Notifications\Messages\MailMessage |
||||
| 40 | */ |
||||
| 41 | 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. Loading history...
|
|||||
| 42 | { |
||||
| 43 | return (new MailMessage) |
||||
| 44 | ->subject('Stethoscope Alert') |
||||
| 45 | ->view('mohsenabrishami::emails.ResourceLog', [ |
||||
| 46 | 'logs' => $this->logs, |
||||
| 47 | ]); |
||||
| 48 | } |
||||
| 49 | |||||
| 50 | /** |
||||
| 51 | * Get the array representation of the notification. |
||||
| 52 | * |
||||
| 53 | * @param mixed $notifiable |
||||
| 54 | * @return array |
||||
| 55 | */ |
||||
| 56 | 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. Loading history...
|
|||||
| 57 | { |
||||
| 58 | return [ |
||||
| 59 | // |
||||
| 60 | ]; |
||||
| 61 | } |
||||
| 62 | } |
||||
| 63 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.