Apply rector rules: symfony up to 54

This commit is contained in:
2024-04-04 23:30:25 +02:00
parent 1ee3b9e2f0
commit 579bd829f8
204 changed files with 974 additions and 2346 deletions

View File

@@ -19,6 +19,8 @@ use Symfony\Component\Console\Output\OutputInterface;
class ExecuteCronJobCommand extends Command
{
protected static $defaultDescription = 'Execute the cronjob(s) given as argument, or one cronjob scheduled by system.';
public function __construct(
private readonly CronManagerInterface $cronManager
) {
@@ -28,7 +30,6 @@ class ExecuteCronJobCommand extends Command
protected function configure()
{
$this
->setDescription('Execute the cronjob(s) given as argument, or one cronjob scheduled by system.')
->setHelp("If no job is specified, the next available cronjob will be executed by system.\nThis command should be execute every 15 minutes (more or less)")
->addArgument('job', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, 'one or more job to force execute (by default, all jobs are executed)', [])
->addUsage('');
@@ -39,13 +40,13 @@ class ExecuteCronJobCommand extends Command
if ([] === $input->getArgument('job')) {
$this->cronManager->run();
return 0;
return Command::SUCCESS;
}
foreach ($input->getArgument('job') as $jobName) {
$this->cronManager->run($jobName);
}
return 0;
return Command::SUCCESS;
}
}