for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Support\Facades\Lang;
class ResetPasswordNotification extends Notification implements ShouldQueue
{
use Queueable;
/**
* The number of times the job may be attempted.
*
* @var integer
*/
public $tries = 5;
* The password reset token.
* @var string
public $token;
* Create a notification instance.
* @param string $token
* @return void
public function __construct($token)
$this->token = $token;
}
* Get the notification's delivery channels.
* @param mixed $notifiable
* @return array
public function via($notifiable)
return ['mail'];
* Get the mail representation of the notification.
* @return \Illuminate\Notifications\Messages\MailMessage
public function toMail($notifiable)
return (new MailMessage)
->subject(Lang::get('common/notifications/password_reset.subject'))
->greeting(Lang::get('common/notifications/password_reset.greeting'))
->line(Lang::get('common/notifications/password_reset.line_1'))
->action(Lang::get('common/notifications/password_reset.action'), url(route('password.reset', $this->token, false)))
route
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
->action(Lang::get('common/notifications/password_reset.action'), url(/** @scrutinizer ignore-call */ route('password.reset', $this->token, false)))
url
->action(Lang::get('common/notifications/password_reset.action'), /** @scrutinizer ignore-call */ url(route('password.reset', $this->token, false)))
->line(Lang::get('common/notifications/password_reset.line_2'))
->salutation(Lang::get('common/notifications/password_reset.salutation', ['name' => config('mail.from.name')]));
config
->salutation(Lang::get('common/notifications/password_reset.salutation', ['name' => /** @scrutinizer ignore-call */ config('mail.from.name')]));