<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Console\Commands;

use PpPhp\Core\Platform\Console\AbstractCommand;
use PpPhp\Core\Platform\Event\Scheduler\EventScheduler;

final class SchedulerCommand extends AbstractCommand
{
    public function name(): string { return 'scheduler'; }
    public function description(): string { return 'Show Event Scheduler overview.'; }

    public function handle(array $arguments = []): int
    {
        $scheduler = new EventScheduler();
        $this->title('PPphp Event Scheduler');
        $this->line('Pending: ' . $scheduler->statistics()->pending());
        $this->line('Status: OK');
        return 0;
    }
}
