@@ -83,7 +83,7 @@ |
||
| 83 | 83 | */ |
| 84 | 84 | public function addRoutes(Router $router): void |
| 85 | 85 | { |
| 86 | - $router->group('/users', function (Router $router) { |
|
| 86 | + $router->group('/users', function(Router $router) { |
|
| 87 | 87 | $router->get('', ListAction::class, 'user_list', ['permission' => 'users']); |
| 88 | 88 | $router->get('/detail/{id:i}', DetailAction::class, 'user_detail'); |
| 89 | 89 | $router->post('/batch', BatchAction::class, 'user_batch'); |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | $this->template, |
| 196 | 196 | 'user/create', |
| 197 | 197 | [ |
| 198 | - 'param' => $formParam, |
|
| 199 | - 'status' => $statusList, |
|
| 200 | - 'roles' => $roles |
|
| 198 | + 'param' => $formParam, |
|
| 199 | + 'status' => $statusList, |
|
| 200 | + 'roles' => $roles |
|
| 201 | 201 | ] |
| 202 | 202 | ); |
| 203 | 203 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | 'role' => $formParam->getRole(), |
| 218 | 218 | ]); |
| 219 | 219 | |
| 220 | - //Handle roles |
|
| 220 | + //Handle roles |
|
| 221 | 221 | $rolesId = $param->post('roles', []); |
| 222 | 222 | if (!empty($rolesId)) { |
| 223 | 223 | $selectedRoles = $this->roleRepository->findAll(...$rolesId); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $this->template, |
| 235 | 235 | 'user/create', |
| 236 | 236 | [ |
| 237 | - 'param' => $formParam, |
|
| 237 | + 'param' => $formParam, |
|
| 238 | 238 | 'status' => $statusList, |
| 239 | 239 | 'roles' => $roles |
| 240 | 240 | ] |
@@ -147,7 +147,7 @@ |
||
| 147 | 147 | { |
| 148 | 148 | $param = new RequestData($request); |
| 149 | 149 | |
| 150 | - $items = $param->post('items', []); |
|
| 150 | + $items = $param->post('items', []); |
|
| 151 | 151 | if (empty($items)) { |
| 152 | 152 | return new RedirectResponse( |
| 153 | 153 | $this->routeHelper->generateUrl('user_list') |
@@ -64,8 +64,7 @@ |
||
| 64 | 64 | * @package Platine\Framework\Demo\Action\User |
| 65 | 65 | * @template T |
| 66 | 66 | */ |
| 67 | -class BatchAction implements RequestHandlerInterface |
|
| 68 | -{ |
|
| 67 | +class BatchAction implements RequestHandlerInterface { |
|
| 69 | 68 | |
| 70 | 69 | /** |
| 71 | 70 | * Logger instance |
@@ -212,10 +212,10 @@ |
||
| 212 | 212 | return $this; |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | - /** |
|
| 216 | - * Return the application root path |
|
| 217 | - * @return string |
|
| 218 | - */ |
|
| 215 | + /** |
|
| 216 | + * Return the application root path |
|
| 217 | + * @return string |
|
| 218 | + */ |
|
| 219 | 219 | public function getAppPath(): string |
| 220 | 220 | { |
| 221 | 221 | return $this->appPath; |
@@ -64,8 +64,7 @@ discard block |
||
| 64 | 64 | * @package Platine\Framework\App |
| 65 | 65 | * @template T |
| 66 | 66 | */ |
| 67 | -class Application extends Container |
|
| 68 | -{ |
|
| 67 | +class Application extends Container { |
|
| 69 | 68 | |
| 70 | 69 | /** |
| 71 | 70 | * The application version |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | * Create new instance |
| 131 | 130 | * @param string $basePath |
| 132 | 131 | */ |
| 133 | - public function __construct(string $basePath = '') |
|
| 134 | - { |
|
| 132 | + public function __construct(string $basePath = '') { |
|
| 135 | 133 | parent::__construct(); |
| 136 | 134 | $this->basePath = $basePath; |
| 137 | 135 | $this->loadCoreServiceProviders(); |
@@ -162,8 +160,7 @@ discard block |
||
| 162 | 160 | * @param string $env |
| 163 | 161 | * @return $this |
| 164 | 162 | */ |
| 165 | - public function setEnvironment(string $env) |
|
| 166 | - { |
|
| 163 | + public function setEnvironment(string $env) { |
|
| 167 | 164 | $this->env = $env; |
| 168 | 165 | |
| 169 | 166 | return $this; |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * @class CurrentUrlTag |
| 56 | 56 | * @package Platine\Framework\Template\Tag |
| 57 | 57 | */ |
| 58 | -class CurrentUrlTag extends AbstractTag |
|
| 59 | -{ |
|
| 58 | +class CurrentUrlTag extends AbstractTag { |
|
| 60 | 59 | |
| 61 | 60 | /** |
| 62 | 61 | * {@inheritdoc} |