mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Fixes to comply with PSR-2
This commit is contained in:
parent
ee8e30910b
commit
69038857fa
|
@ -37,7 +37,9 @@ abstract class JsonApiAction implements ActionInterface
|
|||
|
||||
protected function json($data = null, $status = 200)
|
||||
{
|
||||
if ($data === null) $data = new \ArrayObject();
|
||||
if ($data === null) {
|
||||
$data = new \ArrayObject();
|
||||
}
|
||||
|
||||
$data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class ApiServiceProvider extends ServiceProvider
|
|||
'Flarum\Api\ExceptionHandler'
|
||||
);
|
||||
|
||||
$this->app->singleton('Flarum\Http\Router', function() { return new Router(); });
|
||||
$this->app->singleton('Flarum\Http\Router');
|
||||
|
||||
include __DIR__.'/routes.php';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user