mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Applied fixes from StyleCI
This commit is contained in:
@@ -52,7 +52,7 @@ class AbstractUrlGenerator
|
||||
$path = $this->routes->getPath($name, $parameters);
|
||||
$path = ltrim($path, '/');
|
||||
|
||||
return $this->toBase() . '/' . $path;
|
||||
return $this->toBase().'/'.$path;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ class AbstractUrlGenerator
|
||||
*/
|
||||
public function toPath($path)
|
||||
{
|
||||
return $this->toBase() . '/' . $path;
|
||||
return $this->toBase().'/'.$path;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -14,7 +14,6 @@ use Flarum\Api\Client;
|
||||
use Flarum\Asset\AssetManager;
|
||||
use Flarum\Asset\JsCompiler;
|
||||
use Flarum\Asset\LessCompiler;
|
||||
use Flarum\Core;
|
||||
use Flarum\Event\ConfigureClientView;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Locale\JsCompiler as LocaleJsCompiler;
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
namespace Flarum\Http\Controller;
|
||||
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Zend\Diactoros\Response;
|
||||
|
||||
|
@@ -13,9 +13,9 @@ namespace Flarum\Http\Controller;
|
||||
use Flarum\Api\Client;
|
||||
use Flarum\Asset\AssetManager;
|
||||
use Flarum\Core\User;
|
||||
use Flarum\Locale\JsCompiler;
|
||||
use Illuminate\Contracts\Support\Renderable;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Flarum\Locale\JsCompiler;
|
||||
|
||||
/**
|
||||
* This class represents a view which boots up Flarum's client.
|
||||
@@ -255,7 +255,7 @@ class ClientView implements Renderable
|
||||
|
||||
$noJs = array_get($this->request->getQueryParams(), 'nojs');
|
||||
|
||||
$view->title = ($this->title ? $this->title . ' - ' : '') . $forum->data->attributes->title;
|
||||
$view->title = ($this->title ? $this->title.' - ' : '').$forum->data->attributes->title;
|
||||
$view->forum = $forum->data;
|
||||
$view->layout = app('view')->file($this->layout, [
|
||||
'forum' => $forum->data,
|
||||
|
@@ -27,7 +27,7 @@ trait GenerateRouteHandlerTrait
|
||||
|
||||
if (! ($controller instanceof ControllerInterface)) {
|
||||
throw new \InvalidArgumentException('Route handler must be an instance of '
|
||||
. ControllerInterface::class);
|
||||
.ControllerInterface::class);
|
||||
}
|
||||
|
||||
$request = $request->withQueryParams(array_merge($request->getQueryParams(), $routeParams));
|
||||
|
@@ -10,7 +10,6 @@
|
||||
|
||||
namespace Flarum\Http\Middleware;
|
||||
|
||||
use DateTime;
|
||||
use Flarum\Api\ApiKey;
|
||||
use Flarum\Core\User;
|
||||
use Flarum\Http\AccessToken;
|
||||
|
@@ -12,7 +12,6 @@
|
||||
namespace Flarum\Http\Middleware;
|
||||
|
||||
use FastRoute\Dispatcher;
|
||||
use FastRoute\RouteParser;
|
||||
use Flarum\Http\Exception\MethodNotAllowedException;
|
||||
use Flarum\Http\Exception\RouteNotFoundException;
|
||||
use Flarum\Http\RouteCollection;
|
||||
|
@@ -10,11 +10,11 @@
|
||||
|
||||
namespace Flarum\Http\Middleware;
|
||||
|
||||
use Franzl\Middleware\Whoops\ErrorMiddleware as WhoopsMiddleware;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
use Zend\Stratigility\ErrorMiddlewareInterface;
|
||||
use Franzl\Middleware\Whoops\ErrorMiddleware as WhoopsMiddleware;
|
||||
|
||||
class HandleErrors implements ErrorMiddlewareInterface
|
||||
{
|
||||
|
@@ -92,7 +92,7 @@ class RouteCollection
|
||||
$parts = $this->reverse[$name][0];
|
||||
array_walk($parts, [$this, 'fixPathPart'], $parameters);
|
||||
|
||||
return '/' . ltrim(implode('', $parts), '/');
|
||||
return '/'.ltrim(implode('', $parts), '/');
|
||||
}
|
||||
|
||||
throw new \RuntimeException("Route $name not found");
|
||||
|
Reference in New Issue
Block a user