From c07251f0c67d3c02debe1f6dbe0e12ee3fe9f99a Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Wed, 6 Apr 2022 12:43:03 -0300 Subject: Use PHP7.4 property typehinting where possible Signed-off-by: Vitor Mattos --- lib/Room.php | 97 +++++++++++++++++++++--------------------------------------- 1 file changed, 33 insertions(+), 64 deletions(-) (limited to 'lib/Room.php') diff --git a/lib/Room.php b/lib/Room.php index 7ae7d80eb..a8beaf51c 100644 --- a/lib/Room.php +++ b/lib/Room.php @@ -149,70 +149,39 @@ class Room { public const DESCRIPTION_MAXIMUM_LENGTH = 500; - /** @var Manager */ - private $manager; - /** @var IDBConnection */ - private $db; - /** @var IEventDispatcher */ - private $dispatcher; - /** @var ITimeFactory */ - private $timeFactory; - /** @var IHasher */ - private $hasher; - - /** @var int */ - private $id; - /** @var int */ - private $type; - /** @var int */ - private $readOnly; - /** @var int */ - private $listable; - /** @var int */ - private $lobbyState; - /** @var int */ - private $sipEnabled; - /** @var int|null */ - private $assignedSignalingServer; - /** @var \DateTime|null */ - private $lobbyTimer; - /** @var string */ - private $token; - /** @var string */ - private $name; - /** @var string */ - private $description; - /** @var string */ - private $password; - /** @var string */ - private $remoteServer; - /** @var string */ - private $remoteToken; - /** @var int */ - private $activeGuests; - /** @var int */ - private $defaultPermissions; - /** @var int */ - private $callPermissions; - /** @var int */ - private $callFlag; - /** @var \DateTime|null */ - private $activeSince; - /** @var \DateTime|null */ - private $lastActivity; - /** @var int */ - private $lastMessageId; - /** @var IComment|null */ - private $lastMessage; - /** @var string */ - private $objectType; - /** @var string */ - private $objectId; - - /** @var string */ - protected $currentUser; - /** @var Participant|null */ - protected $participant; + private Manager $manager; + private IDBConnection $db; + private IEventDispatcher $dispatcher; + private ITimeFactory $timeFactory; + private IHasher $hasher; + + private int $id; + private int $type; + private int $readOnly; + private int $listable; + private int $lobbyState; + private int $sipEnabled; + private ?int $assignedSignalingServer; + private ?\DateTime $lobbyTimer; + private string $token; + private string $name; + private string $description; + private string $password; + private string $remoteServer; + private string $remoteToken; + private int $activeGuests; + private int $defaultPermissions; + private int $callPermissions; + private int $callFlag; + private ?\DateTime $activeSince; + private ?\DateTime $lastActivity; + private int $lastMessageId; + private ?IComment $lastMessage; + private string $objectType; + private string $objectId; + + protected ?string $currentUser = null; + protected ?Participant $participant = null; public function __construct(Manager $manager, IDBConnection $db, -- cgit v1.2.3