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/Files | |
parent | 851f76ecd2be9302cf7938e287929f9296b398d0 (diff) |
Run cs:fix
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Files')
-rw-r--r-- | lib/Files/Listener.php | 8 | ||||
-rw-r--r-- | lib/Files/TemplateLoader.php | 3 | ||||
-rw-r--r-- | lib/Files/Util.php | 6 |
3 files changed, 8 insertions, 9 deletions
diff --git a/lib/Files/Listener.php b/lib/Files/Listener.php index d7cb4e8db..bcec71a98 100644 --- a/lib/Files/Listener.php +++ b/lib/Files/Listener.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @@ -61,7 +62,7 @@ class Listener { } public static function register(IEventDispatcher $dispatcher): void { - $listener = static function(JoinRoomUserEvent $event) { + $listener = static function (JoinRoomUserEvent $event) { /** @var self $listener */ $listener = \OC::$server->query(self::class); @@ -74,14 +75,14 @@ class Listener { }; $dispatcher->addListener(Room::EVENT_BEFORE_ROOM_CONNECT, $listener); - $listener = static function(JoinRoomGuestEvent $event) { + $listener = static function (JoinRoomGuestEvent $event) { /** @var self $listener */ $listener = \OC::$server->query(self::class); try { $listener->preventGuestsFromJoiningIfNotPubliclyAccessible($event->getRoom()); } catch (UnauthorizedException $e) { - $event->setCancelJoin( true); + $event->setCancelJoin(true); } }; $dispatcher->addListener(Room::EVENT_BEFORE_GUEST_CONNECT, $listener); @@ -171,5 +172,4 @@ class Listener { throw new UnauthorizedException('Guests are not allowed in this room'); } - } diff --git a/lib/Files/TemplateLoader.php b/lib/Files/TemplateLoader.php index 185e8cb13..99d63f8c4 100644 --- a/lib/Files/TemplateLoader.php +++ b/lib/Files/TemplateLoader.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @@ -43,7 +44,6 @@ use OCP\Util; * Helper class to add the Talk UI to the sidebar of the Files app. */ class TemplateLoader implements IEventListener { - use TInitialState; /** @var IAppManager */ @@ -102,5 +102,4 @@ class TemplateLoader implements IEventListener { $this->publishInitialStateForGuest(); } } - } diff --git a/lib/Files/Util.php b/lib/Files/Util.php index 3789ca37e..1c3fe9a74 100644 --- a/lib/Files/Util.php +++ b/lib/Files/Util.php @@ -1,4 +1,5 @@ <?php + declare(strict_types=1); /** * @@ -116,7 +117,7 @@ class Util { return null; } - $nodes = array_filter($nodes, function($node) { + $nodes = array_filter($nodes, function ($node) { return $node->getType() === FileInfo::TYPE_FILE; }); @@ -244,7 +245,7 @@ class Util { return null; } - $nodes = array_filter($nodes, function(Node $node) { + $nodes = array_filter($nodes, function (Node $node) { return $node->getType() === FileInfo::TYPE_FILE; }); if (empty($nodes)) { @@ -263,5 +264,4 @@ class Util { return null; } - } |