diff options
author | Joas Schilling <coding@schilljs.com> | 2023-04-13 14:21:30 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-04-13 14:28:41 +0200 |
commit | c1970caef4409c05f7e12b4e5a965b13d2a1665f (patch) | |
tree | 81bdc28b4c9052134d73a13c580c6250d9fe4659 /lib/Events | |
parent | f3ff4a8820c3d3aedeffa4caee634407e8ac5aea (diff) |
chore(CS): Unify construct() calls
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Events')
-rw-r--r-- | lib/Events/AddEmailEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/AddParticipantsEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/AttendeesEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/ChatEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/ChatParticipantEvent.php | 7 | ||||
-rw-r--r-- | lib/Events/CommandEvent.php | 7 | ||||
-rw-r--r-- | lib/Events/CreateRoomTokenEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/DuplicatedParticipantEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/EndCallForEveryoneEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/JoinRoomGuestEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/JoinRoomUserEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/ModifyLobbyEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/ModifyParticipantEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/ModifyRoomEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/ParticipantEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/RemoveParticipantEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/RemoveUserEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/SendCallNotificationEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/SignalingEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/SignalingRoomPropertiesEvent.php | 6 | ||||
-rw-r--r-- | lib/Events/VerifyRoomPasswordEvent.php | 6 |
21 files changed, 90 insertions, 38 deletions
diff --git a/lib/Events/AddEmailEvent.php b/lib/Events/AddEmailEvent.php index 44d3c5597..5fcc831ac 100644 --- a/lib/Events/AddEmailEvent.php +++ b/lib/Events/AddEmailEvent.php @@ -29,8 +29,10 @@ class AddEmailEvent extends RoomEvent { protected string $email; - public function __construct(Room $room, - string $email) { + public function __construct( + Room $room, + string $email, + ) { parent::__construct($room); $this->email = $email; } diff --git a/lib/Events/AddParticipantsEvent.php b/lib/Events/AddParticipantsEvent.php index 447cf47d4..d765ac949 100644 --- a/lib/Events/AddParticipantsEvent.php +++ b/lib/Events/AddParticipantsEvent.php @@ -33,9 +33,11 @@ class AddParticipantsEvent extends RoomEvent { protected ?IComment $lastMessage = null; - public function __construct(Room $room, + public function __construct( + Room $room, array $participants, - bool $skipLastMessageUpdate = false) { + bool $skipLastMessageUpdate = false, + ) { parent::__construct($room); $this->participants = $participants; $this->skipLastMessageUpdate = $skipLastMessageUpdate; diff --git a/lib/Events/AttendeesEvent.php b/lib/Events/AttendeesEvent.php index bd69216a5..bbca51d11 100644 --- a/lib/Events/AttendeesEvent.php +++ b/lib/Events/AttendeesEvent.php @@ -30,8 +30,10 @@ class AttendeesEvent extends RoomEvent { /** @var Attendee[] */ protected array $attendees; - public function __construct(Room $room, - array $attendees) { + public function __construct( + Room $room, + array $attendees, + ) { parent::__construct($room); $this->attendees = $attendees; } diff --git a/lib/Events/ChatEvent.php b/lib/Events/ChatEvent.php index aa38d1166..1b680d481 100644 --- a/lib/Events/ChatEvent.php +++ b/lib/Events/ChatEvent.php @@ -31,9 +31,11 @@ class ChatEvent extends RoomEvent { protected bool $skipLastActivityUpdate; - public function __construct(Room $room, + public function __construct( + Room $room, IComment $comment, - bool $skipLastActivityUpdate = false) { + bool $skipLastActivityUpdate = false, + ) { parent::__construct($room); $this->comment = $comment; $this->skipLastActivityUpdate = $skipLastActivityUpdate; diff --git a/lib/Events/ChatParticipantEvent.php b/lib/Events/ChatParticipantEvent.php index 0a7c967ed..e08e0e0db 100644 --- a/lib/Events/ChatParticipantEvent.php +++ b/lib/Events/ChatParticipantEvent.php @@ -31,7 +31,12 @@ class ChatParticipantEvent extends ChatEvent { protected Participant $participant; protected bool $silent; - public function __construct(Room $room, IComment $message, Participant $participant, bool $silent) { + public function __construct( + Room $room, + IComment $message, + Participant $participant, + bool $silent, + ) { parent::__construct($room, $message); $this->participant = $participant; $this->silent = $silent; diff --git a/lib/Events/CommandEvent.php b/lib/Events/CommandEvent.php index 67281c254..cd7243ffd 100644 --- a/lib/Events/CommandEvent.php +++ b/lib/Events/CommandEvent.php @@ -33,7 +33,12 @@ class CommandEvent extends ChatEvent { protected string $output = ''; - public function __construct(Room $room, IComment $message, Command $command, string $arguments) { + public function __construct( + Room $room, + IComment $message, + Command $command, + string $arguments, + ) { parent::__construct($room, $message); $this->command = $command; $this->arguments = $arguments; diff --git a/lib/Events/CreateRoomTokenEvent.php b/lib/Events/CreateRoomTokenEvent.php index 937cebb01..8e1fa9252 100644 --- a/lib/Events/CreateRoomTokenEvent.php +++ b/lib/Events/CreateRoomTokenEvent.php @@ -31,8 +31,10 @@ class CreateRoomTokenEvent extends Event { protected string $token; - public function __construct(int $entropy, - string $chars) { + public function __construct( + int $entropy, + string $chars, + ) { parent::__construct(); $this->entropy = $entropy; $this->chars = $chars; diff --git a/lib/Events/DuplicatedParticipantEvent.php b/lib/Events/DuplicatedParticipantEvent.php index 44d8f2754..e2760f759 100644 --- a/lib/Events/DuplicatedParticipantEvent.php +++ b/lib/Events/DuplicatedParticipantEvent.php @@ -27,8 +27,10 @@ use OCA\Talk\Participant; use OCA\Talk\Room; class DuplicatedParticipantEvent extends ParticipantEvent { - public function __construct(Room $room, - Participant $participant) { + public function __construct( + Room $room, + Participant $participant, + ) { parent::__construct($room, $participant); } } diff --git a/lib/Events/EndCallForEveryoneEvent.php b/lib/Events/EndCallForEveryoneEvent.php index 27fe94706..94b61a132 100644 --- a/lib/Events/EndCallForEveryoneEvent.php +++ b/lib/Events/EndCallForEveryoneEvent.php @@ -32,8 +32,10 @@ class EndCallForEveryoneEvent extends ModifyRoomEvent { /** @var string[] */ protected array $userIds = []; - public function __construct(Room $room, - ?Participant $actor = null) { + public function __construct( + Room $room, + ?Participant $actor = null, + ) { parent::__construct($room, 'in_call', Participant::FLAG_DISCONNECTED, null, $actor); } diff --git a/lib/Events/JoinRoomGuestEvent.php b/lib/Events/JoinRoomGuestEvent.php index 8a31c4ee8..92a6778ed 100644 --- a/lib/Events/JoinRoomGuestEvent.php +++ b/lib/Events/JoinRoomGuestEvent.php @@ -31,9 +31,11 @@ class JoinRoomGuestEvent extends RoomEvent { protected bool $passedPasswordProtection; - public function __construct(Room $room, + public function __construct( + Room $room, string $password, - bool $passedPasswordProtection) { + bool $passedPasswordProtection, + ) { parent::__construct($room); $this->cancelJoin = false; $this->password = $password; diff --git a/lib/Events/JoinRoomUserEvent.php b/lib/Events/JoinRoomUserEvent.php index 3e1b0a5ba..d8ee9edda 100644 --- a/lib/Events/JoinRoomUserEvent.php +++ b/lib/Events/JoinRoomUserEvent.php @@ -33,10 +33,12 @@ class JoinRoomUserEvent extends RoomEvent { protected bool $passedPasswordProtection; - public function __construct(Room $room, + public function __construct( + Room $room, IUser $user, string $password, - bool $passedPasswordProtection) { + bool $passedPasswordProtection, + ) { parent::__construct($room); $this->cancelJoin = false; $this->user = $user; diff --git a/lib/Events/ModifyLobbyEvent.php b/lib/Events/ModifyLobbyEvent.php index 448b96435..383c626e9 100644 --- a/lib/Events/ModifyLobbyEvent.php +++ b/lib/Events/ModifyLobbyEvent.php @@ -29,12 +29,14 @@ class ModifyLobbyEvent extends ModifyRoomEvent { protected ?\DateTime $lobbyTimer; protected bool $timerReached; - public function __construct(Room $room, + public function __construct( + Room $room, string $parameter, int $newValue, int $oldValue, ?\DateTime $lobbyTimer, - bool $timerReached) { + bool $timerReached, + ) { parent::__construct($room, $parameter, $newValue, $oldValue); $this->lobbyTimer = $lobbyTimer; $this->timerReached = $timerReached; diff --git a/lib/Events/ModifyParticipantEvent.php b/lib/Events/ModifyParticipantEvent.php index 85f07c297..fa5d4c8c2 100644 --- a/lib/Events/ModifyParticipantEvent.php +++ b/lib/Events/ModifyParticipantEvent.php @@ -34,11 +34,13 @@ class ModifyParticipantEvent extends ParticipantEvent { protected $oldValue; - public function __construct(Room $room, + public function __construct( + Room $room, Participant $participant, string $parameter, $newValue, - $oldValue = null) { + $oldValue = null, + ) { parent::__construct($room, $participant); $this->parameter = $parameter; $this->newValue = $newValue; diff --git a/lib/Events/ModifyRoomEvent.php b/lib/Events/ModifyRoomEvent.php index 596842213..5182ae9fe 100644 --- a/lib/Events/ModifyRoomEvent.php +++ b/lib/Events/ModifyRoomEvent.php @@ -35,11 +35,13 @@ class ModifyRoomEvent extends RoomEvent { protected ?Participant $actor; - public function __construct(Room $room, + public function __construct( + Room $room, string $parameter, $newValue, $oldValue = null, - ?Participant $actor = null) { + ?Participant $actor = null, + ) { parent::__construct($room); $this->parameter = $parameter; $this->newValue = $newValue; diff --git a/lib/Events/ParticipantEvent.php b/lib/Events/ParticipantEvent.php index 8b3930fb7..c74664fcb 100644 --- a/lib/Events/ParticipantEvent.php +++ b/lib/Events/ParticipantEvent.php @@ -30,8 +30,10 @@ class ParticipantEvent extends RoomEvent { protected Participant $participant; - public function __construct(Room $room, - Participant $participant) { + public function __construct( + Room $room, + Participant $participant, + ) { parent::__construct($room); $this->participant = $participant; } diff --git a/lib/Events/RemoveParticipantEvent.php b/lib/Events/RemoveParticipantEvent.php index d9e2bb2f1..e364d9d71 100644 --- a/lib/Events/RemoveParticipantEvent.php +++ b/lib/Events/RemoveParticipantEvent.php @@ -33,10 +33,12 @@ class RemoveParticipantEvent extends ParticipantEvent { /** @var Session[] */ protected array $sessions; - public function __construct(Room $room, + public function __construct( + Room $room, Participant $participant, string $reason, - array $sessions = []) { + array $sessions = [], + ) { parent::__construct($room, $participant); $this->reason = $reason; $this->sessions = $sessions; diff --git a/lib/Events/RemoveUserEvent.php b/lib/Events/RemoveUserEvent.php index 6eb887837..df49a180b 100644 --- a/lib/Events/RemoveUserEvent.php +++ b/lib/Events/RemoveUserEvent.php @@ -30,11 +30,13 @@ use OCP\IUser; class RemoveUserEvent extends RemoveParticipantEvent { protected IUser $user; - public function __construct(Room $room, + public function __construct( + Room $room, Participant $participant, IUser $user, string $reason, - array $sessions = []) { + array $sessions = [], + ) { parent::__construct($room, $participant, $reason, $sessions); $this->user = $user; } diff --git a/lib/Events/SendCallNotificationEvent.php b/lib/Events/SendCallNotificationEvent.php index 8f449cb7f..4ff864423 100644 --- a/lib/Events/SendCallNotificationEvent.php +++ b/lib/Events/SendCallNotificationEvent.php @@ -30,7 +30,11 @@ class SendCallNotificationEvent extends RoomEvent { protected Participant $actor; protected Participant $target; - public function __construct(Room $room, Participant $actor, Participant $target) { + public function __construct( + Room $room, + Participant $actor, + Participant $target, + ) { parent::__construct($room); $this->actor = $actor; $this->target = $target; diff --git a/lib/Events/SignalingEvent.php b/lib/Events/SignalingEvent.php index 68d36f0f2..b116b1fe3 100644 --- a/lib/Events/SignalingEvent.php +++ b/lib/Events/SignalingEvent.php @@ -31,9 +31,11 @@ class SignalingEvent extends ParticipantEvent { /** @var mixed */ protected $session; - public function __construct(Room $room, + public function __construct( + Room $room, Participant $participant, - string $action) { + string $action, + ) { parent::__construct($room, $participant); $this->action = $action; $this->session = ''; diff --git a/lib/Events/SignalingRoomPropertiesEvent.php b/lib/Events/SignalingRoomPropertiesEvent.php index 6bbd3e02f..a09214e64 100644 --- a/lib/Events/SignalingRoomPropertiesEvent.php +++ b/lib/Events/SignalingRoomPropertiesEvent.php @@ -29,7 +29,11 @@ class SignalingRoomPropertiesEvent extends RoomEvent { protected ?string $userId; protected array $properties; - public function __construct(Room $room, ?string $userId, array $properties) { + public function __construct( + Room $room, + ?string $userId, + array $properties, + ) { parent::__construct($room); $this->us |