mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
DX: rector apply rules 'symfony up to 4.4
This commit is contained in:
@@ -34,7 +34,7 @@ class AzureGrantAdminConsentAndAcquireToken extends Command
|
||||
parent::__construct('chill:calendar:msgraph-grant-admin-consent');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
/** @var FormatterHelper $formatter */
|
||||
$formatter = $this->getHelper('formatter');
|
||||
|
@@ -35,7 +35,7 @@ class SendShortMessageOnEligibleCalendar extends Command
|
||||
return 'chill:calendar:send-short-messages';
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$this->messageSender->sendBulkMessageToEligibleCalendars();
|
||||
|
||||
|
@@ -33,7 +33,7 @@ use UnexpectedValueException;
|
||||
|
||||
class CalendarDocController
|
||||
{
|
||||
public function __construct(private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly EngineInterface $engine, private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly Security $security, private readonly UrlGeneratorInterface $urlGenerator)
|
||||
public function __construct(private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly \Twig\Environment $engine, private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly Security $security, private readonly UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -57,7 +57,7 @@ class RemoteEventConverter
|
||||
private readonly DateTimeZone $remoteDateTimeZone;
|
||||
|
||||
public function __construct(
|
||||
private readonly EngineInterface $engine,
|
||||
private readonly \Twig\Environment $engine,
|
||||
private readonly LocationConverter $locationConverter,
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly PersonRenderInterface $personRender,
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Component\Templating\EngineInterface;
|
||||
|
||||
class DefaultShortMessageForCalendarBuilder implements ShortMessageForCalendarBuilderInterface
|
||||
{
|
||||
public function __construct(private readonly EngineInterface $engine)
|
||||
public function __construct(private readonly \Twig\Environment $engine)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -61,7 +61,7 @@ final class AddressConverterTest extends TestCase
|
||||
|
||||
private function buildAddressConverter(): AddressConverter
|
||||
{
|
||||
$engine = $this->prophesize(EngineInterface::class);
|
||||
$engine = $this->prophesize(\Twig\Environment::class);
|
||||
$translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class);
|
||||
$translatableStringHelper->localize(Argument::type('array'))->will(static fn ($args): string => ($args[0] ?? ['fr' => 'not provided'])['fr'] ?? 'not provided');
|
||||
|
||||
|
@@ -64,7 +64,7 @@ final class DefaultShortMessageForCalendarBuilderTest extends TestCase
|
||||
->setMobilenumber($this->phoneNumberUtil->parse('+32470123456', 'BE'))
|
||||
->setAcceptSMS(false);
|
||||
|
||||
$engine = $this->prophesize(EngineInterface::class);
|
||||
$engine = $this->prophesize(\Twig\Environment::class);
|
||||
$engine->render(Argument::exact('@ChillCalendar/CalendarShortMessage/short_message.txt.twig'), Argument::withKey('calendar'))
|
||||
->willReturn('message content')
|
||||
->shouldBeCalledTimes(1);
|
||||
|
Reference in New Issue
Block a user