diff options
author | Joas Schilling <coding@schilljs.com> | 2020-05-12 16:04:42 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-05-12 16:04:42 +0300 |
commit | 84d42604e60aa1c31ecf698dcc069f36c494148a (patch) | |
tree | 0c881194abad7aa1d6c103f1bad2b201b1c7acd4 /lib/PublicShareAuth | |
parent | 851f76ecd2be9302cf7938e287929f9296b398d0 (diff) |
Run cs:fix
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/PublicShareAuth')
-rw-r--r-- | lib/PublicShareAuth/Listener.php | 9 | ||||
-rw-r--r-- | lib/PublicShareAuth/TemplateLoader.php | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/PublicShareAuth/Listener.php b/lib/PublicShareAuth/Listener.php index 35a6cb7f4..a0518504f 100644 --- a/lib/PublicShareAuth/Listener.php +++ b/lib/PublicShareAuth/Listener.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @@ -45,19 +46,18 @@ use OCP\EventDispatcher\IEventDispatcher; * different room events. */ class Listener { - public static function register(IEventDispatcher $dispatcher): void { - $listener = static function(JoinRoomUserEvent $event) { + $listener = static function (JoinRoomUserEvent $event) { self::preventExtraUsersFromJoining($event->getRoom(), $event->getUser()->getUID()); }; $dispatcher->addListener(Room::EVENT_BEFORE_ROOM_CONNECT, $listener); - $listener = static function(JoinRoomGuestEvent $event) { + $listener = static function (JoinRoomGuestEvent $event) { self::preventExtraGuestsFromJoining($event->getRoom()); }; $dispatcher->addListener(Room::EVENT_BEFORE_GUEST_CONNECT, $listener); - $listener = static function(RoomEvent $event) { + $listener = static function (RoomEvent $event) { self::destroyRoomOnParticipantLeave($event->getRoom()); }; $dispatcher->addListener(Room::EVENT_AFTER_USER_REMOVE, $listener); @@ -130,5 +130,4 @@ class Listener { $room->deleteRoom(); } - } diff --git a/lib/PublicShareAuth/TemplateLoader.php b/lib/PublicShareAuth/TemplateLoader.php index 1e7e0ab58..1b96fe419 100644 --- a/lib/PublicShareAuth/TemplateLoader.php +++ b/lib/PublicShareAuth/TemplateLoader.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @@ -41,7 +42,6 @@ use Symfony\Component\EventDispatcher\GenericEvent; * Talk UI as needed. */ class TemplateLoader { - use TInitialState; public function __construct(IInitialStateService $initialStateService, @@ -55,7 +55,7 @@ class TemplateLoader { } public static function register(IEventDispatcher $dispatcher): void { - $listener = static function(GenericEvent $event) { + $listener = static function (GenericEvent $event) { /** @var IShare $share */ $share = $event->getArgument('share'); /** @var self $templateLoader */ @@ -88,5 +88,4 @@ class TemplateLoader { $this->publishInitialStateForGuest(); } - } |