@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | public function index(): HtmlResponse |
| 40 | 40 | { |
| 41 | 41 | $params = $this->request->getQueryParams(); |
| 42 | - $page = isset($params['page']) ? $params['page'] : 1; |
|
| 43 | - $limit = isset($params['limit']) ? $params['limit'] : 15; |
|
| 42 | + $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1; |
|
| 43 | + $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15; |
|
| 44 | 44 | $pagination = $this->pageService->getPagination($page, $limit); |
| 45 | 45 | |
| 46 | 46 | return new HtmlResponse($this->template->render('page::index', [ |
@@ -49,14 +49,14 @@ discard block |
||
| 49 | 49 | ])); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - public function edit($errors = []): HtmlResponse |
|
| 52 | + public function edit($errors = [ ]): HtmlResponse |
|
| 53 | 53 | { |
| 54 | 54 | $id = $this->request->getAttribute('id'); |
| 55 | 55 | $page = $this->pageService->getPage($id); |
| 56 | 56 | |
| 57 | - if($this->request->getParsedBody()) { |
|
| 57 | + if ($this->request->getParsedBody()) { |
|
| 58 | 58 | $page = new \Page\Entity\Page(); |
| 59 | - $page->exchangeArray($this->request->getParsedBody() + (array)$page); |
|
| 59 | + $page->exchangeArray($this->request->getParsedBody() + (array) $page); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return new HtmlResponse($this->template->render('page::edit', [ |
@@ -71,9 +71,9 @@ discard block |
||
| 71 | 71 | try { |
| 72 | 72 | $pageId = $this->request->getAttribute('id'); |
| 73 | 73 | $data = $this->request->getParsedBody(); |
| 74 | - $data += (new Request())->getFiles()->toArray(); |
|
| 74 | + $data += (new Request())->getFiles()->toArray(); |
|
| 75 | 75 | |
| 76 | - if($pageId) { |
|
| 76 | + if ($pageId) { |
|
| 77 | 77 | $this->pageService->updatePage($data, $pageId); |
| 78 | 78 | } |
| 79 | 79 | else { |
@@ -82,10 +82,10 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
| 84 | 84 | } |
| 85 | - catch(FilterException $fe) { |
|
| 85 | + catch (FilterException $fe) { |
|
| 86 | 86 | return $this->edit($fe->getArrayMessages()); |
| 87 | 87 | } |
| 88 | - catch(\Exception $e) { |
|
| 88 | + catch (\Exception $e) { |
|
| 89 | 89 | throw $e; |
| 90 | 90 | } |
| 91 | 91 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
| 100 | 100 | } |
| 101 | - catch(\Exception $e) { |
|
| 101 | + catch (\Exception $e) { |
|
| 102 | 102 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
| 103 | 103 | } |
| 104 | 104 | } |
@@ -17,65 +17,65 @@ |
||
| 17 | 17 | $inputFilter->add([ |
| 18 | 18 | 'name' => 'title', |
| 19 | 19 | 'required' => true, |
| 20 | - 'filters' => [['name' => 'StringTrim']], |
|
| 20 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 21 | 21 | 'validators' => [ |
| 22 | - ['name' => 'NotEmpty'], |
|
| 23 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
| 22 | + [ 'name' => 'NotEmpty' ], |
|
| 23 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
| 24 | 24 | ], |
| 25 | 25 | ]); |
| 26 | 26 | |
| 27 | 27 | $inputFilter->add([ |
| 28 | 28 | 'name' => 'slug', |
| 29 | 29 | 'required' => true, |
| 30 | - 'filters' => [['name' => 'StringTrim']], |
|
| 30 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 31 | 31 | 'validators' => [ |
| 32 | - ['name' => 'NotEmpty'], |
|
| 33 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
| 32 | + [ 'name' => 'NotEmpty' ], |
|
| 33 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
| 34 | 34 | ], |
| 35 | 35 | ]); |
| 36 | 36 | |
| 37 | 37 | $inputFilter->add([ |
| 38 | 38 | 'name' => 'body', |
| 39 | 39 | 'required' => true, |
| 40 | - 'filters' => [['name' => 'StringTrim']], |
|
| 40 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 41 | 41 | 'validators' => [ |
| 42 | - ['name' => 'NotEmpty'], |
|
| 43 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100000]], |
|
| 42 | + [ 'name' => 'NotEmpty' ], |
|
| 43 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100000 ] ], |
|
| 44 | 44 | ], |
| 45 | 45 | ]); |
| 46 | 46 | |
| 47 | 47 | $inputFilter->add([ |
| 48 | 48 | 'name' => 'description', |
| 49 | 49 | 'required' => true, |
| 50 | - 'filters' => [['name' => 'StringTrim']], |
|
| 50 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
| 51 | 51 | 'validators' => [ |
| 52 | - ['name' => 'NotEmpty'], |
|
| 53 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 50000]], |
|
| 52 | + [ 'name' => 'NotEmpty' ], |
|
| 53 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 50000 ] ], |
|
| 54 | 54 | ], |
| 55 | 55 | ]); |
| 56 | 56 | |
| 57 | 57 | $inputFilter->add([ |
| 58 | 58 | 'name' => 'has_layout', |
| 59 | 59 | 'required' => false, |
| 60 | - 'filters' => [['name' => 'Boolean']], |
|
| 60 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 61 | 61 | ]); |
| 62 | 62 | |
| 63 | 63 | $inputFilter->add([ |
| 64 | 64 | 'name' => 'is_homepage', |
| 65 | 65 | 'required' => false, |
| 66 | - 'filters' => [['name' => 'Boolean']], |
|
| 66 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 67 | 67 | ]); |
| 68 | 68 | |
| 69 | 69 | $inputFilter->add([ |
| 70 | 70 | 'name' => 'is_active', |
| 71 | 71 | 'required' => false, |
| 72 | - 'filters' => [['name' => 'Boolean']], |
|
| 72 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 73 | 73 | ]); |
| 74 | 74 | |
| 75 | 75 | $inputFilter->add([ |
| 76 | 76 | 'name' => 'is_wysiwyg_editor', |
| 77 | 77 | 'required' => false, |
| 78 | - 'filters' => [['name' => 'Boolean']], |
|
| 78 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
| 79 | 79 | ]); |
| 80 | 80 | |
| 81 | 81 | return $inputFilter; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | 'page/pagination' => __DIR__ . '/../templates/partial/pagination.php', |
| 15 | 15 | ], |
| 16 | 16 | 'paths' => [ |
| 17 | - 'page' => [__DIR__ . '/../templates/page'], |
|
| 17 | + 'page' => [ __DIR__ . '/../templates/page' ], |
|
| 18 | 18 | ], |
| 19 | 19 | ], |
| 20 | 20 | |
@@ -32,13 +32,13 @@ discard block |
||
| 32 | 32 | 'name' => 'admin.pages', |
| 33 | 33 | 'path' => '/admin/pages', |
| 34 | 34 | 'middleware' => Controller\PageController::class, |
| 35 | - 'allowed_methods' => ['GET'], |
|
| 35 | + 'allowed_methods' => [ 'GET' ], |
|
| 36 | 36 | ], |
| 37 | 37 | [ |
| 38 | 38 | 'name' => 'admin.pages.action', |
| 39 | 39 | 'path' => '/admin/pages/:action/:id', |
| 40 | 40 | 'middleware' => Controller\PageController::class, |
| 41 | - 'allowed_methods' => ['GET', 'POST'] |
|
| 41 | + 'allowed_methods' => [ 'GET', 'POST' ] |
|
| 42 | 42 | ] |
| 43 | 43 | ], |
| 44 | 44 | ]; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | public function getDescription($limit = null) |
| 112 | 112 | { |
| 113 | - if(!$limit) { |
|
| 113 | + if (!$limit) { |
|
| 114 | 114 | return $this->description; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public function getCreatedAt($format = null) |
| 167 | 167 | { |
| 168 | - if(!$format) { |
|
| 168 | + if (!$format) { |
|
| 169 | 169 | return $this->created_at; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -183,10 +183,10 @@ discard block |
||
| 183 | 183 | * |
| 184 | 184 | * @param array $data |
| 185 | 185 | */ |
| 186 | - public function exchangeArray($data = []) |
|
| 186 | + public function exchangeArray($data = [ ]) |
|
| 187 | 187 | { |
| 188 | - foreach(array_keys(get_object_vars($this)) as $property) { |
|
| 189 | - $this->{$property} = isset($data[$property]) ? $data[$property] : null; |
|
| 188 | + foreach (array_keys(get_object_vars($this)) as $property) { |
|
| 189 | + $this->{$property} = isset($data[ $property ]) ? $data[ $property ] : null; |
|
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
@@ -194,18 +194,18 @@ discard block |
||
| 194 | 194 | public function getArrayCopy() |
| 195 | 195 | { |
| 196 | 196 | return [ |
| 197 | - 'page_uuid' => (binary)$this->page_uuid, |
|
| 198 | - 'page_id' => (string)$this->page_id, |
|
| 199 | - 'title' => (string)$this->title, |
|
| 200 | - 'body' => (string)$this->body, |
|
| 201 | - 'description' => (string)$this->description, |
|
| 202 | - 'main_img' => (string)$this->main_img, |
|
| 203 | - 'has_layout' => (boolean)$this->has_layout, |
|
| 204 | - 'is_homepage' => (boolean)$this->is_homepage, |
|
| 205 | - 'is_active' => (boolean)$this->is_active, |
|
| 206 | - 'is_wysiwyg_editor' => (boolean)$this->is_wysiwyg_editor, |
|
| 207 | - 'created_at' => (string)$this->created_at, |
|
| 208 | - 'slug' => (string)$this->slug |
|
| 197 | + 'page_uuid' => (binary) $this->page_uuid, |
|
| 198 | + 'page_id' => (string) $this->page_id, |
|
| 199 | + 'title' => (string) $this->title, |
|
| 200 | + 'body' => (string) $this->body, |
|
| 201 | + 'description' => (string) $this->description, |
|
| 202 | + 'main_img' => (string) $this->main_img, |
|
| 203 | + 'has_layout' => (boolean) $this->has_layout, |
|
| 204 | + 'is_homepage' => (boolean) $this->is_homepage, |
|
| 205 | + 'is_active' => (boolean) $this->is_active, |
|
| 206 | + 'is_wysiwyg_editor' => (boolean) $this->is_wysiwyg_editor, |
|
| 207 | + 'created_at' => (string) $this->created_at, |
|
| 208 | + 'slug' => (string) $this->slug |
|
| 209 | 209 | ]; |
| 210 | 210 | } |
| 211 | 211 | |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | </div> |
| 8 | 8 | </div> |
| 9 | 9 | <div class="col-sm-7"> |
| 10 | - <?php if($this->pageCount > 1): ?> |
|
| 10 | + <?php if ($this->pageCount > 1): ?> |
|
| 11 | 11 | <div class="pull-right"> |
| 12 | 12 | <ul class="pagination" style="margin:0px;"> |
| 13 | 13 | <!-- Previous page link --> |
| 14 | - <?php if(isset($this->previous)): ?> |
|
| 14 | + <?php if (isset($this->previous)): ?> |
|
| 15 | 15 | <li> |
| 16 | - <a href="<?php echo $this->url($this->route, isset($this->data) ? $this->data : []); ?>?page=<?php echo $this->previous; ?>"> |
|
| 16 | + <a href="<?php echo $this->url($this->route, isset($this->data) ? $this->data : [ ]); ?>?page=<?php echo $this->previous; ?>"> |
|
| 17 | 17 | <span class="glyphicon glyphicon-chevron-left"></span> |
| 18 | 18 | </a> |
| 19 | 19 | </li> |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | <?php endif; ?> |
| 27 | 27 | |
| 28 | 28 | <!-- Numbered page links --> |
| 29 | - <?php foreach($this->pagesInRange as $page): ?> |
|
| 30 | - <?php if($page != $this->current): ?> |
|
| 29 | + <?php foreach ($this->pagesInRange as $page): ?> |
|
| 30 | + <?php if ($page != $this->current): ?> |
|
| 31 | 31 | <li> |
| 32 | - <a href="<?php echo $this->url($this->route, isset($this->data) ? $this->data : []); ?>?page=<?php echo $page; ?>"> |
|
| 32 | + <a href="<?php echo $this->url($this->route, isset($this->data) ? $this->data : [ ]); ?>?page=<?php echo $page; ?>"> |
|
| 33 | 33 | <?php echo $page; ?> |
| 34 | 34 | </a> |
| 35 | 35 | </li> |
@@ -41,9 +41,9 @@ discard block |
||
| 41 | 41 | <?php endforeach; ?> |
| 42 | 42 | |
| 43 | 43 | <!-- Next page link --> |
| 44 | - <?php if(isset($this->next)): ?> |
|
| 44 | + <?php if (isset($this->next)): ?> |
|
| 45 | 45 | <li> |
| 46 | - <a href="<?php echo $this->url($this->route, isset($this->data) ? $this->data : []); ?>?page=<?php echo $this->next; ?>"> |
|
| 46 | + <a href="<?php echo $this->url($this->route, isset($this->data) ? $this->data : [ ]); ?>?page=<?php echo $this->next; ?>"> |
|
| 47 | 47 | <span class="glyphicon glyphicon-chevron-right"></span> |
| 48 | 48 | </a> |
| 49 | 49 | </li> |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | |
| 4 | 4 | namespace Admin\Controller; |
| 5 | 5 | |
@@ -60,11 +60,11 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function login($error = false): \Psr\Http\Message\ResponseInterface |
| 62 | 62 | { |
| 63 | - if($this->session->getStorage()->user) { |
|
| 63 | + if ($this->session->getStorage()->user) { |
|
| 64 | 64 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin')); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - return new HtmlResponse($this->template->render('admin::login', ['layout' => false, 'error' => $error])); |
|
| 67 | + return new HtmlResponse($this->template->render('admin::login', [ 'layout' => false, 'error' => $error ])); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -74,20 +74,20 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function loginHandle(): \Psr\Http\Message\ResponseInterface |
| 76 | 76 | { |
| 77 | - if($this->session->getStorage()->user) { |
|
| 77 | + if ($this->session->getStorage()->user) { |
|
| 78 | 78 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin')); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $data = $this->request->getParsedBody(); |
| 82 | - $email = isset($data['email']) ? $data['email'] : null; |
|
| 83 | - $password = isset($data['password']) ? $data['password'] : null; |
|
| 82 | + $email = isset($data[ 'email' ]) ? $data[ 'email' ] : null; |
|
| 83 | + $password = isset($data[ 'password' ]) ? $data[ 'password' ] : null; |
|
| 84 | 84 | |
| 85 | 85 | try { |
| 86 | 86 | $this->session->getStorage()->user = $this->adminUserService->loginUser($email, $password); |
| 87 | 87 | |
| 88 | 88 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin')); |
| 89 | 89 | } |
| 90 | - catch(\Exception $e) { |
|
| 90 | + catch (\Exception $e) { |
|
| 91 | 91 | return $this->login($e->getMessage()); |
| 92 | 92 | |
| 93 | 93 | //@todo set $e->getMessage() to flash messanger and print messages in next page |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Admin\Controller; |
| 6 | 6 | |
@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | $user = $this->session->getStorage()->user; |
| 66 | 66 | $params = $this->request->getQueryParams(); |
| 67 | - $page = isset($params['page']) ? $params['page'] : 1; |
|
| 68 | - $limit = isset($params['limit']) ? $params['limit'] : 15; |
|
| 67 | + $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1; |
|
| 68 | + $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15; |
|
| 69 | 69 | |
| 70 | 70 | $adminUsers = $this->adminUserService->getPagination($page, $limit, $user->admin_user_id); |
| 71 | 71 | |
| 72 | - return new HtmlResponse($this->template->render('admin::user/index', ['list' => $adminUsers, 'layout' => 'layout/admin'])); |
|
| 72 | + return new HtmlResponse($this->template->render('admin::user/index', [ 'list' => $adminUsers, 'layout' => 'layout/admin' ])); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
@@ -77,13 +77,13 @@ discard block |
||
| 77 | 77 | * |
| 78 | 78 | * @return \Psr\Http\Message\ResponseInterface |
| 79 | 79 | */ |
| 80 | - public function edit($errors = []): \Psr\Http\Message\ResponseInterface |
|
| 80 | + public function edit($errors = [ ]): \Psr\Http\Message\ResponseInterface |
|
| 81 | 81 | { |
| 82 | 82 | $id = $this->request->getAttribute('id'); |
| 83 | 83 | $user = $this->adminUserService->getUser($id); |
| 84 | 84 | |
| 85 | - if($this->request->getParsedBody()) { |
|
| 86 | - $user = (object)($this->request->getParsedBody() + (array)$user); |
|
| 85 | + if ($this->request->getParsedBody()) { |
|
| 86 | + $user = (object) ($this->request->getParsedBody() + (array) $user); |
|
| 87 | 87 | $user->admin_user_id = $id; |
| 88 | 88 | } |
| 89 | 89 | |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | try { |
| 100 | 100 | $userId = $this->request->getAttribute('id'); |
| 101 | 101 | $data = $this->request->getParsedBody(); |
| 102 | - $data += (new Request())->getFiles()->toArray(); |
|
| 102 | + $data += (new Request())->getFiles()->toArray(); |
|
| 103 | 103 | |
| 104 | - if($userId) { |
|
| 104 | + if ($userId) { |
|
| 105 | 105 | $this->adminUserService->updateUser($data, $userId); |
| 106 | 106 | } |
| 107 | 107 | else { |
@@ -110,10 +110,10 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
| 112 | 112 | } |
| 113 | - catch(FilterException $fe) { |
|
| 113 | + catch (FilterException $fe) { |
|
| 114 | 114 | return $this->edit($fe->getArrayMessages()); |
| 115 | 115 | } |
| 116 | - catch(\Exception $e) { |
|
| 116 | + catch (\Exception $e) { |
|
| 117 | 117 | throw $e; |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
| 128 | 128 | } |
| 129 | - catch(\Exception $e) { |
|
| 129 | + catch (\Exception $e) { |
|
| 130 | 130 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.users')); |
| 131 | 131 | } |
| 132 | 132 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | 'admin/pagination' => __DIR__ . '/../templates/admin/partial/pagination.phtml', |
| 14 | 14 | ], |
| 15 | 15 | 'paths' => [ |
| 16 | - 'admin' => [__DIR__ . '/../templates/admin'], |
|
| 16 | + 'admin' => [ __DIR__ . '/../templates/admin' ], |
|
| 17 | 17 | ], |
| 18 | 18 | ], |
| 19 | 19 | |
@@ -30,25 +30,25 @@ discard block |
||
| 30 | 30 | 'name' => 'auth', |
| 31 | 31 | 'path' => '/auth/:action', |
| 32 | 32 | 'middleware' => Controller\AuthController::class, |
| 33 | - 'allowed_methods' => ['GET', 'POST'], |
|
| 33 | + 'allowed_methods' => [ 'GET', 'POST' ], |
|
| 34 | 34 | ], |
| 35 | 35 | [ |
| 36 | 36 | 'name' => 'admin', |
| 37 | 37 | 'path' => '/admin', |
| 38 | 38 | 'middleware' => Action\IndexAction::class, |
| 39 | - 'allowed_methods' => ['GET'], |
|
| 39 | + 'allowed_methods' => [ 'GET' ], |
|
| 40 | 40 | ], |
| 41 | 41 | [ |
| 42 | 42 | 'name' => 'admin.users', |
| 43 | 43 | 'path' => '/admin/users', |
| 44 | 44 | 'middleware' => Controller\UserController::class, |
| 45 | - 'allowed_methods' => ['GET'] |
|
| 45 | + 'allowed_methods' => [ 'GET' ] |
|
| 46 | 46 | ], |
| 47 | 47 | [ |
| 48 | 48 | 'name' => 'admin.users.action', |
| 49 | 49 | 'path' => '/admin/users/:action/:id', |
| 50 | 50 | 'middleware' => Controller\UserController::class, |
| 51 | - 'allowed_methods' => ['GET', 'POST'] |
|
| 51 | + 'allowed_methods' => [ 'GET', 'POST' ] |
|
| 52 | 52 | ], |
| 53 | 53 | ], |
| 54 | 54 | |
@@ -39,6 +39,6 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public function __invoke(Request $request, Response $response, callable $next = null) |
| 41 | 41 | { |
| 42 | - return new HtmlResponse($this->template->render('admin::index', ['layout' => 'layout/admin'])); |
|
| 42 | + return new HtmlResponse($this->template->render('admin::index', [ 'layout' => 'layout/admin' ])); |
|
| 43 | 43 | } |
| 44 | 44 | } |