for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Console\Commands;
use App\Ping;
use Illuminate\Console\Command;
class CheckPingLastUpdate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'pings:update-overdue';
* The console command description.
protected $description = 'Command description';
* Create a new command instance.
public function __construct()
parent::__construct();
}
* Execute the console command.
* @return mixed
public function handle()
$results = [];
$pings = Ping::active()->get();
active()
App\Ping
scopeActive()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
foreach ($pings as $ping) {
/** @var Ping $ping */
$results[] = [$ping->error, $ping->name, $ping->last_ping, $ping->frequency_value . ' ' . $ping->frequency, $ping->overdueDate, $ping->overdue];
if ($ping->overdue) {
$ping->setError();
} else {
$ping->clearError();
$this->table(['error', 'name', 'last_ping', 'frequency', 'overdue_date', 'overdue'], $results);
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.