mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
php cs fixes after updating php cs fixer
This commit is contained in:
@@ -23,7 +23,9 @@ 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}",
|
||||
|
@@ -59,7 +59,8 @@ class CalendarController extends AbstractController
|
||||
private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository,
|
||||
private readonly UserRepositoryInterface $userRepository,
|
||||
private readonly TranslatorInterface $translator
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a calendar item.
|
||||
@@ -406,7 +407,7 @@ class CalendarController extends AbstractController
|
||||
}
|
||||
|
||||
/** @var Calendar $entity */
|
||||
$entity = $em->getRepository(\Chill\CalendarBundle\Entity\Calendar::class)->find($id);
|
||||
$entity = $em->getRepository(Calendar::class)->find($id);
|
||||
|
||||
if (null === $entity) {
|
||||
throw $this->createNotFoundException('Unable to find Calendar entity.');
|
||||
|
@@ -35,7 +35,8 @@ 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")
|
||||
|
@@ -23,7 +23,9 @@ 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}",
|
||||
|
@@ -34,7 +34,9 @@ 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.
|
||||
|
@@ -30,7 +30,9 @@ 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")
|
||||
|
@@ -27,7 +27,9 @@ 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",
|
||||
|
@@ -34,7 +34,9 @@ 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")
|
||||
|
@@ -28,7 +28,9 @@ 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
|
||||
{
|
||||
|
@@ -17,7 +17,9 @@ 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
|
||||
{
|
||||
|
@@ -20,7 +20,9 @@ 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
|
||||
{
|
||||
|
@@ -20,7 +20,9 @@ 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
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private UserJobRepository $jobRepository,
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@@ -65,7 +66,9 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -19,7 +19,9 @@ 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
|
||||
{
|
||||
|
@@ -20,7 +20,9 @@ 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
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private ScopeRepository $scopeRepository,
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@@ -65,7 +66,9 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return Declarations::CALENDAR_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -26,7 +26,9 @@ 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
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly CalendarRepository $calendarRepository,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
|
@@ -24,7 +24,9 @@ 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
|
||||
{
|
||||
|
@@ -24,7 +24,9 @@ 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
|
||||
{
|
||||
|
@@ -22,7 +22,9 @@ 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
|
||||
{
|
||||
|
@@ -21,7 +21,9 @@ 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
|
||||
{
|
||||
|
@@ -34,7 +34,9 @@ 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
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ final readonly class JobFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -29,7 +29,8 @@ class ScopeFilter implements FilterInterface
|
||||
public function __construct(
|
||||
protected TranslatorInterface $translator,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -38,7 +38,8 @@ class CalendarType extends AbstractType
|
||||
private readonly IdToLocationDataTransformer $idToLocationDataTransformer,
|
||||
private readonly ThirdPartiesToIdDataTransformer $partiesToIdDataTransformer,
|
||||
private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -19,7 +19,9 @@ 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)
|
||||
{
|
||||
|
@@ -19,7 +19,9 @@ 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)
|
||||
{
|
||||
|
@@ -18,7 +18,9 @@ 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)
|
||||
{
|
||||
|
@@ -29,7 +29,9 @@ 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
|
||||
{
|
||||
|
@@ -29,7 +29,9 @@ 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
|
||||
{
|
||||
|
@@ -31,7 +31,9 @@ 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)
|
||||
{
|
||||
|
@@ -32,7 +32,9 @@ 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
|
||||
{
|
||||
|
@@ -31,7 +31,9 @@ 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)
|
||||
{
|
||||
|
@@ -37,7 +37,9 @@ 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)
|
||||
{
|
||||
|
@@ -31,7 +31,9 @@ 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
|
||||
{
|
||||
|
@@ -36,7 +36,9 @@ 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
|
||||
{
|
||||
|
@@ -20,7 +20,9 @@ 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
|
||||
{
|
||||
|
@@ -24,7 +24,9 @@ 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
|
||||
{
|
||||
|
@@ -28,7 +28,9 @@ 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}
|
||||
|
@@ -22,7 +22,9 @@ 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
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ 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
|
||||
|
@@ -21,7 +21,8 @@ readonly class MSUserAbsenceSync
|
||||
private MSUserAbsenceReaderInterface $absenceReader,
|
||||
private ClockInterface $clock,
|
||||
private LoggerInterface $logger,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function syncUserAbsence(User $user): void
|
||||
{
|
||||
|
@@ -29,7 +29,9 @@ 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
|
||||
{
|
||||
|
@@ -36,7 +36,9 @@ 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
|
||||
{
|
||||
|
@@ -29,7 +29,9 @@ 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
|
||||
{
|
||||
|
@@ -32,7 +32,9 @@ 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
|
||||
{
|
||||
|
@@ -29,7 +29,9 @@ 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
|
||||
{
|
||||
|
@@ -41,7 +41,9 @@ 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
|
||||
{
|
||||
|
@@ -46,13 +46,23 @@ 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
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -44,5 +44,6 @@ class RemoteEvent
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public bool $isAllDay = false
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,9 @@ 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
|
||||
{
|
||||
|
@@ -27,7 +27,9 @@ 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
|
||||
{
|
||||
|
@@ -41,7 +41,8 @@ final readonly class CalendarContext implements CalendarContextInterface
|
||||
private ThirdPartyRender $thirdPartyRender,
|
||||
private ThirdPartyRepository $thirdPartyRepository,
|
||||
private TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function adminFormReverseTransform(array $data): array
|
||||
{
|
||||
|
@@ -19,4 +19,6 @@ use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
|
||||
* @extends DocGeneratorContextWithPublicFormInterface<Calendar>
|
||||
* @extends DocGeneratorContextWithAdminFormInterface<Calendar>
|
||||
*/
|
||||
interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface {}
|
||||
interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface
|
||||
{
|
||||
}
|
||||
|
@@ -38,7 +38,8 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
|
||||
public function __construct(
|
||||
private Security $security,
|
||||
private EntityManagerInterface $em
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws MappingException
|
||||
|
@@ -37,7 +37,8 @@ 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
|
||||
{
|
||||
|
@@ -19,7 +19,9 @@ 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
|
||||
{
|
||||
|
@@ -25,7 +25,9 @@ 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()
|
||||
{
|
||||
|
@@ -24,7 +24,9 @@ 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.
|
||||
|
@@ -23,7 +23,9 @@ 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
|
||||
{
|
||||
|
Reference in New Issue
Block a user