Skip to content

Commit 5df0406

Browse files
committed
Renaming ValueObject to SchemaTypes
1 parent 05c8ec2 commit 5df0406

File tree

5 files changed

+37
-22
lines changed

5 files changed

+37
-22
lines changed

src/Schemas/AvroSchemaType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* @implements SchemaType<AvroSchemaType>
1111
*/
12-
final class AvroSchemaType extends ValueObject implements SchemaType
12+
final class AvroSchemaType extends SchemaTypes implements SchemaType
1313
{
1414
/**
1515
* @var AvroSchemaType

src/Schemas/JsonSchemaType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* @implements SchemaType<JsonSchemaType>
1111
*/
12-
final class JsonSchemaType extends ValueObject implements SchemaType
12+
final class JsonSchemaType extends SchemaTypes implements SchemaType
1313
{
1414
/**
1515
* @var JsonSchemaType

src/Schemas/ProtobufSchemaType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/**
1010
* @implements SchemaType<ProtobufSchemaType>
1111
*/
12-
final class ProtobufSchemaType extends ValueObject implements SchemaType
12+
final class ProtobufSchemaType extends SchemaTypes implements SchemaType
1313
{
1414
/**
1515
* @var ProtobufSchemaType

src/Schemas/SchemaTypes.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace FlixTech\SchemaRegistryApi\Schemas;
6+
7+
abstract class SchemaTypes
8+
{
9+
final public static function avro(): AvroSchemaType
10+
{
11+
return AvroSchemaType::instance();
12+
}
13+
14+
final public static function json(): JsonSchemaType
15+
{
16+
return JsonSchemaType::instance();
17+
}
18+
19+
final public static function protobuf(): ProtobufSchemaType
20+
{
21+
return ProtobufSchemaType::instance();
22+
}
23+
24+
final protected function __construct()
25+
{
26+
}
27+
28+
/**
29+
* @codeCoverageIgnore
30+
*/
31+
final private function __clone()
32+
{
33+
}
34+
}

src/Schemas/ValueObject.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)