<?php

namespace App\Framework\DI;

use App\Framework\Core\AttributeMapper;

final readonly class InitializerMapper implements AttributeMapper
{
    public function getAttributeClass(): string
    {
        return Initializer::class;
    }

    public function map(object $reflectionTarget, object $attributeInstance): ?array
    {
        return [
            'class' => $reflectionTarget->getDeclaringClass()->getName(),
            'return' => $reflectionTarget->getReturnType()->getName(),
            'method' => $reflectionTarget->getName(),
            #'path' => $attributeInstance->path,
        ];
    }
}
