Skip to content

Commit 678cfa9

Browse files
committed
add method return types for symfony 6 support
1 parent 775e847 commit 678cfa9

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

src/Command/ResetPasswordRemoveExpiredCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected function configure(): void
4444
*
4545
* @psalm-suppress InvalidReturnType
4646
*/
47-
protected function execute(InputInterface $input, OutputInterface $output)
47+
protected function execute(InputInterface $input, OutputInterface $output): int
4848
{
4949
$output->writeln('Removing expired reset password requests...');
5050

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
final class Configuration implements ConfigurationInterface
2121
{
22-
public function getConfigTreeBuilder()
22+
public function getConfigTreeBuilder(): TreeBuilder
2323
{
2424
$treeBuilder = new TreeBuilder('symfonycasts_reset_password');
2525
/** @var ArrayNodeDefinition $rootNode */

src/DependencyInjection/SymfonyCastsResetPasswordExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
final class SymfonyCastsResetPasswordExtension extends Extension
2323
{
24-
public function load(array $configs, ContainerBuilder $container)
24+
public function load(array $configs, ContainerBuilder $container): void
2525
{
2626
$loader = new XmlFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config'));
2727
$loader->load('reset_password_services.xml');
@@ -40,7 +40,7 @@ public function load(array $configs, ContainerBuilder $container)
4040
$cleanerDefinition->replaceArgument(1, $config['enable_garbage_collection']);
4141
}
4242

43-
public function getAlias()
43+
public function getAlias(): string
4444
{
4545
return 'symfonycasts_reset_password';
4646
}

src/SymfonyCastsResetPasswordBundle.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace SymfonyCasts\Bundle\ResetPassword;
1111

12+
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
1213
use Symfony\Component\HttpKernel\Bundle\Bundle;
1314
use SymfonyCasts\Bundle\ResetPassword\DependencyInjection\SymfonyCastsResetPasswordExtension;
1415

@@ -18,7 +19,7 @@
1819
*/
1920
class SymfonyCastsResetPasswordBundle extends Bundle
2021
{
21-
public function getContainerExtension()
22+
public function getContainerExtension(): ?ExtensionInterface
2223
{
2324
if (null === $this->extension) {
2425
$this->extension = new SymfonyCastsResetPasswordExtension();

tests/ResetPasswordTestKernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,12 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
131131
return $routes;
132132
}
133133

134-
public function getCacheDir()
134+
public function getCacheDir(): string
135135
{
136136
return sys_get_temp_dir().'/cache'.spl_object_hash($this);
137137
}
138138

139-
public function getLogDir()
139+
public function getLogDir(): string
140140
{
141141
return sys_get_temp_dir().'/logs'.spl_object_hash($this);
142142
}

0 commit comments

Comments
 (0)