@@ -59,8 +59,7 @@ |
||
| 59 | 59 | * @package Platine\Framework\Demo\Action\User |
| 60 | 60 | * @template T |
| 61 | 61 | */ |
| 62 | -class LogoutAction implements RequestHandlerInterface |
|
| 63 | -{ |
|
| 62 | +class LogoutAction implements RequestHandlerInterface { |
|
| 64 | 63 | /** |
| 65 | 64 | * The route helper instance |
| 66 | 65 | * @var RouteHelper |
@@ -109,10 +109,10 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | protected RouteHelper $routeHelper; |
| 111 | 111 | |
| 112 | - /** |
|
| 113 | - * The password hash to be used |
|
| 114 | - * @var HashInterface |
|
| 115 | - */ |
|
| 112 | + /** |
|
| 113 | + * The password hash to be used |
|
| 114 | + * @var HashInterface |
|
| 115 | + */ |
|
| 116 | 116 | protected HashInterface $hash; |
| 117 | 117 | |
| 118 | 118 | /** |
@@ -217,9 +217,9 @@ discard block |
||
| 217 | 217 | $this->template, |
| 218 | 218 | 'user/edit', |
| 219 | 219 | [ |
| 220 | - 'param' => $formParam, |
|
| 221 | - 'status' => $statusList, |
|
| 222 | - 'roles' => $roles |
|
| 220 | + 'param' => $formParam, |
|
| 221 | + 'status' => $statusList, |
|
| 222 | + 'roles' => $roles |
|
| 223 | 223 | ] |
| 224 | 224 | ); |
| 225 | 225 | } |
@@ -262,9 +262,9 @@ discard block |
||
| 262 | 262 | $this->template, |
| 263 | 263 | 'user/edit', |
| 264 | 264 | [ |
| 265 | - 'param' => $formParam, |
|
| 266 | - 'status' => $statusList, |
|
| 267 | - 'roles' => $roles |
|
| 265 | + 'param' => $formParam, |
|
| 266 | + 'status' => $statusList, |
|
| 267 | + 'roles' => $roles |
|
| 268 | 268 | ] |
| 269 | 269 | ); |
| 270 | 270 | } |
@@ -70,8 +70,7 @@ |
||
| 70 | 70 | * @package Platine\Framework\Demo\Action\User |
| 71 | 71 | * @template T |
| 72 | 72 | */ |
| 73 | -class EditAction implements RequestHandlerInterface |
|
| 74 | -{ |
|
| 73 | +class EditAction implements RequestHandlerInterface { |
|
| 75 | 74 | |
| 76 | 75 | /** |
| 77 | 76 | * The logger instance |
@@ -59,8 +59,7 @@ |
||
| 59 | 59 | * @package Platine\Framework\Demo\Action |
| 60 | 60 | * @template T |
| 61 | 61 | */ |
| 62 | -class HomeAction implements RequestHandlerInterface |
|
| 63 | -{ |
|
| 62 | +class HomeAction implements RequestHandlerInterface { |
|
| 64 | 63 | /** |
| 65 | 64 | * The template instance |
| 66 | 65 | * @var Template |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class RepositoryServiceProvider |
| 54 | 54 | * @package Platine\Framework |
| 55 | 55 | */ |
| 56 | -class RepositoryServiceProvider extends ServiceProvider |
|
| 57 | -{ |
|
| 56 | +class RepositoryServiceProvider extends ServiceProvider { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * {@inheritdoc} |
@@ -61,8 +61,7 @@ |
||
| 61 | 61 | * @class UserServiceProvider |
| 62 | 62 | * @package Platine\Framework |
| 63 | 63 | */ |
| 64 | -class UserServiceProvider extends ServiceProvider |
|
| 65 | -{ |
|
| 64 | +class UserServiceProvider extends ServiceProvider { |
|
| 66 | 65 | |
| 67 | 66 | /** |
| 68 | 67 | * {@inheritdoc} |
@@ -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'); |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class AppServiceProvider |
| 55 | 55 | * @package Platine\Framework |
| 56 | 56 | */ |
| 57 | -class AppServiceProvider extends ServiceProvider |
|
| 58 | -{ |
|
| 57 | +class AppServiceProvider extends ServiceProvider { |
|
| 59 | 58 | |
| 60 | 59 | /** |
| 61 | 60 | * {@inheritdoc} |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class AuthParam |
| 54 | 54 | * @package Platine\Framework\Demo\Form\Param |
| 55 | 55 | */ |
| 56 | -class AuthParam extends BaseParam |
|
| 57 | -{ |
|
| 56 | +class AuthParam extends BaseParam { |
|
| 58 | 57 | /** |
| 59 | 58 | * The username |
| 60 | 59 | * @var string |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class UserParam |
| 55 | 55 | * @package Platine\Framework\Demo\Form\Param |
| 56 | 56 | */ |
| 57 | -class UserParam extends BaseParam |
|
| 58 | -{ |
|
| 57 | +class UserParam extends BaseParam { |
|
| 59 | 58 | /** |
| 60 | 59 | * The username |
| 61 | 60 | * @var string |
@@ -100,37 +100,37 @@ |
||
| 100 | 100 | public function setRules(): void |
| 101 | 101 | { |
| 102 | 102 | $this->validator->addRules('username', [ |
| 103 | - new NotEmpty(), |
|
| 104 | - new MinLength(3), |
|
| 105 | - new AlphaDash() |
|
| 103 | + new NotEmpty(), |
|
| 104 | + new MinLength(3), |
|
| 105 | + new AlphaDash() |
|
| 106 | 106 | ]); |
| 107 | 107 | |
| 108 | 108 | $this->validator->addRules('lastname', [ |
| 109 | - new NotEmpty(), |
|
| 110 | - new MinLength(3) |
|
| 109 | + new NotEmpty(), |
|
| 110 | + new MinLength(3) |
|
| 111 | 111 | ]); |
| 112 | 112 | |
| 113 | 113 | $this->validator->addRules('firstname', [ |
| 114 | - new NotEmpty(), |
|
| 115 | - new MinLength(3) |
|
| 114 | + new NotEmpty(), |
|
| 115 | + new MinLength(3) |
|
| 116 | 116 | ]); |
| 117 | 117 | |
| 118 | 118 | $this->validator->addRules('status', [ |
| 119 | - new NotEmpty(), |
|
| 120 | - new InList([0, 1]) |
|
| 119 | + new NotEmpty(), |
|
| 120 | + new InList([0, 1]) |
|
| 121 | 121 | ]); |
| 122 | 122 | |
| 123 | 123 | $this->validator->addRules('email', [ |
| 124 | - new NotEmpty(), |
|
| 125 | - new Email() |
|
| 124 | + new NotEmpty(), |
|
| 125 | + new Email() |
|
| 126 | 126 | ]); |
| 127 | 127 | |
| 128 | 128 | $this->validator->addRules('role', [ |
| 129 | - new MinLength(3) |
|
| 129 | + new MinLength(3) |
|
| 130 | 130 | ]); |
| 131 | 131 | |
| 132 | 132 | $this->validator->addRules('password', [ |
| 133 | - new MinLength(5), |
|
| 133 | + new MinLength(5), |
|
| 134 | 134 | ]); |
| 135 | 135 | } |
| 136 | 136 | } |
@@ -60,8 +60,7 @@ discard block |
||
| 60 | 60 | * @class UserValidator |
| 61 | 61 | * @package Platine\Framework\Demo\Form\Validator |
| 62 | 62 | */ |
| 63 | -class UserValidator extends AbstractValidator |
|
| 64 | -{ |
|
| 63 | +class UserValidator extends AbstractValidator { |
|
| 65 | 64 | |
| 66 | 65 | /** |
| 67 | 66 | * The parameter instance |
@@ -74,8 +73,7 @@ discard block |
||
| 74 | 73 | * @param UserParam $param |
| 75 | 74 | * @param Validator|null $validator |
| 76 | 75 | */ |
| 77 | - public function __construct(UserParam $param, ?Validator $validator = null) |
|
| 78 | - { |
|
| 76 | + public function __construct(UserParam $param, ?Validator $validator = null) { |
|
| 79 | 77 | parent::__construct($validator); |
| 80 | 78 | $this->param = $param; |
| 81 | 79 | } |