XetaIO /
Xetaravel
| 1 | <?php |
||||
| 2 | |||||
| 3 | declare(strict_types=1); |
||||
| 4 | |||||
| 5 | namespace Xetaravel\Notifications; |
||||
| 6 | |||||
| 7 | use Illuminate\Bus\Queueable; |
||||
| 8 | use Illuminate\Contracts\Queue\ShouldQueue; |
||||
| 9 | use Illuminate\Notifications\Notification; |
||||
| 10 | use Illuminate\Notifications\Messages\MailMessage; |
||||
| 11 | |||||
| 12 | class ResetPasswordNotification extends Notification implements ShouldQueue |
||||
| 13 | { |
||||
| 14 | use Queueable; |
||||
| 15 | |||||
| 16 | /** |
||||
| 17 | * The password reset token. |
||||
| 18 | * |
||||
| 19 | * @var string |
||||
| 20 | */ |
||||
| 21 | public $token; |
||||
| 22 | |||||
| 23 | /** |
||||
| 24 | * Create a notification instance. |
||||
| 25 | * |
||||
| 26 | * @param string $token |
||||
| 27 | */ |
||||
| 28 | public function __construct($token) |
||||
| 29 | { |
||||
| 30 | $this->token = $token; |
||||
| 31 | } |
||||
| 32 | |||||
| 33 | /** |
||||
| 34 | * Get the notification's channels. |
||||
| 35 | * |
||||
| 36 | * @param mixed $notifiable |
||||
| 37 | * |
||||
| 38 | * @return array |
||||
| 39 | */ |
||||
| 40 | public function via($notifiable): array |
||||
|
0 ignored issues
–
show
|
|||||
| 41 | { |
||||
| 42 | return ['mail']; |
||||
| 43 | } |
||||
| 44 | |||||
| 45 | /** |
||||
| 46 | * Build the mail representation of the notification. |
||||
| 47 | * |
||||
| 48 | * @param mixed $notifiable |
||||
| 49 | * |
||||
| 50 | * @return MailMessage |
||||
| 51 | */ |
||||
| 52 | public function toMail($notifiable): MailMessage |
||||
|
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...
|
|||||
| 53 | { |
||||
| 54 | return (new MailMessage()) |
||||
| 55 | ->line('You are receiving this email because we received a password reset request for your account.') |
||||
| 56 | ->line('If you did not request a password reset, no further action is required.') |
||||
| 57 | ->action('Reset Password', url(config('app.url') . route('auth.password.reset', $this->token, false))) |
||||
| 58 | ->level('primary') |
||||
| 59 | ->subject('Reset Password - ' . config('app.name')); |
||||
| 60 | } |
||||
| 61 | } |
||||
| 62 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.