diff --git a/.github/workflows/fabbot.yml b/.github/workflows/fabbot.yml new file mode 100644 index 000000000..43c5a41cb --- /dev/null +++ b/.github/workflows/fabbot.yml @@ -0,0 +1,14 @@ +name: CS + +on: + pull_request: + +permissions: + contents: read + +jobs: + call-fabbot: + name: Fabbot + uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@main + with: + package: MakerBundle diff --git a/src/Maker/MakeMigration.php b/src/Maker/MakeMigration.php index 206a8d84d..8b2818927 100644 --- a/src/Maker/MakeMigration.php +++ b/src/Maker/MakeMigration.php @@ -114,7 +114,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen try { $returnCode = $generateMigrationCommand->run($generateMigrationCommandInput, $commandOutput); - // non-zero code would ideally mean the internal command has already printed an errror + // non-zero code would ideally mean the internal command has already printed an error // this happens if you "decline" generating a migration when you already // have some available if (0 !== $returnCode) { diff --git a/tests/Command/MakerCommandTest.php b/tests/Command/MakerCommandTest.php index 06aa9823d..114cbcb56 100644 --- a/tests/Command/MakerCommandTest.php +++ b/tests/Command/MakerCommandTest.php @@ -23,7 +23,7 @@ class MakerCommandTest extends TestCase { - public function testExceptionOnMissingDependencies(): void + public function testExceptionOnMissingDependencies() { $this->expectException(RuntimeCommandException::class); if (method_exists($this, 'expectExceptionMessageMatches')) { @@ -47,7 +47,7 @@ public function testExceptionOnMissingDependencies(): void $tester->execute([]); } - public function testExceptionOnUnknownRootNamespace(): void + public function testExceptionOnUnknownRootNamespace() { $maker = $this->createMock(MakerInterface::class); diff --git a/tests/Docker/DatabaseServicesTest.php b/tests/Docker/DatabaseServicesTest.php index 1888cef9e..b95bceb5e 100644 --- a/tests/Docker/DatabaseServicesTest.php +++ b/tests/Docker/DatabaseServicesTest.php @@ -20,7 +20,7 @@ */ final class DatabaseServicesTest extends TestCase { - public function testExceptionThrownWithInvalidDatabaseProvided(): void + public function testExceptionThrownWithInvalidDatabaseProvided() { $this->expectException(RuntimeCommandException::class); $this->expectExceptionMessage('foo is not a valid / supported docker database type.'); @@ -38,7 +38,7 @@ public function mixedNameDataProvider(): \Generator /** * @dataProvider mixedNameDataProvider */ - public function testSkeletonReturnArrayForDesiredDatabase(string $databaseName): void + public function testSkeletonReturnArrayForDesiredDatabase(string $databaseName) { $result = DockerDatabaseServices::getDatabaseSkeleton($databaseName, 'latest'); @@ -49,7 +49,7 @@ public function testSkeletonReturnArrayForDesiredDatabase(string $databaseName): /** * @dataProvider mixedNameDataProvider */ - public function testGetDefaultPorts(string $databaseName): void + public function testGetDefaultPorts(string $databaseName) { $result = DockerDatabaseServices::getDefaultPorts($databaseName); @@ -59,7 +59,7 @@ public function testGetDefaultPorts(string $databaseName): void /** * @dataProvider mixedNameDataProvider */ - public function testSuggestedVersion(string $databaseName): void + public function testSuggestedVersion(string $databaseName) { $result = DockerDatabaseServices::getSuggestedServiceVersion($databaseName); diff --git a/tests/Doctrine/EntityRegeneratorTest.php b/tests/Doctrine/EntityRegeneratorTest.php index 5a8f07e5f..cfafa378d 100644 --- a/tests/Doctrine/EntityRegeneratorTest.php +++ b/tests/Doctrine/EntityRegeneratorTest.php @@ -37,7 +37,7 @@ class EntityRegeneratorTest extends TestCase /** * @dataProvider getRegenerateEntitiesTests */ - public function testRegenerateEntities(string $expectedDirName, bool $overwrite): void + public function testRegenerateEntities(string $expectedDirName, bool $overwrite) { $kernel = new TestEntityRegeneratorKernel('dev', true); $this->doTestRegeneration( diff --git a/tests/FileManagerTest.php b/tests/FileManagerTest.php index d8996e345..c2e1c8ed5 100644 --- a/tests/FileManagerTest.php +++ b/tests/FileManagerTest.php @@ -188,7 +188,7 @@ public function getPathForTemplateTests() ]; } - public function testWithMakerFileLinkFormatter(): void + public function testWithMakerFileLinkFormatter() { if (getenv('MAKER_DISABLE_FILE_LINKS')) { $this->markTestSkipped(); diff --git a/tests/GeneratorTest.php b/tests/GeneratorTest.php index 9c1c85f84..88a71e044 100644 --- a/tests/GeneratorTest.php +++ b/tests/GeneratorTest.php @@ -20,7 +20,7 @@ class GeneratorTest extends TestCase /** * @dataProvider getClassNameDetailsTests */ - public function testCreateClassNameDetails(string $name, string $prefix, string $suffix, string $expectedFullClassName, string $expectedRelativeClassName): void + public function testCreateClassNameDetails(string $name, string $prefix, string $suffix, string $expectedFullClassName, string $expectedRelativeClassName) { $fileManager = $this->createMock(FileManager::class); $fileManager->expects($this->any()) diff --git a/tests/Maker/FunctionalTest.php b/tests/Maker/FunctionalTest.php index 7f8e6c6ce..5662eb76e 100644 --- a/tests/Maker/FunctionalTest.php +++ b/tests/Maker/FunctionalTest.php @@ -24,7 +24,7 @@ class FunctionalTest extends TestCase * Smoke test to make sure the DI autowiring works and all makers * are registered and have the correct arguments. */ - public function testWiring(): void + public function testWiring() { $kernel = new MakerTestKernel('dev', true); diff --git a/tests/RegexTest.php b/tests/RegexTest.php index aee93eed5..44d8493eb 100644 --- a/tests/RegexTest.php +++ b/tests/RegexTest.php @@ -26,7 +26,7 @@ class RegexTest extends TestCase { /** @dataProvider generatedFilesRegexDataProvider */ - public function testMakerTestEnvironmentGeneratedFilesRegex(string $subjectData, array $expectedResult): void + public function testMakerTestEnvironmentGeneratedFilesRegex(string $subjectData, array $expectedResult) { $result = []; @@ -69,7 +69,7 @@ private function generatedFilesRegexDataProvider(): \Generator } /** @dataProvider webhookNameRegexDataProvider */ - public function testWebhookNameRegex(string $subjectData, bool $expectedResult): void + public function testWebhookNameRegex(string $subjectData, bool $expectedResult) { $result = preg_match(MakeWebhook::WEBHOOK_NAME_PATTERN, $subjectData); diff --git a/tests/Security/InteractiveSecurityHelperTest.php b/tests/Security/InteractiveSecurityHelperTest.php index d28522359..b1ea012dc 100644 --- a/tests/Security/InteractiveSecurityHelperTest.php +++ b/tests/Security/InteractiveSecurityHelperTest.php @@ -209,7 +209,7 @@ public function guessEmailFieldTest() } /** @dataProvider authenticatorClassProvider */ - public function testGetAuthenticatorsFromConfig(array $firewalls, array $expectedResults): void + public function testGetAuthenticatorsFromConfig(array $firewalls, array $expectedResults) { $helper = new InteractiveSecurityHelper(); $result = $helper->getAuthenticatorsFromConfig($firewalls); diff --git a/tests/Security/SecurityConfigUpdaterTest.php b/tests/Security/SecurityConfigUpdaterTest.php index d32f750f4..f9defc9d8 100644 --- a/tests/Security/SecurityConfigUpdaterTest.php +++ b/tests/Security/SecurityConfigUpdaterTest.php @@ -29,7 +29,7 @@ class SecurityConfigUpdaterTest extends TestCase /** * @dataProvider getUserClassTests */ - public function testUpdateForUserClass(UserClassConfiguration $userConfig, string $expectedSourceFilename, string $startingSourceFilename = 'simple_security.yaml'): void + public function testUpdateForUserClass(UserClassConfiguration $userConfig, string $expectedSourceFilename, string $startingSourceFilename = 'simple_security.yaml') { $this->createLogger(); @@ -104,7 +104,7 @@ public function getUserClassTests(): \Generator /** * @dataProvider getAuthenticatorTests */ - public function testUpdateForAuthenticator(string $firewallName, $entryPoint, string $expectedSourceFilename, string $startingSourceFilename, bool $logoutSetup, bool $supportRememberMe, bool $alwaysRememberMe): void + public function testUpdateForAuthenticator(string $firewallName, $entryPoint, string $expectedSourceFilename, string $startingSourceFilename, bool $logoutSetup, bool $supportRememberMe, bool $alwaysRememberMe) { $this->createLogger(); @@ -199,7 +199,7 @@ public function getAuthenticatorTests(): \Generator ]; } - public function testUpdateForFormLogin(): void + public function testUpdateForFormLogin() { $this->createLogger(); @@ -214,7 +214,7 @@ public function testUpdateForFormLogin(): void ); } - public function testUpdateForJsonLogin(): void + public function testUpdateForJsonLogin() { $this->createLogger(); @@ -229,7 +229,7 @@ public function testUpdateForJsonLogin(): void ); } - public function testUpdateForLogout(): void + public function testUpdateForLogout() { $this->createLogger(); diff --git a/tests/Security/SecurityControllerBuilderTest.php b/tests/Security/SecurityControllerBuilderTest.php index 9008559ac..cda45ff42 100644 --- a/tests/Security/SecurityControllerBuilderTest.php +++ b/tests/Security/SecurityControllerBuilderTest.php @@ -19,7 +19,7 @@ class SecurityControllerBuilderTest extends TestCase { private string $expectedBasePath = __DIR__.'/fixtures/expected'; - public function testLoginMethod(): void + public function testLoginMethod() { $this->runMethodTest( 'addLoginMethod', @@ -27,7 +27,7 @@ public function testLoginMethod(): void ); } - public function testLogoutMethod(): void + public function testLogoutMethod() { $this->runMethodTest( 'addLogoutMethod', @@ -35,7 +35,7 @@ public function testLogoutMethod(): void ); } - public function testLoginAndLogoutMethod(): void + public function testLoginAndLogoutMethod() { $builder = new SecurityControllerBuilder(); $csm = $this->getClassSourceManipulator(); diff --git a/tests/Security/UserClassBuilderTest.php b/tests/Security/UserClassBuilderTest.php index c3197a886..a4f577b30 100644 --- a/tests/Security/UserClassBuilderTest.php +++ b/tests/Security/UserClassBuilderTest.php @@ -23,7 +23,7 @@ class UserClassBuilderTest extends TestCase /** * @dataProvider getUserInterfaceTests */ - public function testAddUserInterfaceImplementation(UserClassConfiguration $userClassConfig, string $expectedFilename): void + public function testAddUserInterfaceImplementation(UserClassConfiguration $userClassConfig, string $expectedFilename) { $manipulator = $this->getClassSourceManipulator($userClassConfig); diff --git a/tests/Test/MakerTestDetailsTest.php b/tests/Test/MakerTestDetailsTest.php index db600f12f..7693b0b5a 100644 --- a/tests/Test/MakerTestDetailsTest.php +++ b/tests/Test/MakerTestDetailsTest.php @@ -25,7 +25,7 @@ class MakerTestDetailsTest extends TestCase { - public function testAddExtraDependencies(): void + public function testAddExtraDependencies() { $details = new MakerTestDetails($this->createMock(MakerInterface::class)); @@ -38,7 +38,7 @@ public function testAddExtraDependencies(): void self::assertSame(['twig', 'ux', 'mercure'], $details->getExtraDependencies()); } - public function testAddRequiredPackageVersions(): void + public function testAddRequiredPackageVersions() { $details = new MakerTestDetails($this->createMock(MakerInterface::class)); @@ -53,7 +53,7 @@ public function testAddRequiredPackageVersions(): void ], $details->getRequiredPackageVersions()); } - public function testGetDependencies(): void + public function testGetDependencies() { $details = new MakerTestDetails(new TestMakerFixture()); diff --git a/tests/Util/ClassDetailsTest.php b/tests/Util/ClassDetailsTest.php index 29a5aa554..5a176e88a 100644 --- a/tests/Util/ClassDetailsTest.php +++ b/tests/Util/ClassDetailsTest.php @@ -20,7 +20,7 @@ */ final class ClassDetailsTest extends TestCase { - public function testHasAttribute(): void + public function testHasAttribute() { self::assertTrue((new ClassDetails(FixtureClassDetails::class))->hasAttribute(UniqueEntity::class)); diff --git a/tests/Util/ClassSource/ClassDataTest.php b/tests/Util/ClassSource/ClassDataTest.php index 27d345028..e6c0186f7 100644 --- a/tests/Util/ClassSource/ClassDataTest.php +++ b/tests/Util/ClassSource/ClassDataTest.php @@ -18,7 +18,7 @@ class ClassDataTest extends TestCase { - public function testStaticConstructor(): void + public function testStaticConstructor() { $meta = ClassData::create(MakerBundle::class); @@ -30,14 +30,14 @@ public function testStaticConstructor(): void self::assertSame('App\Symfony\Bundle\MakerBundle\MakerBundle', $meta->getFullClassName()); } - public function testGetClassDeclaration(): void + public function testGetClassDeclaration() { $meta = ClassData::create(MakerBundle::class); self::assertSame('final class MakerBundle', $meta->getClassDeclaration()); } - public function testIsFinal(): void + public function testIsFinal() { $meta = ClassData::create(MakerBundle::class); @@ -49,7 +49,7 @@ public function testIsFinal(): void self::assertSame('class MakerBundle', $meta->getClassDeclaration()); } - public function testGetClassDeclarationWithExtends(): void + public function testGetClassDeclarationWithExtends() { $meta = ClassData::create(class: MakerBundle::class, extendsClass: MakerTestKernel::class); @@ -57,7 +57,7 @@ public function testGetClassDeclarationWithExtends(): void } /** @dataProvider suffixDataProvider */ - public function testSuffix(?string $suffix, string $expectedResult): void + public function testSuffix(?string $suffix, string $expectedResult) { $data = ClassData::create(class: MakerBundle::class, suffix: $suffix); @@ -72,7 +72,7 @@ public function suffixDataProvider(): \Generator } /** @dataProvider namespaceDataProvider */ - public function testNamespace(string $class, ?string $rootNamespace, string $expectedNamespace, string $expectedFullClassName): void + public function testNamespace(string $class, ?string $rootNamespace, string $expectedNamespace, string $expectedFullClassName) { $class = ClassData::create($class); @@ -92,7 +92,7 @@ public function namespaceDataProvider(): \Generator yield ['Controller\MyController', 'Maker', 'Maker\Controller', 'Maker\Controller\MyController']; } - public function testGetClassName(): void + public function testGetClassName() { $class = ClassData::create(class: 'Controller\\Foo', suffix: 'Controller'); self::assertSame('FooController', $class->getClassName()); @@ -102,7 +102,7 @@ public function testGetClassName(): void self::assertSame('App\Controller\FooController', $class->getFullClassName()); } - public function testGetClassNameRelativeNamespace(): void + public function testGetClassNameRelativeNamespace() { $class = ClassData::create(class: 'Controller\\Admin\\Foo', suffix: 'Controller'); self::assertSame('FooController', $class->getClassName()); @@ -112,7 +112,7 @@ public function testGetClassNameRelativeNamespace(): void self::assertSame('App\Controller\Admin\FooController', $class->getFullClassName()); } - public function testGetClassNameWithAbsoluteNamespace(): void + public function testGetClassNameWithAbsoluteNamespace() { $class = ClassData::create(class: '\\Foo\\Bar\\Admin\\Baz', suffix: 'Controller'); self::assertSame('BazController', $class->getClassName()); @@ -121,7 +121,7 @@ public function testGetClassNameWithAbsoluteNamespace(): void } /** @dataProvider fullClassNameProvider */ - public function testGetFullClassName(string $class, ?string $rootNamespace, bool $withoutRootNamespace, bool $withoutSuffix, string $expectedFullClassName): void + public function testGetFullClassName(string $class, ?string $rootNamespace, bool $withoutRootNamespace, bool $withoutSuffix, string $expectedFullClassName) { $class = ClassData::create($class, suffix: 'Controller'); diff --git a/tests/Util/ClassSourceManipulatorTest.php b/tests/Util/ClassSourceManipulatorTest.php index 8c3e7eefd..2f212e8da 100644 --- a/tests/Util/ClassSourceManipulatorTest.php +++ b/tests/Util/ClassSourceManipulatorTest.php @@ -29,7 +29,7 @@ class ClassSourceManipulatorTest extends TestCase /** * @dataProvider getAddPropertyTests */ - public function testAddProperty(string $sourceFilename, $propertyName, array $commentLines, $expectedSourceFilename): void + public function testAddProperty(string $sourceFilename, $propertyName, array $commentLines, $expectedSourceFilename) { $source = file_get_contents(__DIR__.'/fixtures/source/'.$sourceFilename); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_property/'.$expectedSourceFilename); @@ -77,7 +77,7 @@ public function getAddPropertyTests(): \Generator /** * @dataProvider getAddGetterTests */ - public function testAddGetter(string $sourceFilename, string $propertyName, string $type, array $commentLines, $expectedSourceFilename): void + public function testAddGetter(string $sourceFilename, string $propertyName, string $type, array $commentLines, $expectedSourceFilename) { $source = file_get_contents(__DIR__.'/fixtures/source/'.$sourceFilename); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_getter/'.$expectedSourceFilename); @@ -145,7 +145,7 @@ public function getAddGetterTests(): \Generator /** * @dataProvider getAddSetterTests */ - public function testAddSetter(string $sourceFilename, string $propertyName, ?string $type, bool $isNullable, array $commentLines, $expectedSourceFilename): void + public function testAddSetter(string $sourceFilename, string $propertyName, ?string $type, bool $isNullable, array $commentLines, $expectedSourceFilename) { $source = file_get_contents(__DIR__.'/fixtures/source/'.$sourceFilename); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_setter/'.$expectedSourceFilename); @@ -210,7 +210,7 @@ public function getAddSetterTests(): \Generator /** * @dataProvider getAttributeClassTests */ - public function testAddAttributeToClass(string $sourceFilename, string $expectedSourceFilename, string $attributeClass, array $attributeOptions, ?string $attributePrefix = null): void + public function testAddAttributeToClass(string $sourceFilename, string $expectedSourceFilename, string $attributeClass, array $attributeOptions, ?string $attributePrefix = null) { $source = file_get_contents(__DIR__.'/fixtures/source/'.$sourceFilename); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_class_attribute/'.$expectedSourceFilename); @@ -240,7 +240,7 @@ public function getAttributeClassTests(): \Generator /** * @dataProvider getAddEntityFieldTests */ - public function testAddEntityField(string $sourceFilename, ClassProperty $propertyModel, $expectedSourceFilename): void + public function testAddEntityField(string $sourceFilename, ClassProperty $propertyModel, $expectedSourceFilename) { $sourcePath = __DIR__.'/fixtures/source'; $expectedPath = __DIR__.'/fixtures/add_entity_field'; @@ -311,7 +311,7 @@ public function getAddEntityFieldTests(): \Generator /** * @dataProvider getAddManyToOneRelationTests */ - public function testAddManyToOneRelation(string $sourceFilename, $expectedSourceFilename, RelationManyToOne $manyToOne): void + public function testAddManyToOneRelation(string $sourceFilename, $expectedSourceFilename, RelationManyToOne $manyToOne) { $sourcePath = __DIR__.'/fixtures/source'; $expectedPath = __DIR__.'/fixtures/add_many_to_one_relation'; @@ -409,7 +409,7 @@ public function getAddManyToOneRelationTests(): \Generator /** * @dataProvider getAddOneToManyRelationTests */ - public function testAddOneToManyRelation(string $sourceFilename, string $expectedSourceFilename, RelationOneToMany $oneToMany): void + public function testAddOneToManyRelation(string $sourceFilename, string $expectedSourceFilename, RelationOneToMany $oneToMany) { $sourcePath = __DIR__.'/fixtures/source'; $expectedPath = __DIR__.'/fixtures/add_one_to_many_relation'; @@ -475,7 +475,7 @@ public function getAddOneToManyRelationTests(): \Generator /** * @dataProvider getAddManyToManyRelationTests */ - public function testAddManyToManyRelation(string $sourceFilename, $expectedSourceFilename, RelationManyToMany $manyToMany): void + public function testAddManyToManyRelation(string $sourceFilename, $expectedSourceFilename, RelationManyToMany $manyToMany) { $sourcePath = __DIR__.'/fixtures/source'; $expectedPath = __DIR__.'/fixtures/add_many_to_many_relation'; @@ -534,7 +534,7 @@ public function getAddManyToManyRelationTests(): \Generator /** * @dataProvider getAddOneToOneRelationTests */ - public function testAddOneToOneRelation(string $sourceFilename, $expectedSourceFilename, RelationOneToOne $oneToOne): void + public function testAddOneToOneRelation(string $sourceFilename, $expectedSourceFilename, RelationOneToOne $oneToOne) { $sourcePath = __DIR__.'/fixtures/source'; $expectedPath = __DIR__.'/fixtures/add_one_to_one_relation'; @@ -653,7 +653,7 @@ public function getAddOneToOneRelationTests(): \Generator ]; } - public function testAddInterface(): void + public function testAddInterface() { $source = file_get_contents(__DIR__.'/fixtures/source/User_simple.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/implements_interface/User_simple.php'); @@ -664,7 +664,7 @@ public function testAddInterface(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddInterfaceToClassWithOtherInterface(): void + public function testAddInterfaceToClassWithOtherInterface() { $source = file_get_contents(__DIR__.'/fixtures/source/User_simple_with_interface.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/implements_interface/User_simple_with_interface.php'); @@ -675,7 +675,7 @@ public function testAddInterfaceToClassWithOtherInterface(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddMethodBuilder(): void + public function testAddMethodBuilder() { $source = file_get_contents(__DIR__.'/fixtures/source/User_empty.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_method/UserEmpty_with_newMethod.php'); @@ -697,7 +697,7 @@ public function testAddMethodBuilder(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddMethodWithBody(): void + public function testAddMethodWithBody() { $source = file_get_contents(__DIR__.'/fixtures/source/EmptyController.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_method/Controller_with_action.php'); @@ -721,7 +721,7 @@ public function testAddMethodWithBody(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddTraitInEmptyClass(): void + public function testAddTraitInEmptyClass() { $source = file_get_contents(__DIR__.'/fixtures/source/User_empty.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_trait/User_with_only_trait.php'); @@ -733,7 +733,7 @@ public function testAddTraitInEmptyClass(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddTraitWithProperty(): void + public function testAddTraitWithProperty() { $source = file_get_contents(__DIR__.'/fixtures/source/User_simple.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_trait/User_with_prop_trait.php'); @@ -745,7 +745,7 @@ public function testAddTraitWithProperty(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddTraitWithConstant(): void + public function testAddTraitWithConstant() { $source = file_get_contents(__DIR__.'/fixtures/source/User_with_const.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_trait/User_with_const_trait.php'); @@ -757,7 +757,7 @@ public function testAddTraitWithConstant(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddTraitWithTrait(): void + public function testAddTraitWithTrait() { $source = file_get_contents(__DIR__.'/fixtures/source/User_with_trait.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_trait/User_with_trait_trait.php'); @@ -769,7 +769,7 @@ public function testAddTraitWithTrait(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddTraitAlReadyExists(): void + public function testAddTraitAlReadyExists() { $source = file_get_contents(__DIR__.'/fixtures/add_trait/User_with_trait_trait.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_trait/User_with_trait_trait.php'); @@ -781,7 +781,7 @@ public function testAddTraitAlReadyExists(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddConstructor(): void + public function testAddConstructor() { $source = file_get_contents(__DIR__.'/fixtures/source/User_empty.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_constructor/UserEmpty_with_constructor.php'); @@ -801,7 +801,7 @@ public function testAddConstructor(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddConstructorInClassContainsPropsAndMethods(): void + public function testAddConstructorInClassContainsPropsAndMethods() { $source = file_get_contents(__DIR__.'/fixtures/source/User_simple.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_constructor/UserSimple_with_constructor.php'); @@ -821,7 +821,7 @@ public function testAddConstructorInClassContainsPropsAndMethods(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddConstructorInClassContainsOnlyConstants(): void + public function testAddConstructorInClassContainsOnlyConstants() { $source = file_get_contents(__DIR__.'/fixtures/source/User_with_const.php'); $expectedSource = file_get_contents(__DIR__.'/fixtures/add_constructor/User_with_constructor_constante.php'); @@ -841,7 +841,7 @@ public function testAddConstructorInClassContainsOnlyConstants(): void $this->assertSame($expectedSource, $manipulator->getSourceCode()); } - public function testAddConstructorInClassContainsConstructor(): void + public function testAddConstructorInClassContainsConstructor() { $source = file_get_contents(__DIR__.'/fixtures/source/User_with_constructor.php'); diff --git a/tests/Util/CliOutputHelperTest.php b/tests/Util/CliOutputHelperTest.php index 5a2894d25..ed492ef41 100644 --- a/tests/Util/CliOutputHelperTest.php +++ b/tests/Util/CliOutputHelperTest.php @@ -25,7 +25,7 @@ protected function tearDown(): void putenv('SYMFONY_CLI_VERSION'); } - public function testCorrectCommandPrefixReturnedWhenUsingSymfonyBinary(): void + public function testCorrectCommandPrefixReturnedWhenUsingSymfonyBinary() { self::assertSame('php bin/console', CliOutputHelper::getCommandPrefix()); diff --git a/tests/Util/ComposeFileManipulatorTest.php b/tests/Util/ComposeFileManipulatorTest.php index aaec271d5..25a1df7c3 100644 --- a/tests/Util/ComposeFileManipulatorTest.php +++ b/tests/Util/ComposeFileManipulatorTest.php @@ -20,12 +20,12 @@ */ class ComposeFileManipulatorTest extends TestCase { - public function testComposeFileVersion(): void + public function testComposeFileVersion() { self::assertSame('3.7', ComposeFileManipulator::COMPOSE_FILE_VERSION); } - public function testGetComposeDataReturnsEmptyComposeFileOnEmpty(): void + public function testGetComposeDataReturnsEmptyComposeFileOnEmpty() { $manipulator = new ComposeFileManipulator(''); @@ -37,7 +37,7 @@ public function testGetComposeDataReturnsEmptyComposeFileOnEmpty(): void self::assertSame($expected, $manipulator->getComposeData()); } - public function testServiceExists(): void + public function testServiceExists() { $composeFile = <<< 'EOT' version: '3.7' @@ -50,7 +50,7 @@ public function testServiceExists(): void self::assertFalse($manipulator->serviceExists('redis')); } - public function testAddDockerService(): void + public function testAddDockerService() { $manipulator = new ComposeFileManipulator(''); $manipulator->addDockerService('redis', ['coming' => 'soon']); @@ -67,7 +67,7 @@ public function testAddDockerService(): void self::assertSame($expected, $manipulator->getComposeData()); } - public function testRemoveDockerService(): void + public function testRemoveDockerService() { $composeFile = <<< 'EOT' version: '3.7' @@ -88,7 +88,7 @@ public function testRemoveDockerService(): void self::assertSame($expected, $manipulator->getComposeData()); } - public function testExposePorts(): void + public function testExposePorts() { $composeFile = <<< 'EOT' version: '3.7' @@ -114,7 +114,7 @@ public function testExposePorts(): void self::assertSame($expected, $manipulator->getComposeData()); } - public function testAddVolume(): void + public function testAddVolume() { $composeFile = <<< 'EOT' version: '3.7' @@ -141,7 +141,7 @@ public function testAddVolume(): void self::assertSame($expected, $manipulator->getComposeData()); } - public function testCheckComposeFileVersion(): void + public function testCheckComposeFileVersion() { new ComposeFileManipulator('version: \'2\''); @@ -151,7 +151,7 @@ public function testCheckComposeFileVersion(): void new ComposeFileManipulator('version: \'1.9\''); } - public function testCheckComposeFileVersionThrowsExceptionWithMissingVersion(): void + public function testCheckComposeFileVersionThrowsExceptionWithMissingVersion() { $composeFile = <<< 'EOT' services: diff --git a/tests/Util/MakerFileLinkFormatterTest.php b/tests/Util/MakerFileLinkFormatterTest.php index 8819511bd..9ed58afad 100644 --- a/tests/Util/MakerFileLinkFormatterTest.php +++ b/tests/Util/MakerFileLinkFormatterTest.php @@ -32,7 +32,7 @@ public function provideMakeLinkedPath(): \Generator /** * @dataProvider provideMakeLinkedPath */ - public function testMakeLinkedPath(bool $withFileLinkFormatter, bool $linkFormatterReturnsLink, string $expectedOutput): void + public function testMakeLinkedPath(bool $withFileLinkFormatter, bool $linkFormatterReturnsLink, string $expectedOutput) { if (getenv('MAKER_DISABLE_FILE_LINKS')) { $this->markTestSkipped(); diff --git a/tests/Util/PhpCompatUtilTest.php b/tests/Util/PhpCompatUtilTest.php index 592ead565..0cab99ca3 100644 --- a/tests/Util/PhpCompatUtilTest.php +++ b/tests/Util/PhpCompatUtilTest.php @@ -21,7 +21,7 @@ */ class PhpCompatUtilTest extends TestCase { - public function testFallBackToPhpVersionWithoutLockFile(): void + public function testFallBackToPhpVersionWithoutLockFile() { $mockFileManager = $this->createMock(FileManager::class); $mockFileManager @@ -49,7 +49,7 @@ public function testFallBackToPhpVersionWithoutLockFile(): void self::assertSame(\PHP_VERSION, $result); } - public function testWithoutPlatformVersionSet(): void + public function testWithoutPlatformVersionSet() { $mockFileManager = $this->mockFileManager('{"platform-overrides": {}}'); diff --git a/tests/Util/TemplateComponentGeneratorTest.php b/tests/Util/TemplateComponentGeneratorTest.php index a61bb6bd2..8596df92d 100644 --- a/tests/Util/TemplateComponentGeneratorTest.php +++ b/tests/Util/TemplateComponentGeneratorTest.php @@ -21,7 +21,7 @@ */ class TemplateComponentGeneratorTest extends TestCase { - public function testRouteAttributes(): void + public function testRouteAttributes() { $generator = new TemplateComponentGenerator(false, false, 'App'); @@ -33,7 +33,7 @@ public function testRouteAttributes(): void /** * @dataProvider routeMethodDataProvider */ - public function testRouteMethods(string $expected, array $methods): void + public function testRouteMethods(string $expected, array $methods) { $generator = new TemplateComponentGenerator(false, false, 'App'); @@ -53,7 +53,7 @@ public function routeMethodDataProvider(): \Generator /** * @dataProvider routeIndentationDataProvider */ - public function testRouteIndentation(string $expected): void + public function testRouteIndentation(string $expected) { $generator = new TemplateComponentGenerator(false, false, 'App'); @@ -73,7 +73,7 @@ public function routeIndentationDataProvider(): \Generator /** * @dataProvider routeTrailingNewLineDataProvider */ - public function testRouteTrailingNewLine(string $expected): void + public function testRouteTrailingNewLine(string $expected) { $generator = new TemplateComponentGenerator(false, false, 'App'); @@ -94,7 +94,7 @@ public function routeTrailingNewLineDataProvider(): \Generator /** * @dataProvider finalClassDataProvider */ - public function testGetFinalClassDeclaration(bool $finalClass, bool $finalEntity, bool $isEntity, string $expectedResult): void + public function testGetFinalClassDeclaration(bool $finalClass, bool $finalEntity, bool $isEntity, string $expectedResult) { $generator = new TemplateComponentGenerator($finalClass, $finalEntity, 'App'); @@ -117,7 +117,7 @@ public function finalClassDataProvider(): \Generator yield 'Final Entity w/ Class' => [true, true, true, 'final ']; } - public function testConfiguresClassDataWithRootNamespace(): void + public function testConfiguresClassDataWithRootNamespace() { $generator = new TemplateComponentGenerator(false, false, 'MakerTest'); diff --git a/tests/Util/TemplateLinterTest.php b/tests/Util/TemplateLinterTest.php index aca250c4f..11e8cc5b9 100644 --- a/tests/Util/TemplateLinterTest.php +++ b/tests/Util/TemplateLinterTest.php @@ -24,21 +24,21 @@ */ final class TemplateLinterTest extends TestCase { - public function testExceptionBinaryPathDoesntExist(): void + public function testExceptionBinaryPathDoesntExist() { $this->expectExceptionMessage('The MAKER_PHP_CS_FIXER_BINARY_PATH provided: /some/bad/path does not exist.'); new TemplateLinter(phpCsFixerBinaryPath: '/some/bad/path'); } - public function testExceptionThrownIfConfigPathDoesntExist(): void + public function testExceptionThrownIfConfigPathDoesntExist() { $this->expectExceptionMessage('The MAKER_PHP_CS_FIXER_CONFIG_PATH provided: /bad/config/path does not exist.'); new TemplateLinter(phpCsFixerConfigPath: '/bad/config/path'); } - public function testPhpCsFixerVersion(): void + public function testPhpCsFixerVersion() { $this->markTestSkippedOnWindows(); diff --git a/tests/Util/UseStatementGeneratorTest.php b/tests/Util/UseStatementGeneratorTest.php index 392280d57..bb1d11faf 100644 --- a/tests/Util/UseStatementGeneratorTest.php +++ b/tests/Util/UseStatementGeneratorTest.php @@ -20,7 +20,7 @@ */ class UseStatementGeneratorTest extends TestCase { - public function testUseStatements(): void + public function testUseStatements() { $unsorted = new UseStatementGenerator([ Sorter::class, @@ -39,7 +39,7 @@ public function testUseStatements(): void self::assertSame($expected, (string) $unsorted); } - public function testComplexStatements(): void + public function testComplexStatements() { $unsorted = new UseStatementGenerator([ \Symfony\Bundle\FrameworkBundle\Controller\AbstractController::class, @@ -74,7 +74,7 @@ public function testComplexStatements(): void self::assertSame($expected, (string) $unsorted); } - public function testUseStatementsWithAliases(): void + public function testUseStatementsWithAliases() { $unsorted = new UseStatementGenerator([ \Symfony\UX\Turbo\Attribute\Broadcast::class, @@ -91,7 +91,7 @@ public function testUseStatementsWithAliases(): void self::assertSame($expected, (string) $unsorted); } - public function testUseStatementsWithDuplicates(): void + public function testUseStatementsWithDuplicates() { $unsorted = new UseStatementGenerator([ \Symfony\UX\Turbo\Attribute\Broadcast::class, diff --git a/tests/fixtures/make-registration-form/tests/it_generates_registration_with_entity_and_authenticator.php b/tests/fixtures/make-registration-form/tests/it_generates_registration_with_entity_and_authenticator.php index 1e23dd893..0b5eccec8 100644 --- a/tests/fixtures/make-registration-form/tests/it_generates_registration_with_entity_and_authenticator.php +++ b/tests/fixtures/make-registration-form/tests/it_generates_registration_with_entity_and_authenticator.php @@ -69,7 +69,7 @@ public function testRegistrationValidationError() ); } - public function testVerifiedPropertyNotAddedToUserEntity(): void + public function testVerifiedPropertyNotAddedToUserEntity() { self::assertFalse(method_exists(User::class, 'isVerified')); self::assertFalse(property_exists(User::class, 'verified')); diff --git a/tests/fixtures/make-reset-password/tests/it_generates_with_normal_setup.php b/tests/fixtures/make-reset-password/tests/it_generates_with_normal_setup.php index f4ccc3473..1687797a6 100644 --- a/tests/fixtures/make-reset-password/tests/it_generates_with_normal_setup.php +++ b/tests/fixtures/make-reset-password/tests/it_generates_with_normal_setup.php @@ -6,7 +6,7 @@ class ResetPasswordFunctionalTest extends WebTestCase { - public function testResetRequestRoute(): void + public function testResetRequestRoute() { $client = static::createClient(); $client->request('GET', '/reset-password'); @@ -14,7 +14,7 @@ public function testResetRequestRoute(): void self::assertSame(200, $client->getResponse()->getStatusCode()); } - public function testResetRequestRouteDeniesInvalidToken(): void + public function testResetRequestRouteDeniesInvalidToken() { $client = static::createClient(); $client->request('GET', '/reset-password/reset/badToken1234'); @@ -22,7 +22,7 @@ public function testResetRequestRouteDeniesInvalidToken(): void self::assertSame(302, $client->getResponse()->getStatusCode()); } - public function testCheckEmailPageIsAlwaysAccessible(): void + public function testCheckEmailPageIsAlwaysAccessible() { $client = static::createClient(); $client->request('GET', '/reset-password/check-email'); diff --git a/tests/fixtures/security/make-form-login/LoginTest.php b/tests/fixtures/security/make-form-login/LoginTest.php index beeae4ac8..fd7ceda22 100644 --- a/tests/fixtures/security/make-form-login/LoginTest.php +++ b/tests/fixtures/security/make-form-login/LoginTest.php @@ -8,7 +8,7 @@ class LoginTest extends WebTestCase { - public function testLogin(): void + public function testLogin() { $client = static::createClient(); $crawler = $client->request('GET', '/login');