<?php

declare(strict_types=1);

namespace PpPhp\Core\Platform\Services\Metadata;

final class ServiceTag
{
    public function __construct(
        private readonly string $name,
        private readonly array $attributes = []
    ) {
    }

    public function name(): string { return $this->name; }

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

    public function toArray(): array
    {
        return ['name' => $this->name, 'attributes' => $this->attributes];
    }
}
