@@ -54,7 +54,7 @@ |
||
| 54 | 54 | if (!$user) { |
| 55 | 55 | return $response->withStatus(302)->withHeader( |
| 56 | 56 | 'Location', |
| 57 | - $this->router->generateUri('auth', ['action' => 'login']) |
|
| 57 | + $this->router->generateUri('auth', [ 'action' => 'login' ]) |
|
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -82,8 +82,8 @@ |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | $data = $this->request->getParsedBody(); |
| 85 | - $email = isset($data['email']) ? $data['email'] : null; |
|
| 86 | - $password = isset($data['password']) ? $data['password'] : null; |
|
| 85 | + $email = isset($data[ 'email' ]) ? $data[ 'email' ] : null; |
|
| 86 | + $password = isset($data[ 'password' ]) ? $data[ 'password' ] : null; |
|
| 87 | 87 | |
| 88 | 88 | try { |
| 89 | 89 | $this->session->getStorage()->user = $this->adminUserService->loginUser($email, $password); |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | ResponseInterface $response, |
| 28 | 28 | callable $next = null |
| 29 | 29 | ) : JsonResponse { |
| 30 | - return new JsonResponse(['ack' => time()]); |
|
| 30 | + return new JsonResponse([ 'ack' => time() ]); |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | public function __invoke(Request $request, Response $response, callable $next = null) |
| 49 | 49 | { |
| 50 | 50 | if (0 === strpos($request->getUri()->getPath(), '/admin')) { |
| 51 | - $this->config['templates']['layout'] = 'layout/admin'; |
|
| 51 | + $this->config[ 'templates' ][ 'layout' ] = 'layout/admin'; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | return $next($request, $response); |