<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Console\Commands;

use PpPhp\Core\Platform\Console\AbstractCommand;

final class RetryListCommand extends AbstractCommand
{
    public function name(): string { return 'retry:list'; }
    public function description(): string { return 'PPphp Retry Policies'; }

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