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

@@ -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');

View File

@@ -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();

View File

@@ -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)
{
}

View File

@@ -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,

View File

@@ -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)
{
}

View File

@@ -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');

View File

@@ -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);