fixes after merge of master into upgrade-sf4

This commit is contained in:
2024-02-12 22:31:16 +01:00
parent 37af488f69
commit f889d67e94
664 changed files with 795 additions and 1980 deletions

View File

@@ -23,9 +23,7 @@ use Symfony\Component\Routing\Annotation\Route;
class CalendarAPIController extends ApiController
{
public function __construct(private readonly CalendarRepository $calendarRepository)
{
}
public function __construct(private readonly CalendarRepository $calendarRepository) {}
/**
* @Route("/api/1.0/calendar/calendar/by-user/{id}.{_format}",

View File

@@ -35,8 +35,7 @@ final readonly class CalendarDocController
private FormFactoryInterface $formFactory,
private Security $security,
private UrlGeneratorInterface $urlGenerator,
) {
}
) {}
/**
* @Route("/{_locale}/calendar/calendar-doc/{id}/new", name="chill_calendar_calendardoc_new")

View File

@@ -23,9 +23,7 @@ use Symfony\Component\Routing\Annotation\Route;
class CalendarRangeAPIController extends ApiController
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository)
{
}
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository) {}
/**
* @Route("/api/1.0/calendar/calendar-range-available/{id}.{_format}",

View File

@@ -34,9 +34,7 @@ use Symfony\Component\Security\Core\Security;
class InviteApiController
{
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly MessageBusInterface $messageBus, private readonly Security $security)
{
}
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly MessageBusInterface $messageBus, private readonly Security $security) {}
/**
* Give an answer to a calendar invite.

View File

@@ -30,9 +30,7 @@ use TheNetworg\OAuth2\Client\Token\AccessToken;
class RemoteCalendarConnectAzureController
{
public function __construct(private readonly ClientRegistry $clientRegistry, private readonly OnBehalfOfUserTokenStorage $MSGraphTokenStorage)
{
}
public function __construct(private readonly ClientRegistry $clientRegistry, private readonly OnBehalfOfUserTokenStorage $MSGraphTokenStorage) {}
/**
* @Route("/{_locale}/connect/azure", name="chill_calendar_remote_connect_azure")

View File

@@ -27,9 +27,7 @@ use Symfony\Component\Routing\Annotation\Route;
class RemoteCalendarMSGraphSyncController
{
public function __construct(private readonly MessageBusInterface $messageBus)
{
}
public function __construct(private readonly MessageBusInterface $messageBus) {}
/**
* @Route("/public/incoming-hook/calendar/msgraph/events/{userId}", name="chill_calendar_remote_msgraph_incoming_webhook_events",

View File

@@ -34,9 +34,7 @@ use Symfony\Component\Serializer\SerializerInterface;
*/
class RemoteCalendarProxyController
{
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly SerializerInterface $serializer)
{
}
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly SerializerInterface $serializer) {}
/**
* @Route("api/1.0/calendar/proxy/calendar/by-user/{id}/events")

View File

@@ -28,9 +28,7 @@ class LoadCalendarRange extends Fixture implements FixtureGroupInterface, Ordere
{
public static array $references = [];
public function __construct(private readonly UserRepository $userRepository)
{
}
public function __construct(private readonly UserRepository $userRepository) {}
public static function getGroups(): array
{

View File

@@ -17,9 +17,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
class ListenToActivityCreate
{
public function __construct(private readonly RequestStack $requestStack)
{
}
public function __construct(private readonly RequestStack $requestStack) {}
public function postPersist(Activity $activity, LifecycleEventArgs $event): void
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class AgentAggregator implements AggregatorInterface
{
public function __construct(private UserRepository $userRepository, private UserRender $userRender)
{
}
public function __construct(private UserRepository $userRepository, private UserRender $userRender) {}
public function addRole(): ?string
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class CancelReasonAggregator implements AggregatorInterface
{
public function __construct(private readonly CancelReasonRepository $cancelReasonRepository, private readonly TranslatableStringHelper $translatableStringHelper)
{
}
public function __construct(private readonly CancelReasonRepository $cancelReasonRepository, private readonly TranslatableStringHelper $translatableStringHelper) {}
public function addRole(): ?string
{

View File

@@ -27,8 +27,7 @@ final readonly class JobAggregator implements AggregatorInterface
public function __construct(
private UserJobRepository $jobRepository,
private TranslatableStringHelper $translatableStringHelper
) {
}
) {}
public function addRole(): ?string
{
@@ -66,9 +65,7 @@ final readonly class JobAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@@ -19,9 +19,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class LocationAggregator implements AggregatorInterface
{
public function __construct(private LocationRepository $locationRepository)
{
}
public function __construct(private LocationRepository $locationRepository) {}
public function addRole(): ?string
{

View File

@@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class LocationTypeAggregator implements AggregatorInterface
{
public function __construct(private LocationTypeRepository $locationTypeRepository, private TranslatableStringHelper $translatableStringHelper)
{
}
public function __construct(private LocationTypeRepository $locationTypeRepository, private TranslatableStringHelper $translatableStringHelper) {}
public function addRole(): ?string
{

View File

@@ -27,8 +27,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
public function __construct(
private ScopeRepository $scopeRepository,
private TranslatableStringHelper $translatableStringHelper
) {
}
) {}
public function addRole(): ?string
{
@@ -66,9 +65,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
return Declarations::CALENDAR_TYPE;
}
public function buildForm(FormBuilderInterface $builder)
{
}
public function buildForm(FormBuilderInterface $builder) {}
public function getFormDefaultData(): array
{

View File

@@ -26,9 +26,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class UrgencyAggregator implements AggregatorInterface
{
public function __construct(private readonly TranslatorInterface $translator)
{
}
public function __construct(private readonly TranslatorInterface $translator) {}
public function addRole(): ?string
{

View File

@@ -27,8 +27,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
{
public function __construct(
private readonly CalendarRepository $calendarRepository,
) {
}
) {}
public function buildForm(FormBuilderInterface $builder)
{

View File

@@ -24,9 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface
{
public function __construct(private readonly CalendarRepository $calendarRepository)
{
}
public function __construct(private readonly CalendarRepository $calendarRepository) {}
public function buildForm(FormBuilderInterface $builder): void
{

View File

@@ -24,9 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface
{
public function __construct(private readonly CalendarRepository $calendarRepository)
{
}
public function __construct(private readonly CalendarRepository $calendarRepository) {}
public function buildForm(FormBuilderInterface $builder): void
{

View File

@@ -22,9 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AgentFilter implements FilterInterface
{
public function __construct(private readonly UserRender $userRender)
{
}
public function __construct(private readonly UserRender $userRender) {}
public function addRole(): ?string
{

View File

@@ -21,9 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class BetweenDatesFilter implements FilterInterface
{
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter)
{
}
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {}
public function addRole(): ?string
{

View File

@@ -34,9 +34,7 @@ class CalendarRangeFilter implements FilterInterface
private const DEFAULT_CHOICE = 'false';
public function __construct(private readonly TranslatorInterface $translator)
{
}
public function __construct(private readonly TranslatorInterface $translator) {}
public function addRole(): ?string
{

View File

@@ -27,8 +27,7 @@ final readonly class JobFilter implements FilterInterface
public function __construct(
private TranslatableStringHelper $translatableStringHelper
) {
}
) {}
public function addRole(): ?string
{

View File

@@ -29,8 +29,7 @@ class ScopeFilter implements FilterInterface
public function __construct(
protected TranslatorInterface $translator,
private readonly TranslatableStringHelper $translatableStringHelper
) {
}
) {}
public function addRole(): ?string
{

View File

@@ -38,8 +38,7 @@ class CalendarType extends AbstractType
private readonly IdToLocationDataTransformer $idToLocationDataTransformer,
private readonly ThirdPartiesToIdDataTransformer $partiesToIdDataTransformer,
private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer
) {
}
) {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -19,9 +19,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, protected TranslatorInterface $translator)
{
}
public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -19,9 +19,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class PersonMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, protected TranslatorInterface $translator)
{
}
public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -18,9 +18,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class UserMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private readonly Security $security, public TranslatorInterface $translator)
{
}
public function __construct(private readonly Security $security, public TranslatorInterface $translator) {}
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{

View File

@@ -29,9 +29,7 @@ use Symfony\Component\Security\Core\Security;
class CalendarEntityListener
{
public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security)
{
}
public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security) {}
public function postPersist(Calendar $calendar, PostPersistEventArgs $args): void
{

View File

@@ -29,9 +29,7 @@ use Symfony\Component\Security\Core\Security;
class CalendarRangeEntityListener
{
public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security)
{
}
public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security) {}
public function postPersist(CalendarRange $calendarRange, PostPersistEventArgs $eventArgs): void
{

View File

@@ -31,9 +31,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*/
class CalendarRangeRemoveToRemoteHandler implements MessageHandlerInterface
{
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository)
{
}
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {}
public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage)
{

View File

@@ -32,9 +32,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*/
class CalendarRangeToRemoteHandler implements MessageHandlerInterface
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager)
{
}
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager) {}
public function __invoke(CalendarRangeMessage $calendarRangeMessage): void
{

View File

@@ -31,9 +31,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*/
class CalendarRemoveHandler implements MessageHandlerInterface
{
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository)
{
}
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {}
public function __invoke(CalendarRemovedMessage $message)
{

View File

@@ -37,9 +37,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*/
class CalendarToRemoteHandler implements MessageHandlerInterface
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository)
{
}
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {}
public function __invoke(CalendarMessage $calendarMessage)
{

View File

@@ -31,9 +31,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*/
class InviteUpdateHandler implements MessageHandlerInterface
{
public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector) {}
public function __invoke(InviteUpdateMessage $inviteUpdateMessage): void
{

View File

@@ -36,9 +36,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
*/
class MSGraphChangeNotificationHandler implements MessageHandlerInterface
{
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository)
{
}
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository) {}
public function __invoke(MSGraphChangeNotificationMessage $changeNotificationMessage): void
{

View File

@@ -20,9 +20,7 @@ namespace Chill\CalendarBundle\Messenger\Message;
class MSGraphChangeNotificationMessage
{
public function __construct(private readonly array $content, private readonly int $userId)
{
}
public function __construct(private readonly array $content, private readonly int $userId) {}
public function getContent(): array
{

View File

@@ -24,9 +24,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
class AddressConverter
{
public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function addressToRemote(Address $address): array
{

View File

@@ -28,9 +28,7 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
*/
class EventsOnUserSubscriptionCreator
{
public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator)
{
}
public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator) {}
/**
* @return array{secret: string, id: string, expiration: int}

View File

@@ -22,9 +22,7 @@ use Chill\MainBundle\Entity\Location;
class LocationConverter
{
public function __construct(private readonly AddressConverter $addressConverter)
{
}
public function __construct(private readonly AddressConverter $addressConverter) {}
public function locationToRemote(Location $location): array
{

View File

@@ -27,8 +27,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
private HttpClientInterface $machineHttpClient,
private MapCalendarToUser $mapCalendarToUser,
private ClockInterface $clock,
) {
}
) {}
/**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft

View File

@@ -21,8 +21,7 @@ readonly class MSUserAbsenceSync
private MSUserAbsenceReaderInterface $absenceReader,
private ClockInterface $clock,
private LoggerInterface $logger,
) {
}
) {}
public function syncUserAbsence(User $user): void
{

View File

@@ -29,9 +29,7 @@ class MachineTokenStorage
private ?AccessTokenInterface $accessToken = null;
public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis)
{
}
public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis) {}
public function getToken(): AccessTokenInterface
{

View File

@@ -36,9 +36,7 @@ class MapCalendarToUser
final public const SECRET_SUBSCRIPTION_EVENT = 'subscription_events_secret';
public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger)
{
}
public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger) {}
public function getActiveSubscriptionId(User $user): string
{

View File

@@ -29,9 +29,7 @@ class OnBehalfOfUserTokenStorage
{
final public const MS_GRAPH_ACCESS_TOKEN = 'msgraph_access_token';
public function __construct(private readonly Azure $azure, private readonly SessionInterface $session)
{
}
public function __construct(private readonly Azure $azure, private readonly SessionInterface $session) {}
public function getToken(): AccessToken
{

View File

@@ -32,9 +32,7 @@ class CalendarRangeSyncer
/**
* @param MachineHttpClient $machineHttpClient
*/
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient) {}
public function handleCalendarRangeSync(CalendarRange $calendarRange, array $notification, User $user): void
{

View File

@@ -29,9 +29,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
class CalendarSyncer
{
public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository)
{
}
public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository) {}
public function handleCalendarSync(Calendar $calendar, array $notification, User $user): void
{

View File

@@ -41,9 +41,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
{
private array $cacheScheduleTimeForUser = [];
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security)
{
}
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security) {}
public function countEventsForUser(User $user, \DateTimeImmutable $startDate, \DateTimeImmutable $endDate): int
{

View File

@@ -46,23 +46,13 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
return [];
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void {}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void
{
}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void {}
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void
{
}
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void {}
public function syncCalendarRange(CalendarRange $calendarRange): void
{
}
public function syncCalendarRange(CalendarRange $calendarRange): void {}
public function syncInvite(Invite $invite): void
{
}
public function syncInvite(Invite $invite): void {}
}

View File

@@ -44,6 +44,5 @@ class RemoteEvent
* @Serializer\Groups({"read"})
*/
public bool $isAllDay = false
) {
}
) {}
}

View File

@@ -28,9 +28,7 @@ use Doctrine\ORM\QueryBuilder;
class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface
{
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly EntityManagerInterface $em)
{
}
public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly EntityManagerInterface $em) {}
public function buildQueryByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate): QueryBuilder
{

View File

@@ -27,9 +27,7 @@ class CalendarDocVoter extends Voter
'CHILL_CALENDAR_DOC_SEE',
];
public function __construct(private readonly Security $security)
{
}
public function __construct(private readonly Security $security) {}
protected function supports($attribute, $subject): bool
{

View File

@@ -41,8 +41,7 @@ final readonly class CalendarContext implements CalendarContextInterface
private ThirdPartyRender $thirdPartyRender,
private ThirdPartyRepository $thirdPartyRepository,
private TranslatableStringHelperInterface $translatableStringHelper
) {
}
) {}
public function adminFormReverseTransform(array $data): array
{

View File

@@ -19,6 +19,4 @@ use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
* @extends DocGeneratorContextWithPublicFormInterface<Calendar>
* @extends DocGeneratorContextWithAdminFormInterface<Calendar>
*/
interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface
{
}
interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface {}

View File

@@ -38,8 +38,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
public function __construct(
private Security $security,
private EntityManagerInterface $em
) {
}
) {}
/**
* @throws MappingException

View File

@@ -37,8 +37,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe
public function __construct(
private Security $security,
private EntityManagerInterface $em
) {
}
) {}
private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{

View File

@@ -19,9 +19,7 @@ use Chill\DocStoreBundle\GenericDoc\Twig\GenericDocRendererInterface;
final readonly class AccompanyingPeriodCalendarGenericDocRenderer implements GenericDocRendererInterface
{
public function __construct(private CalendarDocRepository $repository)
{
}
public function __construct(private CalendarDocRepository $repository) {}
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
{

View File

@@ -25,9 +25,7 @@ use Symfony\Component\Messenger\MessageBusInterface;
class BulkCalendarShortMessageSender
{
public function __construct(private readonly CalendarForShortMessageProvider $provider, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MessageBusInterface $messageBus, private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder)
{
}
public function __construct(private readonly CalendarForShortMessageProvider $provider, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MessageBusInterface $messageBus, private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder) {}
public function sendBulkMessageToEligibleCalendars()
{

View File

@@ -24,9 +24,7 @@ use Doctrine\ORM\EntityManagerInterface;
class CalendarForShortMessageProvider
{
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $em, private readonly RangeGeneratorInterface $rangeGenerator)
{
}
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $em, private readonly RangeGeneratorInterface $rangeGenerator) {}
/**
* Generate calendars instance.

View File

@@ -23,9 +23,7 @@ use Chill\MainBundle\Service\ShortMessage\ShortMessage;
class DefaultShortMessageForCalendarBuilder implements ShortMessageForCalendarBuilderInterface
{
public function __construct(private readonly \Twig\Environment $engine)
{
}
public function __construct(private readonly \Twig\Environment $engine) {}
public function buildMessageForCalendar(Calendar $calendar): array
{