flix-tech/avro-serde-php

View on GitHub
src/Objects/Schema/PrimitiveType.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php

declare(strict_types=1);

namespace FlixTech\AvroSerializer\Objects\Schema;

use FlixTech\AvroSerializer\Objects\Schema;

abstract class PrimitiveType extends Schema
{
    /**
     * @var string
     */
    private $type;

    public function __construct(string $type)
    {
        $this->type = $type;
    }

    final public function serialize(): string
    {
        return $this->type;
    }
}