From 558f2103ef4e9641602fe58303bd17a0e2808b89 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 27 May 2016 09:07:49 +0900 Subject: [PATCH] Make StyleCI happy and fix some docblocks --- framework/core/src/Admin/Controller/WebAppController.php | 2 -- framework/core/src/Asset/RevisionCompiler.php | 2 +- .../core/src/Forum/Controller/DiscussionController.php | 2 +- framework/core/src/Http/WebApp/AbstractWebApp.php | 1 - framework/core/src/Http/WebApp/WebAppAssets.php | 8 ++++---- framework/core/src/Http/WebApp/WebAppView.php | 9 +++------ 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/framework/core/src/Admin/Controller/WebAppController.php b/framework/core/src/Admin/Controller/WebAppController.php index 5cf89f66c..6690cf0de 100644 --- a/framework/core/src/Admin/Controller/WebAppController.php +++ b/framework/core/src/Admin/Controller/WebAppController.php @@ -14,9 +14,7 @@ use Flarum\Admin\WebApp; use Flarum\Core\Permission; use Flarum\Event\PrepareUnserializedSettings; use Flarum\Extension\ExtensionManager; -use Flarum\Foundation\Application; use Flarum\Http\Controller\AbstractWebAppController; -use Flarum\Locale\LocaleManager; use Flarum\Settings\SettingsRepositoryInterface; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Asset/RevisionCompiler.php b/framework/core/src/Asset/RevisionCompiler.php index b7d207398..50f19b806 100644 --- a/framework/core/src/Asset/RevisionCompiler.php +++ b/framework/core/src/Asset/RevisionCompiler.php @@ -97,7 +97,7 @@ class RevisionCompiler implements CompilerInterface file_put_contents($file, $this->compile()); } else { - return null; + return; } } diff --git a/framework/core/src/Forum/Controller/DiscussionController.php b/framework/core/src/Forum/Controller/DiscussionController.php index 1db44accc..c4077be03 100644 --- a/framework/core/src/Forum/Controller/DiscussionController.php +++ b/framework/core/src/Forum/Controller/DiscussionController.php @@ -12,8 +12,8 @@ namespace Flarum\Forum\Controller; use Flarum\Api\Client as ApiClient; use Flarum\Core\User; -use Flarum\Forum\WebApp; use Flarum\Forum\UrlGenerator; +use Flarum\Forum\WebApp; use Flarum\Http\Exception\RouteNotFoundException; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface as Request; diff --git a/framework/core/src/Http/WebApp/AbstractWebApp.php b/framework/core/src/Http/WebApp/AbstractWebApp.php index 03f3fbfea..c992d79da 100644 --- a/framework/core/src/Http/WebApp/AbstractWebApp.php +++ b/framework/core/src/Http/WebApp/AbstractWebApp.php @@ -10,7 +10,6 @@ namespace Flarum\Http\WebApp; -use Flarum\Http\Controller; use Flarum\Locale\LocaleManager; use Flarum\Settings\SettingsRepositoryInterface; diff --git a/framework/core/src/Http/WebApp/WebAppAssets.php b/framework/core/src/Http/WebApp/WebAppAssets.php index dc0bfb4d7..e8cbc502d 100644 --- a/framework/core/src/Http/WebApp/WebAppAssets.php +++ b/framework/core/src/Http/WebApp/WebAppAssets.php @@ -28,17 +28,17 @@ class WebAppAssets * @var Application */ protected $app; - + /** * @var Repository */ protected $cache; - + /** * @var LocaleManager */ protected $locales; - + /** * @param string $name * @param Application $app @@ -52,7 +52,7 @@ class WebAppAssets $this->cache = $cache; $this->locales = $locales; } - + public function flush() { $this->flushJs(); diff --git a/framework/core/src/Http/WebApp/WebAppView.php b/framework/core/src/Http/WebApp/WebAppView.php index 651f941b7..58457c46f 100644 --- a/framework/core/src/Http/WebApp/WebAppView.php +++ b/framework/core/src/Http/WebApp/WebAppView.php @@ -12,10 +12,7 @@ namespace Flarum\Http\WebApp; use Flarum\Api\Client; use Flarum\Api\Serializer\AbstractSerializer; -use Flarum\Api\Serializer\CurrentUserSerializer; use Flarum\Asset\CompilerInterface; -use Flarum\Core\Exception\ValidationException; -use Flarum\Core\User; use Flarum\Locale\JsCompiler; use Flarum\Locale\LocaleManager; use Illuminate\View\Factory; @@ -113,7 +110,7 @@ class WebAppView protected $localeCss; /** - * @var ClientAssets + * @var WebAppAssets */ protected $assets; @@ -139,7 +136,7 @@ class WebAppView /** * @param string $layout - * @param ClientAssets $assets + * @param WebAppAssets $assets * @param Client $api * @param Factory $view * @param LocaleManager $locales @@ -285,7 +282,7 @@ class WebAppView return $view->render(); } - + protected function buildTitle($forumTitle) { return ($this->title ? $this->title.' - ' : '').$forumTitle;