DX: rector apply rules 'symfony up to 4.4

This commit is contained in:
2023-05-05 18:21:09 +02:00
parent f04ef9c931
commit efaa01f4f6
45 changed files with 75 additions and 74 deletions

View File

@@ -198,7 +198,7 @@ class ChillImportUsersCommand extends Command
return false;
}
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->tempOutput = $output;
$this->tempInput = $input;
@@ -218,6 +218,7 @@ class ChillImportUsersCommand extends Command
} catch (Exception $e) {
throw $e;
}
return 0;
}
/**

View File

@@ -101,7 +101,7 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
->addOption('subject', null, InputOption::VALUE_REQUIRED, 'Subject of the email', 'Recover your password');
}
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->input = $input;
$this->output = $output;
@@ -119,6 +119,7 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
$this->sendRecoverCode($user);
}
return 0;
}
/**

View File

@@ -34,7 +34,7 @@ class ExecuteCronJobCommand extends Command
->addUsage('');
}
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if ([] === $input->getArgument('job')) {
$this->cronManager->run();

View File

@@ -80,7 +80,7 @@ class LoadAndUpdateLanguagesCommand extends Command
*
* @see \Symfony\Component\Console\Command\Command::execute()
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$em = $this->entityManager;
$chillAvailableLanguages = $this->availableLanguages;
@@ -130,5 +130,6 @@ class LoadAndUpdateLanguagesCommand extends Command
}
$em->flush();
return 0;
}
}

View File

@@ -73,7 +73,7 @@ class LoadCountriesCommand extends Command
*
* @see \Symfony\Component\Console\Command\Command::execute()
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$countries = static::prepareCountryList($this->availableLanguages);
$em = $this->entityManager;
@@ -90,5 +90,6 @@ class LoadCountriesCommand extends Command
}
$em->flush();
return 0;
}
}

View File

@@ -72,7 +72,7 @@ class LoadPostalCodesCommand extends Command
);
}
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$csv = $this->getCSVResource($input);
@@ -105,6 +105,7 @@ class LoadPostalCodesCommand extends Command
$this->entityManager->flush();
$output->writeln('<info>' . $num . ' were added !</info>');
return 0;
}
private function addPostalCode($row, OutputInterface $output)

View File

@@ -63,7 +63,7 @@ class SetPasswordCommand extends Command
->addArgument('password', InputArgument::OPTIONAL, 'the new password');
}
public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$user = $this->_getUser($input->getArgument('username'));
@@ -81,5 +81,6 @@ class SetPasswordCommand extends Command
}
$this->_setPassword($user, $password);
return 0;
}
}