Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Change void return declarations commands to be integer returns
Browse files Browse the repository at this point in the history
Calling these commands would throw a FatalErrorException: Compile Error:
A void function must not return a value

Since symfony commands require a proper exit code to be returned this
should be an integer return type
  • Loading branch information
konetchy authored and greg0ire committed Jan 28, 2020
1 parent c0ee583 commit 5a6d348
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Command/CacheFlushAllCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function configure(): void
);
}

public function execute(InputInterface $input, OutputInterface $output): void
public function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln('<info>Clearing cache information.</info>');

Expand Down
2 changes: 1 addition & 1 deletion src/Command/CacheFlushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function configure(): void
/**
* @throws \RuntimeException
*/
public function execute(InputInterface $input, OutputInterface $output): void
public function execute(InputInterface $input, OutputInterface $output): int
{
$keys = @json_decode($input->getOption('keys'), true);

Expand Down

0 comments on commit 5a6d348

Please sign in to comment.