From afaafc1381c4063ec502e42f512489d2fa1eec14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 20 Dec 2022 20:08:56 +0000 Subject: [PATCH] Fix: Run 'make refactoring' --- example/test/Unit/Entity/UserTest.php | 2 +- test/Unit/Exception/InvalidDefinitionTest.php | 6 +++--- test/Unit/Exception/InvalidDirectoryTest.php | 2 +- test/Unit/Exception/InvalidSequenceTest.php | 2 +- test/Unit/FieldDefinition/ReferenceTest.php | 4 ++-- test/Unit/FieldDefinition/ReferencesTest.php | 4 ++-- test/Unit/FieldDefinitionTest.php | 4 ++-- test/Unit/FixtureFactory/UsingDefaultStrategyTest.php | 8 ++++---- .../Unit/FixtureFactory/UsingWithOptionalStrategyTest.php | 8 ++++---- .../FixtureFactory/UsingWithoutOptionalStrategyTest.php | 8 ++++---- test/Unit/Strategy/DefaultStrategyTest.php | 8 ++++---- test/Unit/Strategy/WithOptionalStrategyTest.php | 8 ++++---- test/Unit/Strategy/WithoutOptionalStrategyTest.php | 8 ++++---- 13 files changed, 36 insertions(+), 36 deletions(-) diff --git a/example/test/Unit/Entity/UserTest.php b/example/test/Unit/Entity/UserTest.php index 1938e8d9..692ebf45 100644 --- a/example/test/Unit/Entity/UserTest.php +++ b/example/test/Unit/Entity/UserTest.php @@ -25,7 +25,7 @@ final class UserTest extends Test\Unit\AbstractTestCase { public function testRenameToRenamesUser(): void { - $login = self::faker()->userName; + $login = self::faker()->userName(); /** @var Entity\User $user */ $user = self::fixtureFactory()->createOne(Entity\User::class); diff --git a/test/Unit/Exception/InvalidDefinitionTest.php b/test/Unit/Exception/InvalidDefinitionTest.php index 1679219d..50ac9ee8 100644 --- a/test/Unit/Exception/InvalidDefinitionTest.php +++ b/test/Unit/Exception/InvalidDefinitionTest.php @@ -28,7 +28,7 @@ final class InvalidDefinitionTest extends Framework\TestCase public function testCanNotBeAutoloadedReturnsException(): void { - $className = self::faker()->word; + $className = self::faker()->word(); $exception = Exception\InvalidDefinition::canNotBeAutoloaded($className); @@ -46,7 +46,7 @@ public function testCanNotBeAutoloadedReturnsException(): void public function testCanNotBeInstantiatedReturnsException(): void { - $className = self::faker()->word; + $className = self::faker()->word(); $exception = Exception\InvalidDefinition::canNotBeInstantiated($className); @@ -64,7 +64,7 @@ public function testCanNotBeInstantiatedReturnsException(): void public function testThrowsExceptionDuringInstantiationReturnsException(): void { - $className = self::faker()->word; + $className = self::faker()->word(); $previousException = new \Exception(); $exception = Exception\InvalidDefinition::throwsExceptionDuringInstantiation( diff --git a/test/Unit/Exception/InvalidDirectoryTest.php b/test/Unit/Exception/InvalidDirectoryTest.php index eb82fd2e..8b37feb0 100644 --- a/test/Unit/Exception/InvalidDirectoryTest.php +++ b/test/Unit/Exception/InvalidDirectoryTest.php @@ -28,7 +28,7 @@ final class InvalidDirectoryTest extends Framework\TestCase public function testNotDirectoryCreatesException(): void { - $directory = self::faker()->word; + $directory = self::faker()->word(); $exception = Exception\InvalidDirectory::notDirectory($directory); diff --git a/test/Unit/Exception/InvalidSequenceTest.php b/test/Unit/Exception/InvalidSequenceTest.php index 4604bd4c..c7f118f6 100644 --- a/test/Unit/Exception/InvalidSequenceTest.php +++ b/test/Unit/Exception/InvalidSequenceTest.php @@ -28,7 +28,7 @@ final class InvalidSequenceTest extends Framework\TestCase public function testValueReturnsException(): void { - $value = self::faker()->sentence; + $value = self::faker()->sentence(); $exception = Exception\InvalidSequence::value($value); diff --git a/test/Unit/FieldDefinition/ReferenceTest.php b/test/Unit/FieldDefinition/ReferenceTest.php index 171fbee1..45c4dd13 100644 --- a/test/Unit/FieldDefinition/ReferenceTest.php +++ b/test/Unit/FieldDefinition/ReferenceTest.php @@ -66,10 +66,10 @@ public function testResolvesToObjectCreatedByFixtureFactoryWhenSpecifyingFieldDe ); $fixtureFactory->define($className, [ - 'login' => $faker->userName, + 'login' => $faker->userName(), ]); - $overriddenLogin = $faker->userName; + $overriddenLogin = $faker->userName(); $fieldDefinition = new FieldDefinition\Reference( $className, diff --git a/test/Unit/FieldDefinition/ReferencesTest.php b/test/Unit/FieldDefinition/ReferencesTest.php index cea6ed30..6fb1baf0 100644 --- a/test/Unit/FieldDefinition/ReferencesTest.php +++ b/test/Unit/FieldDefinition/ReferencesTest.php @@ -76,10 +76,10 @@ public function testResolvesToArrayOfObjectsCreatedByFixtureFactoryWhenSpecifyin ); $fixtureFactory->define($className, [ - 'login' => $faker->userName, + 'login' => $faker->userName(), ]); - $overridenLogin = $faker->userName; + $overridenLogin = $faker->userName(); $fieldDefinition = new FieldDefinition\References( $className, diff --git a/test/Unit/FieldDefinitionTest.php b/test/Unit/FieldDefinitionTest.php index 2d156ab2..b6251345 100644 --- a/test/Unit/FieldDefinitionTest.php +++ b/test/Unit/FieldDefinitionTest.php @@ -43,7 +43,7 @@ public function testClosureReturnsClosure(): void /** @var Entity\User $user */ $user = $fixtureFactory->createOne(Entity\User::class); - $user->renameTo(self::faker()->userName); + $user->renameTo(self::faker()->userName()); return $user; }; @@ -61,7 +61,7 @@ public function testOptionalClosureReturnsOptionalClosure(): void /** @var Entity\User $user */ $user = $fixtureFactory->createOne(Entity\User::class); - $user->renameTo(self::faker()->userName); + $user->renameTo(self::faker()->userName()); return $user; }; diff --git a/test/Unit/FixtureFactory/UsingDefaultStrategyTest.php b/test/Unit/FixtureFactory/UsingDefaultStrategyTest.php index 41d58444..ab00e732 100644 --- a/test/Unit/FixtureFactory/UsingDefaultStrategyTest.php +++ b/test/Unit/FixtureFactory/UsingDefaultStrategyTest.php @@ -216,7 +216,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); /** @var Entity\Organization $organization */ @@ -244,7 +244,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); /** @var Entity\Organization $organization */ @@ -279,7 +279,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); /** @var Entity\Organization $organization */ @@ -313,7 +313,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); /** @var Entity\Organization $organization */ diff --git a/test/Unit/FixtureFactory/UsingWithOptionalStrategyTest.php b/test/Unit/FixtureFactory/UsingWithOptionalStrategyTest.php index f7cab450..7110eb1c 100644 --- a/test/Unit/FixtureFactory/UsingWithOptionalStrategyTest.php +++ b/test/Unit/FixtureFactory/UsingWithOptionalStrategyTest.php @@ -233,7 +233,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withOptionalFixtureFactory = $fixtureFactory->withOptional(); @@ -263,7 +263,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withOptionalFixtureFactory = $fixtureFactory->withOptional(); @@ -300,7 +300,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withOptionalFixtureFactory = $fixtureFactory->withOptional(); @@ -336,7 +336,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withOptionalFixtureFactory = $fixtureFactory->withOptional(); diff --git a/test/Unit/FixtureFactory/UsingWithoutOptionalStrategyTest.php b/test/Unit/FixtureFactory/UsingWithoutOptionalStrategyTest.php index e6185aa2..dc1540cf 100644 --- a/test/Unit/FixtureFactory/UsingWithoutOptionalStrategyTest.php +++ b/test/Unit/FixtureFactory/UsingWithoutOptionalStrategyTest.php @@ -233,7 +233,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withoutOptionalFixtureFactory = $fixtureFactory->withoutOptional(); @@ -263,7 +263,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withoutOptionalFixtureFactory = $fixtureFactory->withoutOptional(); @@ -300,7 +300,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withoutOptionalFixtureFactory = $fixtureFactory->withoutOptional(); @@ -335,7 +335,7 @@ public function testCreateOneResolvesReferencesToArrayCollectionOfEntitiesWhenFa ]); $fixtureFactory->define(Entity\Repository::class, [ - 'name' => self::faker()->word, + 'name' => self::faker()->word(), ]); $withoutOptionalFixtureFactory = $fixtureFactory->withoutOptional(); diff --git a/test/Unit/Strategy/DefaultStrategyTest.php b/test/Unit/Strategy/DefaultStrategyTest.php index 08fd031b..aa4349e7 100644 --- a/test/Unit/Strategy/DefaultStrategyTest.php +++ b/test/Unit/Strategy/DefaultStrategyTest.php @@ -41,7 +41,7 @@ public function testResolveFieldValueResolvesOptionalFieldDefinitionWithFakerAnd $faker, ); - $fieldDefinition = FieldDefinition::optionalValue($faker->sentence); + $fieldDefinition = FieldDefinition::optionalValue($faker->sentence()); $strategy = new Strategy\DefaultStrategy(); @@ -68,7 +68,7 @@ public function testResolveFieldValueResolvesOptionalFieldDefinitionToNullWhenFa $faker, ); - $fieldDefinition = FieldDefinition::optionalValue($faker->sentence); + $fieldDefinition = FieldDefinition::optionalValue($faker->sentence()); $strategy = new Strategy\DefaultStrategy(); @@ -90,7 +90,7 @@ public function testResolveFieldValueResolvesFieldDefinitionWithFakerAndFixtureF $faker, ); - $fieldDefinition = FieldDefinition::value($faker->sentence); + $fieldDefinition = FieldDefinition::value($faker->sentence()); $strategy = new Strategy\DefaultStrategy(); @@ -117,7 +117,7 @@ public function testResolveFieldValueResolvesFieldDefinitionWithFakerAndFixtureF $faker, ); - $fieldDefinition = FieldDefinition::value($faker->sentence); + $fieldDefinition = FieldDefinition::value($faker->sentence()); $strategy = new Strategy\DefaultStrategy(); diff --git a/test/Unit/Strategy/WithOptionalStrategyTest.php b/test/Unit/Strategy/WithOptionalStrategyTest.php index 072ca93f..5f789ee4 100644 --- a/test/Unit/Strategy/WithOptionalStrategyTest.php +++ b/test/Unit/Strategy/WithOptionalStrategyTest.php @@ -41,7 +41,7 @@ public function testResolveFieldValueResolvesOptionalFieldDefinitionWithFakerAnd $faker, ); - $fieldDefinition = FieldDefinition::optionalValue($faker->sentence); + $fieldDefinition = FieldDefinition::optionalValue($faker->sentence()); $strategy = new Strategy\WithOptionalStrategy(); @@ -68,7 +68,7 @@ public function testResolveFieldValueResolvesOptionalFieldDefinitionWithFakerAnd $faker, ); - $fieldDefinition = FieldDefinition::optionalValue($faker->sentence); + $fieldDefinition = FieldDefinition::optionalValue($faker->sentence()); $strategy = new Strategy\WithOptionalStrategy(); @@ -95,7 +95,7 @@ public function testResolveFieldValueResolvesFieldDefinitionWithFakerAndFixtureF $faker, ); - $fieldDefinition = FieldDefinition::value($faker->sentence); + $fieldDefinition = FieldDefinition::value($faker->sentence()); $strategy = new Strategy\WithOptionalStrategy(); @@ -122,7 +122,7 @@ public function testResolveFieldValueResolvesFieldDefinitionWithFakerAndFixtureF $faker, ); - $fieldDefinition = FieldDefinition::value($faker->sentence); + $fieldDefinition = FieldDefinition::value($faker->sentence()); $strategy = new Strategy\WithOptionalStrategy(); diff --git a/test/Unit/Strategy/WithoutOptionalStrategyTest.php b/test/Unit/Strategy/WithoutOptionalStrategyTest.php index e3786c45..8a9bf0d8 100644 --- a/test/Unit/Strategy/WithoutOptionalStrategyTest.php +++ b/test/Unit/Strategy/WithoutOptionalStrategyTest.php @@ -41,7 +41,7 @@ public function testResolveFieldValueResolvesOptionalFieldDefinitionToNullWhenFa $faker, ); - $fieldDefinition = FieldDefinition::optionalValue($faker->sentence); + $fieldDefinition = FieldDefinition::optionalValue($faker->sentence()); $strategy = new Strategy\WithoutOptionalStrategy(); @@ -63,7 +63,7 @@ public function testResolveFieldValueResolvesOptionalFieldDefinitionToNullWhenFa $faker, ); - $fieldDefinition = FieldDefinition::optionalValue($faker->sentence); + $fieldDefinition = FieldDefinition::optionalValue($faker->sentence()); $strategy = new Strategy\WithoutOptionalStrategy(); @@ -85,7 +85,7 @@ public function testResolveFieldValueResolvesFieldDefinitionWithFakerAndFixtureF $faker, ); - $fieldDefinition = FieldDefinition::value($faker->sentence); + $fieldDefinition = FieldDefinition::value($faker->sentence()); $strategy = new Strategy\WithoutOptionalStrategy(); @@ -112,7 +112,7 @@ public function testResolveFieldValueResolvesFieldDefinitionWithoutFakerAndFixtu $faker, ); - $fieldDefinition = FieldDefinition::value($faker->sentence); + $fieldDefinition = FieldDefinition::value($faker->sentence()); $strategy = new Strategy\WithoutOptionalStrategy();