diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-01-06 10:36:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-06 10:36:01 +0100 |
commit | 484dabaf801d8335dfe5353caebbf035220dafd2 (patch) | |
tree | 406fc4ffe2a5dde1ee98961f9e6bd02401189489 /lib | |
parent | 0553d5b3edb419c74bd58cf3ddf419614a698233 (diff) | |
parent | 4e696622e7a5c9e8c7aa43f2dbf3d00181848387 (diff) |
Merge pull request #8527 from nextcloud/techdebt/noid/hello-php8
Use PHP8 constructor promotion in breakout rooms code
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/BreakoutRoomController.php | 11 | ||||
-rw-r--r-- | lib/Service/BreakoutRoomService.php | 35 |
2 files changed, 15 insertions, 31 deletions
diff --git a/lib/Controller/BreakoutRoomController.php b/lib/Controller/BreakoutRoomController.php index 1e322fb16..161ec1aff 100644 --- a/lib/Controller/BreakoutRoomController.php +++ b/lib/Controller/BreakoutRoomController.php @@ -33,13 +33,12 @@ use OCP\Comments\MessageTooLongException; use OCP\IRequest; class BreakoutRoomController extends AEnvironmentAwareController { - protected BreakoutRoomService $breakoutRoomService; - - public function __construct(string $appName, - IRequest $request, - BreakoutRoomService $breakoutRoomService) { + public function __construct( + string $appName, + IRequest $request, + protected BreakoutRoomService $breakoutRoomService, + ) { parent::__construct($appName, $request); - $this->breakoutRoomService = $breakoutRoomService; } /** diff --git a/lib/Service/BreakoutRoomService.php b/lib/Service/BreakoutRoomService.php index ebcb7a9a5..e3400f74d 100644 --- a/lib/Service/BreakoutRoomService.php +++ b/lib/Service/BreakoutRoomService.php @@ -40,31 +40,16 @@ use OCP\Notification\IManager as INotificationManager; use OCP\IL10N; class BreakoutRoomService { - protected Config $config; - protected Manager $manager; - protected RoomService $roomService; - protected ParticipantService $participantService; - protected ChatManager $chatManager; - protected INotificationManager $notificationManager; - protected IEventDispatcher $dispatcher; - protected IL10N $l; - - public function __construct(Config $config, - Manager $manager, - RoomService $roomService, - ParticipantService $participantService, - ChatManager $chatManager, - INotificationManager $notificationManager, - IEventDispatcher $dispatcher, - IL10N $l) { - $this->config = $config; - $this->manager = $manager; - $this->roomService = $roomService; - $this->participantService = $participantService; - $this->chatManager = $chatManager; - $this->notificationManager = $notificationManager; - $this->dispatcher = $dispatcher; - $this->l = $l; + public function __construct( + protected Config $config, + protected Manager $manager, + protected RoomService $roomService, + protected ParticipantService $participantService, + protected ChatManager $chatManager, + protected INotificationManager $notificationManager, + protected IEventDispatcher $dispatcher, + protected IL10N $l, + ) { } /** |