From 478450b2eaa6c69e9b4572656166d0ecbfb22729 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 25 Feb 2016 22:56:35 -0500 Subject: [PATCH] Applied fixes from StyleCI --- extensions/pusher/bootstrap.php | 2 +- extensions/pusher/src/Api/Controller/AuthController.php | 2 +- extensions/pusher/src/Listener/AddClientAssets.php | 5 +++-- extensions/pusher/src/Listener/AddPusherApi.php | 3 ++- extensions/pusher/src/Listener/PushNewPosts.php | 5 +++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/extensions/pusher/bootstrap.php b/extensions/pusher/bootstrap.php index 5579f807e..5fe44849c 100644 --- a/extensions/pusher/bootstrap.php +++ b/extensions/pusher/bootstrap.php @@ -16,4 +16,4 @@ return function (Dispatcher $events) { $events->subscribe(Listener\AddClientAssets::class); $events->subscribe(Listener\AddPusherApi::class); $events->subscribe(Listener\PushNewPosts::class); -}; \ No newline at end of file +}; diff --git a/extensions/pusher/src/Api/Controller/AuthController.php b/extensions/pusher/src/Api/Controller/AuthController.php index 0900288fa..1ff53847f 100644 --- a/extensions/pusher/src/Api/Controller/AuthController.php +++ b/extensions/pusher/src/Api/Controller/AuthController.php @@ -38,7 +38,7 @@ class AuthController implements ControllerInterface */ public function handle(ServerRequestInterface $request) { - $userChannel = 'private-user' . $request->getAttribute('actor')->id; + $userChannel = 'private-user'.$request->getAttribute('actor')->id; $body = $request->getParsedBody(); if (array_get($body, 'channel_name') === $userChannel) { diff --git a/extensions/pusher/src/Listener/AddClientAssets.php b/extensions/pusher/src/Listener/AddClientAssets.php index 8666b3c7f..29a71f4e9 100644 --- a/extensions/pusher/src/Listener/AddClientAssets.php +++ b/extensions/pusher/src/Listener/AddClientAssets.php @@ -1,4 +1,5 @@ -isAdmin()) { $event->addAssets([ - __DIR__ . '/../../js/admin/dist/extension.js' + __DIR__.'/../../js/admin/dist/extension.js' ]); $event->addBootstrapper('flarum/pusher/main'); } diff --git a/extensions/pusher/src/Listener/AddPusherApi.php b/extensions/pusher/src/Listener/AddPusherApi.php index 942396acd..0106b0f94 100755 --- a/extensions/pusher/src/Listener/AddPusherApi.php +++ b/extensions/pusher/src/Listener/AddPusherApi.php @@ -1,4 +1,5 @@ -users as $user) { if ($user->shouldAlert($blueprint::getType())) { - $pusher->trigger('private-user' . $user->id, 'notification', null); + $pusher->trigger('private-user'.$user->id, 'notification', null); } } }