<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\DI\Reflection;

final class ConstructorMetadata
{
    public function __construct(private readonly array $parameters = []) {}

    public function parameters(): array { return $this->parameters; }

    public function toArray(): array
    {
        return [
            'parameters' => array_map(static fn (ParameterMetadata $p): array => $p->toArray(), $this->parameters),
        ];
    }
}
