for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Fouladgar\MobileVerification\Notifications;
use Fouladgar\MobileVerification\Contracts\MustVerifyMobile;
use Fouladgar\MobileVerification\Notifications\Channels\VerificationChannel;
use Fouladgar\MobileVerification\Notifications\Messages\MobileVerificationMessage;
use Illuminate\Notifications\Notification;
class VerifyMobile extends Notification
{
/**
* The verification token.
*
* @var string
*/
public $token;
* Create a notification instance.
* @param string $token
* @return void
public function __construct(string $token)
$this->token = $token;
}
* Get the notification's channels.
* @param mixed $notifiable
* @return array|string
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 [VerificationChannel::class];
* Build the mobile representation of the notification.
* @param $notifiable
* @return MobileVerificationMessage
public function toMobile(MustVerifyMobile $notifiable): MobileVerificationMessage
return (new MobileVerificationMessage())->to($notifiable->getMobileForVerification())
->token($this->token);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.