@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $strConn = "mysql:host={$conf['host']};dbname={$conf['dbname']}"; |
| 32 | 32 | if (!R::testConnection()) { |
| 33 | 33 | R::setup($strConn, $conf['user'], $conf['pass']); |
| 34 | - R::ext('xdispense', function ($type) { |
|
| 34 | + R::ext('xdispense', function($type) { |
|
| 35 | 35 | return R::getRedBean()->dispense($type); |
| 36 | 36 | }); |
| 37 | 37 | R::freeze(true); |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public function loadMiddleware() |
| 17 | 17 | { |
| 18 | - $this->app->add(function ($request, $response, $next) { |
|
| 18 | + $this->app->add(function($request, $response, $next) { |
|
| 19 | 19 | $response = $response-> |
| 20 | 20 | withAddedHeader('Access-Control-Allow-Origin', $request->getHeader('Origin'))-> |
| 21 | 21 | withAddedHeader('Access-Control-Allow-Credentials', 'true')-> |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | return $response; |
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | - $this->app->add(function ($request, $response, $next) { |
|
| 32 | + $this->app->add(function($request, $response, $next) { |
|
| 33 | 33 | $response = $response-> |
| 34 | 34 | withHeader('Content-Type', 'application/vnd.seedapp.v1+json'); |
| 35 | 35 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function loadDependencies() |
| 21 | 21 | { |
| 22 | - $this->container['log'] = function ($container) { |
|
| 22 | + $this->container['log'] = function($container) { |
|
| 23 | 23 | $conf = $container->get('settings')['logger']; |
| 24 | 24 | $log = new Logger($conf['name']); |
| 25 | 25 | $log->pushHandler(new StreamHandler( |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | return $log; |
| 37 | 37 | }; |
| 38 | 38 | |
| 39 | - $this->container['error'] = function ($container) { |
|
| 39 | + $this->container['error'] = function($container) { |
|
| 40 | 40 | $error = new Error(); |
| 41 | 41 | $error->setCodeList([ |
| 42 | 42 | 1000 => [ |
@@ -48,8 +48,8 @@ discard block |
||
| 48 | 48 | return $error; |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | - $this->container['errorHandler'] = function ($container) { |
|
| 52 | - return function ($request, $response, $exception) use ($container) { |
|
| 51 | + $this->container['errorHandler'] = function($container) { |
|
| 52 | + return function($request, $response, $exception) use ($container) { |
|
| 53 | 53 | if ($exception instanceof ErrorCodeException) { |
| 54 | 54 | $container->get('log')->info('Error code ' . $exception->getCode()); |
| 55 | 55 | return $container->get('error')->handle($response, $exception->getCode()); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | }; |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | - $this->container['testDbConnection'] = function ($container) { |
|
| 60 | + $this->container['testDbConnection'] = function($container) { |
|
| 61 | 61 | $dbTest = $container->get('settings')['dbtest']; |
| 62 | 62 | return new \PDO( |
| 63 | 63 | "mysql:host={$dbTest['host']};dbname={$dbTest['dbname']}", |