Skip to content

Commit

Permalink
Renaming ValueObject to SchemaTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
tPl0ch committed Nov 15, 2021
1 parent 0452e6c commit db440b9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Schemas/AvroSchemaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @implements SchemaType<AvroSchemaType>
*/
final class AvroSchemaType extends ValueObject implements SchemaType
final class AvroSchemaType extends SchemaTypes implements SchemaType
{
/**
* @var AvroSchemaType
Expand Down
2 changes: 1 addition & 1 deletion src/Schemas/JsonSchemaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @implements SchemaType<JsonSchemaType>
*/
final class JsonSchemaType extends ValueObject implements SchemaType
final class JsonSchemaType extends SchemaTypes implements SchemaType
{
/**
* @var JsonSchemaType
Expand Down
2 changes: 1 addition & 1 deletion src/Schemas/ProtobufSchemaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @implements SchemaType<ProtobufSchemaType>
*/
final class ProtobufSchemaType extends ValueObject implements SchemaType
final class ProtobufSchemaType extends SchemaTypes implements SchemaType
{
/**
* @var ProtobufSchemaType
Expand Down
34 changes: 34 additions & 0 deletions src/Schemas/SchemaTypes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

namespace FlixTech\SchemaRegistryApi\Schemas;

abstract class SchemaTypes
{
final public static function avro(): AvroSchemaType
{
return AvroSchemaType::instance();
}

final public static function json(): JsonSchemaType
{
return JsonSchemaType::instance();
}

final public static function protobuf(): ProtobufSchemaType
{
return ProtobufSchemaType::instance();
}

final protected function __construct()
{
}

/**
* @codeCoverageIgnore
*/
final private function __clone()
{
}
}
19 changes: 0 additions & 19 deletions src/Schemas/ValueObject.php

This file was deleted.

0 comments on commit db440b9

Please sign in to comment.