diff options
author | Vitor Mattos <vitor@php.rio> | 2023-01-05 13:49:38 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2023-01-05 13:53:14 -0300 |
commit | 6d98e5407778c1827c26921383db031137b265b0 (patch) | |
tree | 9c1c78f8469465f16dd71144ab22ac48c80196ef /lib | |
parent | 316cb944eb26aa2b6a93aec41126de99274e056e (diff) |
Use PHP8 constructor promotion
Close #8522
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/RecordingController.php | 20 | ||||
-rw-r--r-- | lib/Service/RecordingService.php | 20 |
2 files changed, 12 insertions, 28 deletions
diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index b91370639..0948fe538 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -35,20 +35,14 @@ use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; class RecordingController extends AEnvironmentAwareController { - private Config $talkConfig; - private SIPBridgeService $SIPBridgeService; - private RecordingService $recordingService; - - - public function __construct(string $appName, - IRequest $request, - Config $talkConfig, - SIPBridgeService $SIPBridgeService, - RecordingService $recordingService) { + public function __construct( + string $appName, + IRequest $request, + private Config $talkConfig, + private SIPBridgeService $SIPBridgeService, + private RecordingService $recordingService + ) { parent::__construct($appName, $request); - $this->talkConfig = $talkConfig; - $this->SIPBridgeService = $SIPBridgeService; - $this->recordingService = $recordingService; } /** diff --git a/lib/Service/RecordingService.php b/lib/Service/RecordingService.php index 8c9eb4815..a8d7b666f 100644 --- a/lib/Service/RecordingService.php +++ b/lib/Service/RecordingService.php @@ -42,24 +42,14 @@ class RecordingService { 'video/ogg' => ['ogv'], 'video/x-matroska' => ['mkv'], ]; - private IMimeTypeDetector $mimeTypeDetector; - private ParticipantService $participantService; - private IRootFolder $rootFolder; - private Config $config; - private RoomService $roomService; public function __construct( - IMimeTypeDetector $mimeTypeDetector, - ParticipantService $participantService, - IRootFolder $rootFolder, - Config $config, - RoomService $roomService + private IMimeTypeDetector $mimeTypeDetector, + private ParticipantService $participantService, + private IRootFolder $rootFolder, + private Config $config, + private RoomService $roomService ) { - $this->mimeTypeDetector = $mimeTypeDetector; - $this->participantService = $participantService; - $this->rootFolder = $rootFolder; - $this->config = $config; - $this->roomService = $roomService; } public function start(Room $room, int $status): void { |