Skip to content

Commit

Permalink
Merge pull request #183 from jrushlow/feature/symfony6-method-signatures
Browse files Browse the repository at this point in the history
add method return types for symfony 6 support
  • Loading branch information
jrushlow authored Aug 31, 2021
2 parents 775e847 + 678cfa9 commit 003027d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Command/ResetPasswordRemoveExpiredCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function configure(): void
*
* @psalm-suppress InvalidReturnType
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('Removing expired reset password requests...');

Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
final class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('symfonycasts_reset_password');
/** @var ArrayNodeDefinition $rootNode */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
final class SymfonyCastsResetPasswordExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new XmlFileLoader($container, new FileLocator(\dirname(__DIR__).'/Resources/config'));
$loader->load('reset_password_services.xml');
Expand All @@ -40,7 +40,7 @@ public function load(array $configs, ContainerBuilder $container)
$cleanerDefinition->replaceArgument(1, $config['enable_garbage_collection']);
}

public function getAlias()
public function getAlias(): string
{
return 'symfonycasts_reset_password';
}
Expand Down
3 changes: 2 additions & 1 deletion src/SymfonyCastsResetPasswordBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace SymfonyCasts\Bundle\ResetPassword;

use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use SymfonyCasts\Bundle\ResetPassword\DependencyInjection\SymfonyCastsResetPasswordExtension;

Expand All @@ -18,7 +19,7 @@
*/
class SymfonyCastsResetPasswordBundle extends Bundle
{
public function getContainerExtension()
public function getContainerExtension(): ?ExtensionInterface
{
if (null === $this->extension) {
$this->extension = new SymfonyCastsResetPasswordExtension();
Expand Down
4 changes: 2 additions & 2 deletions tests/ResetPasswordTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ public function loadRoutes(LoaderInterface $loader): RouteCollection
return $routes;
}

public function getCacheDir()
public function getCacheDir(): string
{
return sys_get_temp_dir().'/cache'.spl_object_hash($this);
}

public function getLogDir()
public function getLogDir(): string
{
return sys_get_temp_dir().'/logs'.spl_object_hash($this);
}
Expand Down

0 comments on commit 003027d

Please sign in to comment.