diff --git a/src/Resources/skeleton/doctrine/Fixtures.tpl.php b/src/Resources/skeleton/doctrine/Fixtures.tpl.php index b0b52e42b..a77ecff77 100644 --- a/src/Resources/skeleton/doctrine/Fixtures.tpl.php +++ b/src/Resources/skeleton/doctrine/Fixtures.tpl.php @@ -7,7 +7,7 @@ class extends Fixture { - public function load(ObjectManager $manager) + public function load(ObjectManager $manager): void { // $product = new Product(); // $manager->persist($product); diff --git a/src/Resources/skeleton/form/Type.tpl.php b/src/Resources/skeleton/form/Type.tpl.php index 8d2e03399..9aea447dc 100644 --- a/src/Resources/skeleton/form/Type.tpl.php +++ b/src/Resources/skeleton/form/Type.tpl.php @@ -17,7 +17,7 @@ class extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options) + public function buildForm(FormBuilderInterface $builder, array $options): void { $builder $typeOptions): ?> @@ -34,7 +34,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ diff --git a/src/Security/SecurityControllerBuilder.php b/src/Security/SecurityControllerBuilder.php index 69410fe11..99be648fc 100644 --- a/src/Security/SecurityControllerBuilder.php +++ b/src/Security/SecurityControllerBuilder.php @@ -66,7 +66,7 @@ public function addLoginMethod(ClassSourceManipulator $manipulator): void public function addLogoutMethod(ClassSourceManipulator $manipulator): void { - $logoutMethodBuilder = $manipulator->createMethodBuilder('logout', null, false, ['@Route("/logout", name="app_logout")']); + $logoutMethodBuilder = $manipulator->createMethodBuilder('logout', 'void', false, ['@Route("/logout", name="app_logout")']); $manipulator->addUseStatementIfNecessary(Route::class); $manipulator->addMethodBody($logoutMethodBuilder, <<<'CODE' diff --git a/tests/Security/fixtures/expected/SecurityController_login_logout.php b/tests/Security/fixtures/expected/SecurityController_login_logout.php index ed5a595b7..65c096f8f 100644 --- a/tests/Security/fixtures/expected/SecurityController_login_logout.php +++ b/tests/Security/fixtures/expected/SecurityController_login_logout.php @@ -29,7 +29,7 @@ public function login(AuthenticationUtils $authenticationUtils): Response /** * @Route("/logout", name="app_logout") */ - public function logout() + public function logout(): void { throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); } diff --git a/tests/Security/fixtures/expected/SecurityController_logout.php b/tests/Security/fixtures/expected/SecurityController_logout.php index 8efa75143..037a1539b 100644 --- a/tests/Security/fixtures/expected/SecurityController_logout.php +++ b/tests/Security/fixtures/expected/SecurityController_logout.php @@ -10,7 +10,7 @@ class SecurityController extends AbstractController /** * @Route("/logout", name="app_logout") */ - public function logout() + public function logout(): void { throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.'); }