From b1ab0bef80e4ab7243d866067b8ef2fc72475328 Mon Sep 17 00:00:00 2001 From: Maxim Smakouz Date: Tue, 30 Jan 2024 19:29:24 +0200 Subject: [PATCH] Fix CS --- tests/Command/Migration/TestCase.php | 3 +-- .../Schema/Provider/FromConveyorSchemaProviderTest.php | 4 ++-- tests/Unit/Data/Reader/FilterHandler/CompareHandlerTest.php | 2 +- tests/Unit/Data/Reader/FilterHandler/GroupHandlerTest.php | 2 +- tests/Unit/Exception/NotFoundExceptionTest.php | 2 +- tests/Unit/Exception/NotInstantiableClassExceptionTest.php | 5 +++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Command/Migration/TestCase.php b/tests/Command/Migration/TestCase.php index c9186f5..d08ed98 100644 --- a/tests/Command/Migration/TestCase.php +++ b/tests/Command/Migration/TestCase.php @@ -36,8 +36,7 @@ protected static function databaseManager(): DatabaseManager protected static function migration(): FakeMigration { $migration = new FakeMigration(); - $migration = $migration->withState(new State('test', new \DateTimeImmutable(), State::STATUS_PENDING)); - return $migration; + return $migration->withState(new State('test', new \DateTimeImmutable(), State::STATUS_PENDING)); } } diff --git a/tests/Feature/Schema/Provider/FromConveyorSchemaProviderTest.php b/tests/Feature/Schema/Provider/FromConveyorSchemaProviderTest.php index baa447d..f50fb06 100644 --- a/tests/Feature/Schema/Provider/FromConveyorSchemaProviderTest.php +++ b/tests/Feature/Schema/Provider/FromConveyorSchemaProviderTest.php @@ -109,8 +109,8 @@ public function testReadFromConveyor(): void SchemaInterface::SCOPE => null, SchemaInterface::TYPECAST => ['id' => 'int', 'createdAt' => 'datetime'], SchemaInterface::SCHEMA => [], - SchemaInterface::TYPECAST_HANDLER => null - ] + SchemaInterface::TYPECAST_HANDLER => null, + ], ], $provider->read()); } diff --git a/tests/Unit/Data/Reader/FilterHandler/CompareHandlerTest.php b/tests/Unit/Data/Reader/FilterHandler/CompareHandlerTest.php index 48caf88..b570154 100644 --- a/tests/Unit/Data/Reader/FilterHandler/CompareHandlerTest.php +++ b/tests/Unit/Data/Reader/FilterHandler/CompareHandlerTest.php @@ -11,7 +11,7 @@ final class CompareHandlerTest extends TestCase { public function testValidateArgumentsException(): void { - $handler = new class extends CompareHandler { + $handler = new class () extends CompareHandler { public function getOperator(): string { } diff --git a/tests/Unit/Data/Reader/FilterHandler/GroupHandlerTest.php b/tests/Unit/Data/Reader/FilterHandler/GroupHandlerTest.php index 2f8e843..9b48883 100644 --- a/tests/Unit/Data/Reader/FilterHandler/GroupHandlerTest.php +++ b/tests/Unit/Data/Reader/FilterHandler/GroupHandlerTest.php @@ -14,7 +14,7 @@ final class GroupHandlerTest extends TestCase */ public function testInvalidArgumentsException(array $arguments, string $error): void { - $handler = new class extends GroupHandler { + $handler = new class () extends GroupHandler { public function getOperator(): string { } diff --git a/tests/Unit/Exception/NotFoundExceptionTest.php b/tests/Unit/Exception/NotFoundExceptionTest.php index 6f5eb81..74c3ea1 100644 --- a/tests/Unit/Exception/NotFoundExceptionTest.php +++ b/tests/Unit/Exception/NotFoundExceptionTest.php @@ -20,7 +20,7 @@ public function testDefaultState(): void $exception->getMessage() ); $this->assertSame(0, $exception->getCode()); - $this->assertNull( $exception->getPrevious()); + $this->assertNull($exception->getPrevious()); } public function testFriendly(): void diff --git a/tests/Unit/Exception/NotInstantiableClassExceptionTest.php b/tests/Unit/Exception/NotInstantiableClassExceptionTest.php index 8778a87..b96ecdf 100644 --- a/tests/Unit/Exception/NotInstantiableClassExceptionTest.php +++ b/tests/Unit/Exception/NotInstantiableClassExceptionTest.php @@ -16,12 +16,13 @@ public function testDefaultState(): void $exception = new NotInstantiableClassException(\stdClass::class); $this->assertInstanceOf(\Exception::class, $exception); - $this->assertSame(\sprintf('Can not instantiate "%s" because it is not a subclass of "%s".', + $this->assertSame(\sprintf( + 'Can not instantiate "%s" because it is not a subclass of "%s".', \stdClass::class, RepositoryInterface::class ), $exception->getMessage()); $this->assertSame(0, $exception->getCode()); - $this->assertNull( $exception->getPrevious()); + $this->assertNull($exception->getPrevious()); } public function testFriendly(): void