Skip to content

Commit 7ea28f8

Browse files
committed
Agenda: Add property types #5977
1 parent e050721 commit 7ea28f8

File tree

4 files changed

+12
-34
lines changed

4 files changed

+12
-34
lines changed

src/Chamilo/CoreBundle/Entity/AgendaEventInvitation.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,25 @@ class AgendaEventInvitation
2626
use TimestampableTypedEntity;
2727

2828
/**
29-
* @var int
30-
*
3129
* @ORM\Id()
3230
* @ORM\Column(type="bigint")
3331
* @ORM\GeneratedValue(strategy="AUTO")
3432
*/
35-
protected $id;
33+
protected ?int $id;
3634

3735
/**
3836
* @var Collection<int, AgendaEventInvitee>
3937
*
4038
* @ORM\OneToMany(targetEntity="AgendaEventInvitee", mappedBy="invitation", cascade={"persist", "remove"},
4139
* orphanRemoval=true)
4240
*/
43-
protected $invitees;
41+
protected Collection $invitees;
4442

4543
/**
46-
* @var User
47-
*
4844
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User", inversedBy="resourceNodes")
4945
* @ORM\JoinColumn(name="creator_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
5046
*/
51-
protected $creator;
47+
protected User $creator;
5248

5349
public function __construct()
5450
{

src/Chamilo/CoreBundle/Entity/AgendaEventInvitee.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,23 @@ class AgendaEventInvitee
2424
use TimestampableTypedEntity;
2525

2626
/**
27-
* @var int
28-
*
2927
* @ORM\Id()
3028
* @ORM\Column(type="bigint")
3129
* @ORM\GeneratedValue
3230
*/
33-
protected $id;
31+
protected ?int $id;
3432

3533
/**
36-
* @var AgendaEventInvitation|null
37-
*
3834
* @ORM\ManyToOne(targetEntity="AgendaEventInvitation", inversedBy="invitees")
3935
* @ORM\JoinColumn(name="invitation_id", referencedColumnName="id", onDelete="CASCADE")
4036
*/
41-
protected $invitation;
37+
protected ?AgendaEventInvitation $invitation;
4238

4339
/**
44-
* @var User|null
45-
*
4640
* @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
4741
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
4842
*/
49-
protected $user;
43+
protected ?User $user;
5044

5145
public function getId(): int
5246
{

src/Chamilo/CoreBundle/Entity/AgendaEventSubscription.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,9 @@ class AgendaEventSubscription extends AgendaEventInvitation
1616
public const SUBSCRIPTION_CLASS = 2;
1717

1818
/**
19-
* @var int
20-
*
2119
* @ORM\Column(name="max_attendees", type="integer", nullable=false, options={"default": 0})
2220
*/
23-
protected $maxAttendees = 0;
21+
protected int $maxAttendees = 0;
2422

2523
public function getMaxAttendees(): int
2624
{

src/Chamilo/CoreBundle/Entity/AgendaReminder.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,31 @@ class AgendaReminder
1717
use TimestampableTypedEntity;
1818

1919
/**
20-
* @var int
21-
*
2220
* @ORM\Id()
2321
* @ORM\Column(type="bigint")
2422
* @ORM\GeneratedValue(strategy="AUTO")
2523
*/
26-
protected $id;
24+
protected ?int $id;
2725

2826
/**
29-
* @var string
30-
*
3127
* @ORM\Column(name="type", type="string")
3228
*/
33-
protected $type;
29+
protected string $type;
3430

3531
/**
36-
* @var int
37-
*
3832
* @ORM\Column(name="event_id", type="integer")
3933
*/
40-
protected $eventId;
34+
protected int $eventId;
4135

4236
/**
43-
* @var \DateInterval
44-
*
4537
* @ORM\Column(name="date_interval", type="dateinterval")
4638
*/
47-
protected $dateInterval;
39+
protected \DateInterval $dateInterval;
4840

4941
/**
50-
* @var bool
51-
*
5242
* @ORM\Column(name="sent", type="boolean")
5343
*/
54-
protected $sent;
44+
protected bool $sent;
5545

5646
public function __construct()
5747
{

0 commit comments

Comments
 (0)