for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xetaravel\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
class BadgeNotification extends Notification
{
use Queueable;
public $badge;
/**
* Create a new notification instance.
*/
public function __construct($badge)
$this->badge = $badge;
}
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
public function via($notifiable): array
$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 ['database'];
* Get the array representation of the notification.
public function toDatabase($notifiable): array
return [
'message' => 'You have unlock the badge <strong>%s</strong> !',
'message_key' => $this->badge->name,
'image' => $this->badge->image,
'type' => 'badge'
];
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.