From 7ea28f8df60db59d46778bace2f7cc7a1f592776 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos <1697880+AngelFQC@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:04:38 -0500 Subject: [PATCH] Agenda: Add property types #5977 --- .../Entity/AgendaEventInvitation.php | 10 +++------- .../CoreBundle/Entity/AgendaEventInvitee.php | 12 +++-------- .../Entity/AgendaEventSubscription.php | 4 +--- .../CoreBundle/Entity/AgendaReminder.php | 20 +++++-------------- 4 files changed, 12 insertions(+), 34 deletions(-) diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php index 11a8a6284cb..bcf5925f2c3 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php @@ -26,13 +26,11 @@ class AgendaEventInvitation use TimestampableTypedEntity; /** - * @var int - * * @ORM\Id() * @ORM\Column(type="bigint") * @ORM\GeneratedValue(strategy="AUTO") */ - protected $id; + protected ?int $id; /** * @var Collection @@ -40,15 +38,13 @@ class AgendaEventInvitation * @ORM\OneToMany(targetEntity="AgendaEventInvitee", mappedBy="invitation", cascade={"persist", "remove"}, * orphanRemoval=true) */ - protected $invitees; + protected Collection $invitees; /** - * @var User - * * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="resourceNodes") * @ORM\JoinColumn(name="creator_id", referencedColumnName="id", nullable=true, onDelete="CASCADE") */ - protected $creator; + protected User $creator; public function __construct() { diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php index 898e991ae2e..f4b63db0e6d 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php @@ -24,29 +24,23 @@ class AgendaEventInvitee use TimestampableTypedEntity; /** - * @var int - * * @ORM\Id() * @ORM\Column(type="bigint") * @ORM\GeneratedValue */ - protected $id; + protected ?int $id; /** - * @var AgendaEventInvitation|null - * * @ORM\ManyToOne(targetEntity="AgendaEventInvitation", inversedBy="invitees") * @ORM\JoinColumn(name="invitation_id", referencedColumnName="id", onDelete="CASCADE") */ - protected $invitation; + protected ?AgendaEventInvitation $invitation; /** - * @var User|null - * * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User") * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true, onDelete="SET NULL") */ - protected $user; + protected ?User $user; public function getId(): int { diff --git a/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php b/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php index f73e6d26879..3bc0fab71f9 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php @@ -16,11 +16,9 @@ class AgendaEventSubscription extends AgendaEventInvitation public const SUBSCRIPTION_CLASS = 2; /** - * @var int - * * @ORM\Column(name="max_attendees", type="integer", nullable=false, options={"default": 0}) */ - protected $maxAttendees = 0; + protected int $maxAttendees = 0; public function getMaxAttendees(): int { diff --git a/src/Chamilo/CoreBundle/Entity/AgendaReminder.php b/src/Chamilo/CoreBundle/Entity/AgendaReminder.php index 539366f0c48..83f165abaf7 100644 --- a/src/Chamilo/CoreBundle/Entity/AgendaReminder.php +++ b/src/Chamilo/CoreBundle/Entity/AgendaReminder.php @@ -17,41 +17,31 @@ class AgendaReminder use TimestampableTypedEntity; /** - * @var int - * * @ORM\Id() * @ORM\Column(type="bigint") * @ORM\GeneratedValue(strategy="AUTO") */ - protected $id; + protected ?int $id; /** - * @var string - * * @ORM\Column(name="type", type="string") */ - protected $type; + protected string $type; /** - * @var int - * * @ORM\Column(name="event_id", type="integer") */ - protected $eventId; + protected int $eventId; /** - * @var \DateInterval - * * @ORM\Column(name="date_interval", type="dateinterval") */ - protected $dateInterval; + protected \DateInterval $dateInterval; /** - * @var bool - * * @ORM\Column(name="sent", type="boolean") */ - protected $sent; + protected bool $sent; public function __construct() {