apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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