for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Modules\V1\Notifications\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\BroadcastMessage;
class ResetPassword extends Notification implements ShouldQueue
{
use Queueable;
protected $token;
/**
* Create a new notification instance.
*
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
*/
public function __construct($token)
$this->$token = $token;
}
* Get the notification's delivery channels.
* @param mixed $notifiable
* @return array
public function via($notifiable)
$notifiable
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return ['mail'];
* Get the mail representation of the notification.
* @return \Illuminate\Notifications\Messages\MailMessage
public function toMail($notifiable)
return (new MailMessage)
->subject('Reset passowrd')
->line('Reset passowrd')
->line('To reset your password click on the button below')
->action('Reset password', env('RESET_PASSWORD_URL') . '/' . $this->token);
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.