for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Notifications;
use App\Http\Resources\ParticipantResource;
use App\Models\Participant;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ParticipantCreated extends Notification implements ShouldQueue
{
use Queueable;
/**
* @var Participant
*/
public Participant $participant;
* Create a new notification instance.
*
* @param Participant $participant
* @return void
public function __construct(Participant $participant)
$this->participant = $participant;
}
* Get the notification's delivery channels.
* @param mixed $notifiable
* @return array
public function via($notifiable)
return $notifiable->notify_via;
* Get the array representation of the notification.
public function toArray($notifiable)
$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 toArray(/** @scrutinizer ignore-unused */ $notifiable)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return [
'payload' => (new ParticipantResource($this->participant))->resolve(),
];
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.