summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-01-05 06:43:58 +0100
committerJoas Schilling <coding@schilljs.com>2023-01-05 10:08:28 +0100
commit351f65884384431a0492d3aa3a06eec94f713085 (patch)
tree1d8c82e536732d89ac4ce0acd59beb981110efb6
parentc11d5ae46495f9ca9680cc12e35d7b012e0d019e (diff)
refactor(breakout): Use PHP8 constructor promotion
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/Controller/BreakoutRoomController.php11
-rw-r--r--lib/Service/BreakoutRoomService.php35
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,
+ ) {
}
/**