flix-tech/avro-serde-php

View on GitHub
src/Objects/Schema/Generation/Annotations/AvroAliases.php

Summary

Maintainability
A
0 mins
Test Coverage
D
66%
<?php

declare(strict_types=1);

namespace FlixTech\AvroSerializer\Objects\Schema\Generation\Annotations;

use FlixTech\AvroSerializer\Objects\Schema\AttributeName;
use FlixTech\AvroSerializer\Objects\Schema\Generation\SchemaAttributes;
use FlixTech\AvroSerializer\Objects\Schema\Generation\VariadicAttribute;

/**
 * @Annotation
 */
final class AvroAliases implements VariadicAttribute
{
    /**
     * @var array<string>
     */
    public $value;

    /**
     * {@inheritdoc}
     */
    public function name(): string
    {
        return AttributeName::ALIASES;
    }

    /**
     * {@inheritdoc}
     *
     * @return array<string>
     */
    public function value(): array
    {
        return $this->value;
    }

    /**
     * {@inheritdoc}
     */
    public function attributes(): SchemaAttributes
    {
        return new SchemaAttributes();
    }
}