From dd584313dce934ee198862f4f121fad37e17780a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20H=C3=A4ber?= Date: Tue, 10 May 2022 12:51:57 +0200 Subject: [PATCH] fix(chore): fix code style; PSR4 on KafkaSchemaRegistryApiClientTest.php; update composer.json to comply with newer composer versions (#15) --- composer.json | 5 ++++- src/Exception/AbstractKafkaSchemaRegistryException.php | 1 - src/Exception/BackendDatastoreException.php | 1 - src/Exception/CompatibilityException.php | 1 - src/Exception/ImportException.php | 1 - src/Exception/IncompatibileAvroSchemaException.php | 1 - src/Exception/InvalidAvroSchemaException.php | 1 - src/Exception/InvalidVersionException.php | 1 - src/Exception/OperationTimeoutException.php | 1 - src/Exception/PathNotFoundException.php | 1 - src/Exception/RequestForwardException.php | 1 - src/Exception/SchemaNotFoundException.php | 1 - src/Exception/SchemaRegistryExceptionInterface.php | 1 - src/Exception/SubjectNotFoundException.php | 1 - src/Exception/UnauthorizedException.php | 1 - src/Exception/UnprocessableEntityException.php | 1 - src/Exception/VersionNotFoundException.php | 1 - src/ServiceProvider/KafkaSchemaRegistryApiClientProvider.php | 1 - tests/KafkaSchemaRegistryApiClientTest.php | 2 +- tests/ReflectionAccessTrait.php | 1 - 20 files changed, 5 insertions(+), 20 deletions(-) diff --git a/composer.json b/composer.json index 12732f2..588582f 100644 --- a/composer.json +++ b/composer.json @@ -33,6 +33,9 @@ "squizlabs/php_codesniffer": "^3.4.2" }, "config": { - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "infection/extension-installer": true + } } } diff --git a/src/Exception/AbstractKafkaSchemaRegistryException.php b/src/Exception/AbstractKafkaSchemaRegistryException.php index 58ba84b..c61d04a 100644 --- a/src/Exception/AbstractKafkaSchemaRegistryException.php +++ b/src/Exception/AbstractKafkaSchemaRegistryException.php @@ -6,5 +6,4 @@ abstract class AbstractKafkaSchemaRegistryException extends Exception implements SchemaRegistryExceptionInterface { - } diff --git a/src/Exception/BackendDatastoreException.php b/src/Exception/BackendDatastoreException.php index e6464c8..5f7cd84 100644 --- a/src/Exception/BackendDatastoreException.php +++ b/src/Exception/BackendDatastoreException.php @@ -4,5 +4,4 @@ class BackendDatastoreException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/CompatibilityException.php b/src/Exception/CompatibilityException.php index 206491b..241e361 100644 --- a/src/Exception/CompatibilityException.php +++ b/src/Exception/CompatibilityException.php @@ -4,5 +4,4 @@ class CompatibilityException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/ImportException.php b/src/Exception/ImportException.php index 1bfbef9..6c73f8e 100644 --- a/src/Exception/ImportException.php +++ b/src/Exception/ImportException.php @@ -4,5 +4,4 @@ class ImportException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/IncompatibileAvroSchemaException.php b/src/Exception/IncompatibileAvroSchemaException.php index 446e612..2b71557 100644 --- a/src/Exception/IncompatibileAvroSchemaException.php +++ b/src/Exception/IncompatibileAvroSchemaException.php @@ -4,5 +4,4 @@ class IncompatibileAvroSchemaException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/InvalidAvroSchemaException.php b/src/Exception/InvalidAvroSchemaException.php index 3fa453a..4052998 100644 --- a/src/Exception/InvalidAvroSchemaException.php +++ b/src/Exception/InvalidAvroSchemaException.php @@ -4,5 +4,4 @@ class InvalidAvroSchemaException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/InvalidVersionException.php b/src/Exception/InvalidVersionException.php index 6b9d5f5..2ea7c1c 100644 --- a/src/Exception/InvalidVersionException.php +++ b/src/Exception/InvalidVersionException.php @@ -4,5 +4,4 @@ class InvalidVersionException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/OperationTimeoutException.php b/src/Exception/OperationTimeoutException.php index 4fcbcad..baa8faf 100644 --- a/src/Exception/OperationTimeoutException.php +++ b/src/Exception/OperationTimeoutException.php @@ -4,5 +4,4 @@ class OperationTimeoutException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/PathNotFoundException.php b/src/Exception/PathNotFoundException.php index 9f75f54..92dbd14 100644 --- a/src/Exception/PathNotFoundException.php +++ b/src/Exception/PathNotFoundException.php @@ -4,5 +4,4 @@ class PathNotFoundException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/RequestForwardException.php b/src/Exception/RequestForwardException.php index b81fe8b..5c1dd5a 100644 --- a/src/Exception/RequestForwardException.php +++ b/src/Exception/RequestForwardException.php @@ -4,5 +4,4 @@ class RequestForwardException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/SchemaNotFoundException.php b/src/Exception/SchemaNotFoundException.php index 7ca40b9..5390ffb 100644 --- a/src/Exception/SchemaNotFoundException.php +++ b/src/Exception/SchemaNotFoundException.php @@ -4,5 +4,4 @@ class SchemaNotFoundException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/SchemaRegistryExceptionInterface.php b/src/Exception/SchemaRegistryExceptionInterface.php index 844e282..6ef29ec 100644 --- a/src/Exception/SchemaRegistryExceptionInterface.php +++ b/src/Exception/SchemaRegistryExceptionInterface.php @@ -6,5 +6,4 @@ interface SchemaRegistryExceptionInterface extends ClientExceptionInterface { - } diff --git a/src/Exception/SubjectNotFoundException.php b/src/Exception/SubjectNotFoundException.php index 87c45dc..7abd2be 100644 --- a/src/Exception/SubjectNotFoundException.php +++ b/src/Exception/SubjectNotFoundException.php @@ -4,5 +4,4 @@ class SubjectNotFoundException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/UnauthorizedException.php b/src/Exception/UnauthorizedException.php index 62e7cbd..7eb34d2 100644 --- a/src/Exception/UnauthorizedException.php +++ b/src/Exception/UnauthorizedException.php @@ -4,5 +4,4 @@ class UnauthorizedException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/UnprocessableEntityException.php b/src/Exception/UnprocessableEntityException.php index 498f561..05bba2b 100644 --- a/src/Exception/UnprocessableEntityException.php +++ b/src/Exception/UnprocessableEntityException.php @@ -4,5 +4,4 @@ class UnprocessableEntityException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/Exception/VersionNotFoundException.php b/src/Exception/VersionNotFoundException.php index 4ec5638..e5f294b 100644 --- a/src/Exception/VersionNotFoundException.php +++ b/src/Exception/VersionNotFoundException.php @@ -4,5 +4,4 @@ class VersionNotFoundException extends AbstractKafkaSchemaRegistryException { - } diff --git a/src/ServiceProvider/KafkaSchemaRegistryApiClientProvider.php b/src/ServiceProvider/KafkaSchemaRegistryApiClientProvider.php index d8eef03..8769bfd 100644 --- a/src/ServiceProvider/KafkaSchemaRegistryApiClientProvider.php +++ b/src/ServiceProvider/KafkaSchemaRegistryApiClientProvider.php @@ -18,7 +18,6 @@ class KafkaSchemaRegistryApiClientProvider implements ServiceProviderInterface { - public const CONTAINER_KEY = 'kafka.schema.registry'; public const SETTING_KEY_USERNAME = 'username'; diff --git a/tests/KafkaSchemaRegistryApiClientTest.php b/tests/KafkaSchemaRegistryApiClientTest.php index 21ebb22..80135ec 100644 --- a/tests/KafkaSchemaRegistryApiClientTest.php +++ b/tests/KafkaSchemaRegistryApiClientTest.php @@ -15,7 +15,7 @@ /** * @covers \Jobcloud\Kafka\SchemaRegistryClient\KafkaSchemaRegistryApiClient */ -class KafkaSchemaRegistryApiApiClientTest extends TestCase +class KafkaSchemaRegistryApiClientTest extends TestCase { private const TEST_SUBJECT_NAME = 'some-subject'; private const TEST_SCHEMA = '{}'; diff --git a/tests/ReflectionAccessTrait.php b/tests/ReflectionAccessTrait.php index 060ed53..19b25dd 100644 --- a/tests/ReflectionAccessTrait.php +++ b/tests/ReflectionAccessTrait.php @@ -11,7 +11,6 @@ */ trait ReflectionAccessTrait { - /** * Set private/protected property. *