mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -30,7 +30,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class CalendarEntityListener
|
||||
{
|
||||
public function __construct(private MessageBusInterface $messageBus, private Security $security)
|
||||
public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class CalendarRangeEntityListener
|
||||
{
|
||||
public function __construct(private MessageBusInterface $messageBus, private Security $security)
|
||||
public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class CalendarRangeRemoveToRemoteHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private RemoteCalendarConnectorInterface $remoteCalendarConnector, private UserRepository $userRepository)
|
||||
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -32,7 +32,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class CalendarRangeToRemoteHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private CalendarRangeRepository $calendarRangeRepository, private RemoteCalendarConnectorInterface $remoteCalendarConnector, private EntityManagerInterface $entityManager)
|
||||
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class CalendarRemoveHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private RemoteCalendarConnectorInterface $remoteCalendarConnector, private CalendarRangeRepository $calendarRangeRepository, private UserRepositoryInterface $userRepository)
|
||||
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class CalendarToRemoteHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private CalendarRangeRepository $calendarRangeRepository, private CalendarRepository $calendarRepository, private EntityManagerInterface $entityManager, private InviteRepository $inviteRepository, private RemoteCalendarConnectorInterface $calendarConnector, private 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -31,7 +31,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class InviteUpdateHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private EntityManagerInterface $em, private InviteRepository $inviteRepository, private RemoteCalendarConnectorInterface $remoteCalendarConnector)
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class MSGraphChangeNotificationHandler implements MessageHandlerInterface
|
||||
{
|
||||
public function __construct(private CalendarRangeRepository $calendarRangeRepository, private CalendarRangeSyncer $calendarRangeSyncer, private CalendarRepository $calendarRepository, private CalendarSyncer $calendarSyncer, private EntityManagerInterface $em, private LoggerInterface $logger, private MapCalendarToUser $mapCalendarToUser, private 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -24,13 +24,13 @@ use Chill\MainBundle\Entity\User;
|
||||
|
||||
class CalendarMessage
|
||||
{
|
||||
public const CALENDAR_PERSIST = 'CHILL_CALENDAR_CALENDAR_PERSIST';
|
||||
final public const CALENDAR_PERSIST = 'CHILL_CALENDAR_CALENDAR_PERSIST';
|
||||
|
||||
public const CALENDAR_UPDATE = 'CHILL_CALENDAR_CALENDAR_UPDATE';
|
||||
final public const CALENDAR_UPDATE = 'CHILL_CALENDAR_CALENDAR_UPDATE';
|
||||
|
||||
private int $byUserId;
|
||||
private readonly int $byUserId;
|
||||
|
||||
private int $calendarId;
|
||||
private readonly int $calendarId;
|
||||
|
||||
private array $newInvitesIds = [];
|
||||
|
||||
@@ -45,7 +45,7 @@ class CalendarMessage
|
||||
|
||||
public function __construct(
|
||||
Calendar $calendar,
|
||||
private string $action,
|
||||
private readonly string $action,
|
||||
User $byUser
|
||||
) {
|
||||
$this->calendarId = $calendar->getId();
|
||||
|
@@ -23,15 +23,15 @@ use Chill\MainBundle\Entity\User;
|
||||
|
||||
class CalendarRangeMessage
|
||||
{
|
||||
public const CALENDAR_RANGE_PERSIST = 'CHILL_CALENDAR_CALENDAR_RANGE_PERSIST';
|
||||
final public const CALENDAR_RANGE_PERSIST = 'CHILL_CALENDAR_CALENDAR_RANGE_PERSIST';
|
||||
|
||||
public const CALENDAR_RANGE_UPDATE = 'CHILL_CALENDAR_CALENDAR_RANGE_UPDATE';
|
||||
final public const CALENDAR_RANGE_UPDATE = 'CHILL_CALENDAR_CALENDAR_RANGE_UPDATE';
|
||||
|
||||
private ?int $byUserId = null;
|
||||
|
||||
private int $calendarRangeId;
|
||||
private readonly int $calendarRangeId;
|
||||
|
||||
public function __construct(CalendarRange $calendarRange, private string $action, ?User $byUser)
|
||||
public function __construct(CalendarRange $calendarRange, private readonly string $action, ?User $byUser)
|
||||
{
|
||||
$this->calendarRangeId = $calendarRange->getId();
|
||||
|
||||
|
@@ -25,11 +25,11 @@ class CalendarRangeRemovedMessage
|
||||
{
|
||||
private ?int $byUserId = null;
|
||||
|
||||
private int $calendarRangeUserId;
|
||||
private readonly int $calendarRangeUserId;
|
||||
|
||||
private array $remoteAttributes;
|
||||
private readonly array $remoteAttributes;
|
||||
|
||||
private string $remoteId;
|
||||
private readonly string $remoteId;
|
||||
|
||||
public function __construct(CalendarRange $calendarRange, ?User $byUser)
|
||||
{
|
||||
|
@@ -27,11 +27,11 @@ class CalendarRemovedMessage
|
||||
|
||||
private ?int $byUserId = null;
|
||||
|
||||
private int $calendarUserId;
|
||||
private readonly int $calendarUserId;
|
||||
|
||||
private array $remoteAttributes;
|
||||
private readonly array $remoteAttributes;
|
||||
|
||||
private string $remoteId;
|
||||
private readonly string $remoteId;
|
||||
|
||||
public function __construct(Calendar $calendar, ?User $byUser)
|
||||
{
|
||||
|
@@ -23,9 +23,9 @@ use Chill\MainBundle\Entity\User;
|
||||
|
||||
class InviteUpdateMessage
|
||||
{
|
||||
private int $byUserId;
|
||||
private readonly int $byUserId;
|
||||
|
||||
private int $inviteId;
|
||||
private readonly int $inviteId;
|
||||
|
||||
public function __construct(Invite $invite, User $byUser)
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@ namespace Chill\CalendarBundle\Messenger\Message;
|
||||
|
||||
class MSGraphChangeNotificationMessage
|
||||
{
|
||||
public function __construct(private array $content, private int $userId)
|
||||
public function __construct(private readonly array $content, private readonly int $userId)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user