for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PeriodicNotice\Notifications;
trait HasDynamicChannels
{
protected array $defaultChannels = [ 'mail' ];
protected ?array $channels = null;
public function setChannels(?array $channels = null): self
$this->channels = $channels;
return $this;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($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 via(/** @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 $this->channels ?? $this->defaultChannels;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.