Skip to content

Commit

Permalink
[Rector] Applied all Symfony 5.x rectors to the production codebase (#70
Browse files Browse the repository at this point in the history
)

Applied rules:
 * AddReturnTypeDeclarationBasedOnParentClassMethodRector
 * AddReturnTypeDeclarationRector
 * CommandConstantReturnCodeRector
  • Loading branch information
alongosz committed Aug 9, 2024
1 parent ba5e369 commit f715567
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/bundle/Command/GeneratePlatformSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Configuration implements ConfigurationInterface
/**
* {@inheritdoc}
*/
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
return new TreeBuilder(IbexaGraphQLExtension::EXTENSION_NAME);
}
Expand Down
3 changes: 2 additions & 1 deletion src/bundle/IbexaGraphQLBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -24,7 +25,7 @@ public function build(ContainerBuilder $container)
$container->addCompilerPass(new Compiler\SchemaDomainIteratorsPass());
}

public function getContainerExtension()
public function getContainerExtension(): ?ExtensionInterface
{
return new IbexaGraphQLExtension();
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Value/ContentFieldValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __get($property)
return parent::__get($property);
}

public function __toString()
public function __toString(): string
{
return (string)$this->value;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Value/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __get($property)
return parent::__get($property);
}

public function __toString()
public function __toString(): string
{
return (string)$this->value;
}
Expand Down

0 comments on commit f715567

Please sign in to comment.