From 69038857fa8edeb149af87efe0686abebb50142e Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 27 May 2015 02:37:27 +0200 Subject: [PATCH] Fixes to comply with PSR-2 --- framework/core/src/Api/Actions/JsonApiAction.php | 4 +++- framework/core/src/Api/ApiServiceProvider.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/core/src/Api/Actions/JsonApiAction.php b/framework/core/src/Api/Actions/JsonApiAction.php index 734fb573a..e5d4b7c6c 100644 --- a/framework/core/src/Api/Actions/JsonApiAction.php +++ b/framework/core/src/Api/Actions/JsonApiAction.php @@ -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); diff --git a/framework/core/src/Api/ApiServiceProvider.php b/framework/core/src/Api/ApiServiceProvider.php index 0f6fe8fa4..72dd2109f 100644 --- a/framework/core/src/Api/ApiServiceProvider.php +++ b/framework/core/src/Api/ApiServiceProvider.php @@ -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'; }