DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -33,40 +33,8 @@ use function count;
final class CalendarContext implements CalendarContextInterface
{
private BaseContextData $baseContextData;
private EntityManagerInterface $entityManager;
private NormalizerInterface $normalizer;
private PersonRender $personRender;
private PersonRepository $personRepository;
private ThirdPartyRepository $thirdPartyRepository;
private ThirdPartyRender $thirdPartyRender;
private TranslatableStringHelperInterface $translatableStringHelper;
public function __construct(
BaseContextData $baseContextData,
EntityManagerInterface $entityManager,
NormalizerInterface $normalizer,
PersonRender $personRender,
PersonRepository $personRepository,
ThirdPartyRender $thirdPartyRender,
ThirdPartyRepository $thirdPartyRepository,
TranslatableStringHelperInterface $translatableStringHelper
) {
$this->baseContextData = $baseContextData;
$this->entityManager = $entityManager;
$this->normalizer = $normalizer;
$this->personRender = $personRender;
$this->personRepository = $personRepository;
$this->thirdPartyRender = $thirdPartyRender;
$this->thirdPartyRepository = $thirdPartyRepository;
$this->translatableStringHelper = $translatableStringHelper;
public function __construct(private BaseContextData $baseContextData, private EntityManagerInterface $entityManager, private NormalizerInterface $normalizer, private PersonRender $personRender, private PersonRepository $personRepository, private ThirdPartyRender $thirdPartyRender, private ThirdPartyRepository $thirdPartyRepository, private TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function adminFormReverseTransform(array $data): array

View File

@@ -26,23 +26,8 @@ use Symfony\Component\Messenger\MessageBusInterface;
class BulkCalendarShortMessageSender
{
private EntityManagerInterface $em;
private LoggerInterface $logger;
private MessageBusInterface $messageBus;
private ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder;
private CalendarForShortMessageProvider $provider;
public function __construct(CalendarForShortMessageProvider $provider, EntityManagerInterface $em, LoggerInterface $logger, MessageBusInterface $messageBus, ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder)
public function __construct(private CalendarForShortMessageProvider $provider, private EntityManagerInterface $em, private LoggerInterface $logger, private MessageBusInterface $messageBus, private ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder)
{
$this->provider = $provider;
$this->em = $em;
$this->logger = $logger;
$this->messageBus = $messageBus;
$this->messageForCalendarBuilder = $messageForCalendarBuilder;
}
public function sendBulkMessageToEligibleCalendars()

View File

@@ -26,20 +26,8 @@ use function count;
class CalendarForShortMessageProvider
{
private CalendarRepository $calendarRepository;
private EntityManagerInterface $em;
private RangeGeneratorInterface $rangeGenerator;
public function __construct(
CalendarRepository $calendarRepository,
EntityManagerInterface $em,
RangeGeneratorInterface $rangeGenerator
) {
$this->calendarRepository = $calendarRepository;
$this->em = $em;
$this->rangeGenerator = $rangeGenerator;
public function __construct(private CalendarRepository $calendarRepository, private EntityManagerInterface $em, private RangeGeneratorInterface $rangeGenerator)
{
}
/**

View File

@@ -24,12 +24,8 @@ use Symfony\Component\Templating\EngineInterface;
class DefaultShortMessageForCalendarBuilder implements ShortMessageForCalendarBuilderInterface
{
private EngineInterface $engine;
public function __construct(
EngineInterface $engine
) {
$this->engine = $engine;
public function __construct(private EngineInterface $engine)
{
}
public function buildMessageForCalendar(Calendar $calendar): array