From f715567c1dbd693f790cdf6dc8a457ee2c87d9a8 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 9 Aug 2024 13:38:47 +0200 Subject: [PATCH] [Rector] Applied all Symfony 5.x rectors to the production codebase (#70) Applied rules: * AddReturnTypeDeclarationBasedOnParentClassMethodRector * AddReturnTypeDeclarationRector * CommandConstantReturnCodeRector --- src/bundle/Command/GeneratePlatformSchemaCommand.php | 2 +- src/bundle/DependencyInjection/Configuration.php | 2 +- src/bundle/IbexaGraphQLBundle.php | 3 ++- src/lib/Value/ContentFieldValue.php | 2 +- src/lib/Value/Field.php | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bundle/Command/GeneratePlatformSchemaCommand.php b/src/bundle/Command/GeneratePlatformSchemaCommand.php index 8e786e7..2c16c3b 100644 --- a/src/bundle/Command/GeneratePlatformSchemaCommand.php +++ b/src/bundle/Command/GeneratePlatformSchemaCommand.php @@ -89,7 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $output->writeln(''); $this->compileTypes($output); - return 0; + return Command::SUCCESS; } private function compileTypes(OutputInterface $output) diff --git a/src/bundle/DependencyInjection/Configuration.php b/src/bundle/DependencyInjection/Configuration.php index 5998040..31b29c1 100644 --- a/src/bundle/DependencyInjection/Configuration.php +++ b/src/bundle/DependencyInjection/Configuration.php @@ -20,7 +20,7 @@ class Configuration implements ConfigurationInterface /** * {@inheritdoc} */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { return new TreeBuilder(IbexaGraphQLExtension::EXTENSION_NAME); } diff --git a/src/bundle/IbexaGraphQLBundle.php b/src/bundle/IbexaGraphQLBundle.php index 12a8e2a..d3dda40 100644 --- a/src/bundle/IbexaGraphQLBundle.php +++ b/src/bundle/IbexaGraphQLBundle.php @@ -10,6 +10,7 @@ use Ibexa\Bundle\GraphQL\DependencyInjection\Compiler; use Ibexa\Bundle\GraphQL\DependencyInjection\IbexaGraphQLExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; class IbexaGraphQLBundle extends Bundle @@ -24,7 +25,7 @@ public function build(ContainerBuilder $container) $container->addCompilerPass(new Compiler\SchemaDomainIteratorsPass()); } - public function getContainerExtension() + public function getContainerExtension(): ?ExtensionInterface { return new IbexaGraphQLExtension(); } diff --git a/src/lib/Value/ContentFieldValue.php b/src/lib/Value/ContentFieldValue.php index 50f9317..77fb146 100644 --- a/src/lib/Value/ContentFieldValue.php +++ b/src/lib/Value/ContentFieldValue.php @@ -50,7 +50,7 @@ public function __get($property) return parent::__get($property); } - public function __toString() + public function __toString(): string { return (string)$this->value; } diff --git a/src/lib/Value/Field.php b/src/lib/Value/Field.php index 0095bc9..f7d771e 100644 --- a/src/lib/Value/Field.php +++ b/src/lib/Value/Field.php @@ -23,7 +23,7 @@ public function __get($property) return parent::__get($property); } - public function __toString() + public function __toString(): string { return (string)$this->value; }