for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaravelZero\Framework\Commands;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Contracts\Container\Container;
use Illuminate\Console\Command as BaseCommand;
use NunoMaduro\LaravelDesktopNotifier\Contracts\Notifier;
use NunoMaduro\LaravelDesktopNotifier\Contracts\Notification;
/**
* This is the Zero Framework abstract command class.
*
* @author Nuno Maduro <[email protected]>
*/
abstract class Command extends BaseCommand
{
* Execute the console command. Here goes the command
* code.
* @return void
abstract public function handle(): void;
* Returns the application container.
* @return \Illuminate\Contracts\Container\Container
public function getContainer(): Container
return $this->getLaravel();
}
* Define the command's schedule.
* @param \Illuminate\Console\Scheduling\Schedule $schedule
public function schedule(Schedule $schedule): void
$schedule
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
* Gets the concrete implementation of the notifier. Then
* creates a new notification and send it through the notifier.
* @param string $text
* @param string $body
* @param string|null $icon
public function notify(string $text, string $body, $icon = null): void
$notifier = $this->getContainer()
->make(Notifier::class);
$notification = $this->getContainer()
->make(Notification::class)
->setTitle($text)
->setBody($body)
->setIcon($icon);
$notifier->send($notification);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.