mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Make StyleCI happy and fix some docblocks
This commit is contained in:
parent
2b9ec71a81
commit
0b0c1055d6
|
@ -14,9 +14,7 @@ use Flarum\Admin\WebApp;
|
||||||
use Flarum\Core\Permission;
|
use Flarum\Core\Permission;
|
||||||
use Flarum\Event\PrepareUnserializedSettings;
|
use Flarum\Event\PrepareUnserializedSettings;
|
||||||
use Flarum\Extension\ExtensionManager;
|
use Flarum\Extension\ExtensionManager;
|
||||||
use Flarum\Foundation\Application;
|
|
||||||
use Flarum\Http\Controller\AbstractWebAppController;
|
use Flarum\Http\Controller\AbstractWebAppController;
|
||||||
use Flarum\Locale\LocaleManager;
|
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
use Illuminate\Contracts\Events\Dispatcher;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
|
|
|
@ -97,7 +97,7 @@ class RevisionCompiler implements CompilerInterface
|
||||||
|
|
||||||
file_put_contents($file, $this->compile());
|
file_put_contents($file, $this->compile());
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@ namespace Flarum\Forum\Controller;
|
||||||
|
|
||||||
use Flarum\Api\Client as ApiClient;
|
use Flarum\Api\Client as ApiClient;
|
||||||
use Flarum\Core\User;
|
use Flarum\Core\User;
|
||||||
use Flarum\Forum\WebApp;
|
|
||||||
use Flarum\Forum\UrlGenerator;
|
use Flarum\Forum\UrlGenerator;
|
||||||
|
use Flarum\Forum\WebApp;
|
||||||
use Flarum\Http\Exception\RouteNotFoundException;
|
use Flarum\Http\Exception\RouteNotFoundException;
|
||||||
use Illuminate\Contracts\Events\Dispatcher;
|
use Illuminate\Contracts\Events\Dispatcher;
|
||||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
namespace Flarum\Http\WebApp;
|
namespace Flarum\Http\WebApp;
|
||||||
|
|
||||||
use Flarum\Http\Controller;
|
|
||||||
use Flarum\Locale\LocaleManager;
|
use Flarum\Locale\LocaleManager;
|
||||||
use Flarum\Settings\SettingsRepositoryInterface;
|
use Flarum\Settings\SettingsRepositoryInterface;
|
||||||
|
|
||||||
|
|
|
@ -28,17 +28,17 @@ class WebAppAssets
|
||||||
* @var Application
|
* @var Application
|
||||||
*/
|
*/
|
||||||
protected $app;
|
protected $app;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Repository
|
* @var Repository
|
||||||
*/
|
*/
|
||||||
protected $cache;
|
protected $cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var LocaleManager
|
* @var LocaleManager
|
||||||
*/
|
*/
|
||||||
protected $locales;
|
protected $locales;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param Application $app
|
* @param Application $app
|
||||||
|
@ -52,7 +52,7 @@ class WebAppAssets
|
||||||
$this->cache = $cache;
|
$this->cache = $cache;
|
||||||
$this->locales = $locales;
|
$this->locales = $locales;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function flush()
|
public function flush()
|
||||||
{
|
{
|
||||||
$this->flushJs();
|
$this->flushJs();
|
||||||
|
|
|
@ -12,10 +12,7 @@ namespace Flarum\Http\WebApp;
|
||||||
|
|
||||||
use Flarum\Api\Client;
|
use Flarum\Api\Client;
|
||||||
use Flarum\Api\Serializer\AbstractSerializer;
|
use Flarum\Api\Serializer\AbstractSerializer;
|
||||||
use Flarum\Api\Serializer\CurrentUserSerializer;
|
|
||||||
use Flarum\Asset\CompilerInterface;
|
use Flarum\Asset\CompilerInterface;
|
||||||
use Flarum\Core\Exception\ValidationException;
|
|
||||||
use Flarum\Core\User;
|
|
||||||
use Flarum\Locale\JsCompiler;
|
use Flarum\Locale\JsCompiler;
|
||||||
use Flarum\Locale\LocaleManager;
|
use Flarum\Locale\LocaleManager;
|
||||||
use Illuminate\View\Factory;
|
use Illuminate\View\Factory;
|
||||||
|
@ -113,7 +110,7 @@ class WebAppView
|
||||||
protected $localeCss;
|
protected $localeCss;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ClientAssets
|
* @var WebAppAssets
|
||||||
*/
|
*/
|
||||||
protected $assets;
|
protected $assets;
|
||||||
|
|
||||||
|
@ -139,7 +136,7 @@ class WebAppView
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $layout
|
* @param string $layout
|
||||||
* @param ClientAssets $assets
|
* @param WebAppAssets $assets
|
||||||
* @param Client $api
|
* @param Client $api
|
||||||
* @param Factory $view
|
* @param Factory $view
|
||||||
* @param LocaleManager $locales
|
* @param LocaleManager $locales
|
||||||
|
@ -285,7 +282,7 @@ class WebAppView
|
||||||
|
|
||||||
return $view->render();
|
return $view->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function buildTitle($forumTitle)
|
protected function buildTitle($forumTitle)
|
||||||
{
|
{
|
||||||
return ($this->title ? $this->title.' - ' : '').$forumTitle;
|
return ($this->title ? $this->title.' - ' : '').$forumTitle;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user