<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Console\Commands;

use PpPhp\Core\Platform\Console\AbstractCommand;
use PpPhp\Core\Platform\DI\Compiler\ContainerCompiler;

final class ContainerPipelineCommand extends AbstractCommand
{
    public function name(): string { return 'container:pipeline'; }
    public function description(): string { return 'Show active DI compiler pipeline.'; }
    public function handle(array $arguments = []): int
    {
        $compiler = new ContainerCompiler();
        $this->title('PPphp DI Compiler Pipeline');
        foreach ($compiler->pipeline()->stageNames() as $stage) { $this->line('- ' . $stage); }
        return 0;
    }
}
