ResetPassword.php refactoring

This commit is contained in:
Čarodej
2022-05-31 15:55:02 +02:00
parent aa9731dd13
commit c912166905
+5 -28
View File
@@ -9,36 +9,25 @@ class ResetPassword extends Notification
{ {
use Queueable; use Queueable;
private $token;
/** /**
* Create a new notification instance. * Create a new notification instance.
*
* @param $token
*/ */
public function __construct($token) private function __construct(
{ private string $token
$this->token = $token; ) {}
}
/** /**
* Get the notification's delivery channels. * Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/ */
public function via($notifiable) public function via(mixed $notifiable): array
{ {
return ['mail']; return ['mail'];
} }
/** /**
* Get the mail representation of the notification. * Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
*/ */
public function toMail($notifiable) public function toMail(mixed $notifiable): MailMessage
{ {
$reset_url = url('/create-new-password?token=' . $this->token); $reset_url = url('/create-new-password?token=' . $this->token);
$app_name = get_settings('app_title') ?? 'VueFileManager'; $app_name = get_settings('app_title') ?? 'VueFileManager';
@@ -51,16 +40,4 @@ class ResetPassword extends Notification
->line(__t('reset_password_line_2')) ->line(__t('reset_password_line_2'))
->salutation(__t('salutation') . ', ' . $app_name); ->salutation(__t('salutation') . ', ' . $app_name);
} }
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
];
}
} }