From 05cecf080e22565d9326a6c236d86cf9b96ac009 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 --- src/Api/Actions/JsonApiAction.php | 4 +++- src/Api/ApiServiceProvider.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Api/Actions/JsonApiAction.php b/src/Api/Actions/JsonApiAction.php index 734fb573a..e5d4b7c6c 100644 --- a/src/Api/Actions/JsonApiAction.php +++ b/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/src/Api/ApiServiceProvider.php b/src/Api/ApiServiceProvider.php index 0f6fe8fa4..72dd2109f 100644 --- a/src/Api/ApiServiceProvider.php +++ b/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'; }