for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Xetaravel\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class ResetPasswordNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* The password reset token.
*
* @var string
*/
public $token;
* Create a notification instance.
* @param string $token
public function __construct($token)
$this->token = $token;
}
* Get the notification's channels.
* @param mixed $notifiable
* @return array
public function via($notifiable): array
$notifiable
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function via(/** @scrutinizer ignore-unused */ $notifiable): array
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return ['mail'];
* Build the mail representation of the notification.
* @return MailMessage
public function toMail($notifiable): MailMessage
public function toMail(/** @scrutinizer ignore-unused */ $notifiable): MailMessage
return (new MailMessage())
->line('You are receiving this email because we received a password reset request for your account.')
->line('If you did not request a password reset, no further action is required.')
->action('Reset Password', url(config('app.url') . route('auth.password.reset', $this->token, false)))
->level('primary')
->subject('Reset Password - ' . config('app.name'));
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.