<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Console\Commands;

use PpPhp\Core\Platform\Console\AbstractCommand;

final class RetryStatsCommand extends AbstractCommand
{
    public function name(): string { return 'retry:stats'; }
    public function description(): string { return 'PPphp Retry Stats'; }

    public function handle(array $arguments = []): int
    {
        $this->title('PPphp Retry Stats');
        $runtime = new \PpPhp\Core\Platform\Event\Retry\RetryRuntime(); $this->line('Policies: ' . count($runtime->policies()->names())); $this->line('Dead Letters: ' . $runtime->deadLetters()->count());
        return 0;
    }
}
