Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -21,6 +21,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:person:move')]
final class ChillPersonMoveCommand extends Command
{
protected static $defaultDescription = 'Move all the associated entities on a "from" person to a "to" person and remove the old person';
@@ -51,10 +52,9 @@ final class ChillPersonMoveCommand extends Command
return $ctxt;
}
protected function configure()
protected function configure(): void
{
$this
->setName('chill:person:move')
->addOption('from', 'f', InputOption::VALUE_REQUIRED, 'The person id to delete, all associated data will be moved before')
->addOption('to', 't', InputOption::VALUE_REQUIRED, 'The person id which will received data')
->addOption('dump-sql', null, InputOption::VALUE_NONE, 'dump sql to stdout')
@@ -103,7 +103,7 @@ final class ChillPersonMoveCommand extends Command
return Command::SUCCESS;
}
protected function interact(InputInterface $input, OutputInterface $output)
protected function interact(InputInterface $input, OutputInterface $output): void
{
if (false === $input->hasOption('dump-sql') && false === $input->hasOption('force')) {
$msg = 'You must use "--dump-sql" or "--force"';

View File

@@ -19,6 +19,7 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:person:import-socialwork')]
final class ImportSocialWorkMetadata extends Command
{
protected EntityManagerInterface $em;
@@ -29,7 +30,7 @@ final class ImportSocialWorkMetadata extends Command
parent::__construct('chill:person:import-socialwork');
}
protected function configure()
protected function configure(): void
{
$description = 'Imports a structured table containing social issues, social actions, objectives, results and evaluations.';
$help = 'File to csv format, no headers, semi-colon as delimiter, datas sorted by alphabetical order, column after column.'.PHP_EOL
@@ -38,7 +39,6 @@ final class ImportSocialWorkMetadata extends Command
.'See social_work_metadata.csv as example.'.PHP_EOL;
$this
->setName('chill:person:import-socialwork')
->addOption('filepath', 'f', InputOption::VALUE_REQUIRED, 'The file to import.')
->addOption('language', 'l', InputOption::VALUE_OPTIONAL, 'The default language')
->setHelp($help);

View File

@@ -18,6 +18,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
#[\Symfony\Component\Console\Attribute\AsCommand]
class RemoveOldDraftAccompanyingPeriodCommand extends Command
{
protected static $defaultDescription = 'Remove draft accompanying period which are still draft and unused';