@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | ->disableOriginalConstructor() |
| 11 | 11 | ->getMockForAbstractClass(); |
| 12 | 12 | $container = $this->getMockBuilder(\Interop\Container\ContainerInterface::class) |
| 13 | - ->setMethods(['get']) |
|
| 13 | + ->setMethods([ 'get' ]) |
|
| 14 | 14 | ->getMockForAbstractClass(); |
| 15 | 15 | $container->expects(static::at(0)) |
| 16 | 16 | ->method('get') |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | /** |
| 13 | 13 | * Fetches a list of ArticleEntity models. |
| 14 | 14 | * |
| 15 | - * @param array $params |
|
| 16 | 15 | * @return \ArrayObject |
| 17 | 16 | */ |
| 18 | 17 | public function fetchAllArticles($page, $limit); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Std; |
| 4 | 4 | |
| 5 | 5 | use Psr\Http\Message\ResponseInterface as Response; |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Std; |
| 4 | 4 | |
| 5 | 5 | class FilterException extends \Exception |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Admin; |
| 4 | 4 | |
| 5 | 5 | class ConfigProvider |
@@ -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 | |
@@ -37,25 +37,25 @@ discard block |
||
| 37 | 37 | 'name' => 'auth', |
| 38 | 38 | 'path' => '/auth/:action', |
| 39 | 39 | 'middleware' => Controller\AuthController::class, |
| 40 | - 'allowed_methods' => ['GET', 'POST'], |
|
| 40 | + 'allowed_methods' => [ 'GET', 'POST' ], |
|
| 41 | 41 | ], |
| 42 | 42 | [ |
| 43 | 43 | 'name' => 'admin', |
| 44 | 44 | 'path' => '/admin', |
| 45 | 45 | 'middleware' => Action\IndexAction::class, |
| 46 | - 'allowed_methods' => ['GET'], |
|
| 46 | + 'allowed_methods' => [ 'GET' ], |
|
| 47 | 47 | ], |
| 48 | 48 | [ |
| 49 | 49 | 'name' => 'admin.users', |
| 50 | 50 | 'path' => '/admin/users', |
| 51 | 51 | 'middleware' => Controller\UserController::class, |
| 52 | - 'allowed_methods' => ['GET'] |
|
| 52 | + 'allowed_methods' => [ 'GET' ] |
|
| 53 | 53 | ], |
| 54 | 54 | [ |
| 55 | 55 | 'name' => 'admin.users.action', |
| 56 | 56 | 'path' => '/admin/users/:action/:id', |
| 57 | 57 | 'middleware' => Controller\UserController::class, |
| 58 | - 'allowed_methods' => ['GET', 'POST'] |
|
| 58 | + 'allowed_methods' => [ 'GET', 'POST' ] |
|
| 59 | 59 | ], |
| 60 | 60 | ], |
| 61 | 61 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | 'middleware_pipeline' => [ |
| 70 | 70 | // execute this middleware on every /admin[*] path |
| 71 | 71 | 'permission' => [ |
| 72 | - 'middleware' => [Middleware\AdminAuth::class], |
|
| 72 | + 'middleware' => [ Middleware\AdminAuth::class ], |
|
| 73 | 73 | 'priority' => 100, |
| 74 | 74 | 'path' => '/admin' |
| 75 | 75 | ], |
@@ -67,14 +67,14 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $user = $this->session->getStorage()->user; |
| 69 | 69 | $params = $this->request->getQueryParams(); |
| 70 | - $page = isset($params['page']) ? $params['page'] : 1; |
|
| 71 | - $limit = isset($params['limit']) ? $params['limit'] : 15; |
|
| 70 | + $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1; |
|
| 71 | + $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15; |
|
| 72 | 72 | |
| 73 | 73 | $adminUsers = $this->adminUserService->getPagination($page, $limit, $user->admin_user_id); |
| 74 | 74 | |
| 75 | 75 | return new HtmlResponse($this->template->render( |
| 76 | 76 | 'admin::user/index', |
| 77 | - ['list' => $adminUsers, 'layout' => 'layout/admin']) |
|
| 77 | + [ 'list' => $adminUsers, 'layout' => 'layout/admin' ]) |
|
| 78 | 78 | ); |
| 79 | 79 | } |
| 80 | 80 | |
@@ -83,13 +83,13 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @return \Psr\Http\Message\ResponseInterface |
| 85 | 85 | */ |
| 86 | - public function edit($errors = []): \Psr\Http\Message\ResponseInterface |
|
| 86 | + public function edit($errors = [ ]): \Psr\Http\Message\ResponseInterface |
|
| 87 | 87 | { |
| 88 | 88 | $id = $this->request->getAttribute('id'); |
| 89 | 89 | $user = $this->adminUserService->getUser($id); |
| 90 | 90 | |
| 91 | 91 | if ($this->request->getParsedBody()) { |
| 92 | - $user = (object)($this->request->getParsedBody() + (array)$user); |
|
| 92 | + $user = (object) ($this->request->getParsedBody() + (array) $user); |
|
| 93 | 93 | $user->admin_user_id = $id; |
| 94 | 94 | } |
| 95 | 95 | |