@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))){ |
|
3 | +if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH))) { |
|
4 | 4 | return false; |
5 | 5 | } |
6 | 6 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getByEmail(string $email) |
41 | 41 | { |
42 | - return $this->select(['email' => $email])->current(); |
|
42 | + return $this->select([ 'email' => $email ])->current(); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -51,6 +51,6 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function updateLogin(string $uuid) : int |
53 | 53 | { |
54 | - return $this->update(['last_login' => date('Y-m-d H:i:s')], ['admin_user_uuid' => $uuid]); |
|
54 | + return $this->update([ 'last_login' => date('Y-m-d H:i:s') ], [ 'admin_user_uuid' => $uuid ]); |
|
55 | 55 | } |
56 | 56 | } |
@@ -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 |
@@ -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); |