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

@@ -56,7 +56,7 @@ class AzureGrantAdminConsentAndAcquireToken extends Command
$messages = ['No problem, we will wait for you', 'Grant access and come back here'];
$output->writeln($formatter->formatBlock($messages, 'warning'));
return 0;
return Command::SUCCESS;
}
$token = $this->machineTokenStorage->getToken();
@@ -69,6 +69,6 @@ class AzureGrantAdminConsentAndAcquireToken extends Command
$output->writeln('Expires at: '.$token->getExpires());
$output->writeln('To inspect the token content, go to https://jwt.ms/#access_token='.urlencode($token->getToken()));
return 0;
return Command::SUCCESS;
}
}

View File

@@ -32,6 +32,8 @@ use Symfony\Component\Console\Output\OutputInterface;
final class MapAndSubscribeUserCalendarCommand extends Command
{
protected static $defaultDescription = 'MSGraph: collect user metadata and create subscription on events for users, and sync the user absence-presence';
public function __construct(
private readonly EntityManagerInterface $em,
private readonly EventsOnUserSubscriptionCreator $eventsOnUserSubscriptionCreator,
@@ -154,7 +156,7 @@ final class MapAndSubscribeUserCalendarCommand extends Command
$output->writeln('users synchronized');
return 0;
return Command::SUCCESS;
}
protected function configure()
@@ -162,7 +164,6 @@ final class MapAndSubscribeUserCalendarCommand extends Command
parent::configure();
$this
->setDescription('MSGraph: collect user metadata and create subscription on events for users, and sync the user absence-presence')
->addOption(
'renew-before-end-interval',
'r',

View File

@@ -34,6 +34,6 @@ class SendShortMessageOnEligibleCalendar extends Command
{
$this->messageSender->sendBulkMessageToEligibleCalendars();
return 0;
return Command::SUCCESS;
}
}

View File

@@ -39,6 +39,8 @@ use Symfony\Component\Console\Question\Question;
class SendTestShortMessageOnCalendarCommand extends Command
{
protected static $defaultDescription = 'Test sending a SMS for a dummy calendar appointment';
public function __construct(
private readonly PersonRepository $personRepository,
private readonly PhoneNumberUtil $phoneNumberUtil,
@@ -50,10 +52,7 @@ class SendTestShortMessageOnCalendarCommand extends Command
parent::__construct('chill:calendar:test-send-short-message');
}
protected function configure()
{
$this->setDescription('Test sending a SMS for a dummy calendar appointment');
}
protected function configure() {}
protected function execute(InputInterface $input, OutputInterface $output): int
{
@@ -174,6 +173,6 @@ class SendTestShortMessageOnCalendarCommand extends Command
}
}
return 0;
return Command::SUCCESS;
}
}