@@ -14,9 +14,9 @@ |
||
14 | 14 | class StatusList |
15 | 15 | { |
16 | 16 | /** |
17 | - * The Language instance |
|
18 | - * @var Lang |
|
19 | - */ |
|
17 | + * The Language instance |
|
18 | + * @var Lang |
|
19 | + */ |
|
20 | 20 | protected Lang $lang; |
21 | 21 | |
22 | 22 | /** |
@@ -11,8 +11,7 @@ discard block |
||
11 | 11 | * @class AuthParam |
12 | 12 | * @package Platine\App\Param |
13 | 13 | */ |
14 | -class StatusList |
|
15 | -{ |
|
14 | +class StatusList { |
|
16 | 15 | /** |
17 | 16 | * The Language instance |
18 | 17 | * @var Lang |
@@ -23,8 +22,7 @@ discard block |
||
23 | 22 | * Create new instance |
24 | 23 | * @param Lang $lang |
25 | 24 | */ |
26 | - public function __construct(Lang $lang) |
|
27 | - { |
|
25 | + public function __construct(Lang $lang) { |
|
28 | 26 | $this->lang = $lang; |
29 | 27 | } |
30 | 28 |
@@ -8,8 +8,7 @@ |
||
8 | 8 | * @class UserStatus |
9 | 9 | * @package Platine\App\Enum |
10 | 10 | */ |
11 | -class UserStatus |
|
12 | -{ |
|
11 | +class UserStatus { |
|
13 | 12 | public const ACTIVE = 'A'; |
14 | 13 | public const LOCKED = 'D'; |
15 | 14 | } |
@@ -20,16 +20,16 @@ discard block |
||
20 | 20 | class PermissionValidator extends AbstractValidator |
21 | 21 | { |
22 | 22 | /** |
23 | - * The parameter instance |
|
24 | - * @var PermissionParam<TEntity> |
|
25 | - */ |
|
23 | + * The parameter instance |
|
24 | + * @var PermissionParam<TEntity> |
|
25 | + */ |
|
26 | 26 | protected PermissionParam $param; |
27 | 27 | |
28 | 28 | /** |
29 | - * Create new instance |
|
30 | - * @param PermissionParam<TEntity> $param |
|
31 | - * @param Lang $lang |
|
32 | - */ |
|
29 | + * Create new instance |
|
30 | + * @param PermissionParam<TEntity> $param |
|
31 | + * @param Lang $lang |
|
32 | + */ |
|
33 | 33 | public function __construct(PermissionParam $param, Lang $lang) |
34 | 34 | { |
35 | 35 | parent::__construct($lang); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * {@inheritdoc} |
|
41 | - */ |
|
40 | + * {@inheritdoc} |
|
41 | + */ |
|
42 | 42 | public function setValidationData(): void |
43 | 43 | { |
44 | 44 | $this->addData('code', $this->param->getCode()); |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * {@inheritdoc} |
|
51 | - */ |
|
50 | + * {@inheritdoc} |
|
51 | + */ |
|
52 | 52 | public function setValidationRules(): void |
53 | 53 | { |
54 | 54 | $this->addRules('code', [ |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | * @package Platine\App\Validator |
18 | 18 | * @template TEntity as \Platine\Orm\Entity |
19 | 19 | */ |
20 | -class PermissionValidator extends AbstractValidator |
|
21 | -{ |
|
20 | +class PermissionValidator extends AbstractValidator { |
|
22 | 21 | /** |
23 | 22 | * The parameter instance |
24 | 23 | * @var PermissionParam<TEntity> |
@@ -30,8 +29,7 @@ discard block |
||
30 | 29 | * @param PermissionParam<TEntity> $param |
31 | 30 | * @param Lang $lang |
32 | 31 | */ |
33 | - public function __construct(PermissionParam $param, Lang $lang) |
|
34 | - { |
|
32 | + public function __construct(PermissionParam $param, Lang $lang) { |
|
35 | 33 | parent::__construct($lang); |
36 | 34 | $this->param = $param; |
37 | 35 | } |
@@ -19,16 +19,16 @@ discard block |
||
19 | 19 | class RoleValidator extends AbstractValidator |
20 | 20 | { |
21 | 21 | /** |
22 | - * The parameter instance |
|
23 | - * @var RoleParam<TEntity> |
|
24 | - */ |
|
22 | + * The parameter instance |
|
23 | + * @var RoleParam<TEntity> |
|
24 | + */ |
|
25 | 25 | protected RoleParam $param; |
26 | 26 | |
27 | 27 | /** |
28 | - * Create new instance |
|
29 | - * @param RoleParam<TEntity> $param |
|
30 | - * @param Lang $lang |
|
31 | - */ |
|
28 | + * Create new instance |
|
29 | + * @param RoleParam<TEntity> $param |
|
30 | + * @param Lang $lang |
|
31 | + */ |
|
32 | 32 | public function __construct(RoleParam $param, Lang $lang) |
33 | 33 | { |
34 | 34 | parent::__construct($lang); |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
39 | - * {@inheritdoc} |
|
40 | - */ |
|
39 | + * {@inheritdoc} |
|
40 | + */ |
|
41 | 41 | public function setValidationData(): void |
42 | 42 | { |
43 | 43 | $this->addData('name', $this->param->getName()); |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * {@inheritdoc} |
|
49 | - */ |
|
48 | + * {@inheritdoc} |
|
49 | + */ |
|
50 | 50 | public function setValidationRules(): void |
51 | 51 | { |
52 | 52 | $this->addRules('name', [ |
@@ -16,8 +16,7 @@ discard block |
||
16 | 16 | * @package Platine\App\Validator |
17 | 17 | * @template TEntity as \Platine\Orm\Entity |
18 | 18 | */ |
19 | -class RoleValidator extends AbstractValidator |
|
20 | -{ |
|
19 | +class RoleValidator extends AbstractValidator { |
|
21 | 20 | /** |
22 | 21 | * The parameter instance |
23 | 22 | * @var RoleParam<TEntity> |
@@ -29,8 +28,7 @@ discard block |
||
29 | 28 | * @param RoleParam<TEntity> $param |
30 | 29 | * @param Lang $lang |
31 | 30 | */ |
32 | - public function __construct(RoleParam $param, Lang $lang) |
|
33 | - { |
|
31 | + public function __construct(RoleParam $param, Lang $lang) { |
|
34 | 32 | parent::__construct($lang); |
35 | 33 | $this->param = $param; |
36 | 34 | } |
@@ -20,16 +20,16 @@ discard block |
||
20 | 20 | class AuthValidator extends AbstractValidator |
21 | 21 | { |
22 | 22 | /** |
23 | - * The parameter instance |
|
24 | - * @var AuthParam<TEntity> |
|
25 | - */ |
|
23 | + * The parameter instance |
|
24 | + * @var AuthParam<TEntity> |
|
25 | + */ |
|
26 | 26 | protected AuthParam $param; |
27 | 27 | |
28 | 28 | /** |
29 | - * Create new instance |
|
30 | - * @param AuthParam<TEntity> $param |
|
31 | - * @param Lang $lang |
|
32 | - */ |
|
29 | + * Create new instance |
|
30 | + * @param AuthParam<TEntity> $param |
|
31 | + * @param Lang $lang |
|
32 | + */ |
|
33 | 33 | public function __construct(AuthParam $param, Lang $lang) |
34 | 34 | { |
35 | 35 | parent::__construct($lang); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * {@inheritdoc} |
|
41 | - */ |
|
40 | + * {@inheritdoc} |
|
41 | + */ |
|
42 | 42 | public function setValidationData(): void |
43 | 43 | { |
44 | 44 | $this->addData('username', $this->param->getUsername()); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * {@inheritdoc} |
|
50 | - */ |
|
49 | + * {@inheritdoc} |
|
50 | + */ |
|
51 | 51 | public function setValidationRules(): void |
52 | 52 | { |
53 | 53 | $this->addRules('username', [ |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | * @package Platine\App\Validator |
18 | 18 | * @template TEntity as \Platine\Orm\Entity |
19 | 19 | */ |
20 | -class AuthValidator extends AbstractValidator |
|
21 | -{ |
|
20 | +class AuthValidator extends AbstractValidator { |
|
22 | 21 | /** |
23 | 22 | * The parameter instance |
24 | 23 | * @var AuthParam<TEntity> |
@@ -30,8 +29,7 @@ discard block |
||
30 | 29 | * @param AuthParam<TEntity> $param |
31 | 30 | * @param Lang $lang |
32 | 31 | */ |
33 | - public function __construct(AuthParam $param, Lang $lang) |
|
34 | - { |
|
32 | + public function __construct(AuthParam $param, Lang $lang) { |
|
35 | 33 | parent::__construct($lang); |
36 | 34 | $this->param = $param; |
37 | 35 | } |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | class UserServiceProvider extends ServiceProvider |
19 | 19 | { |
20 | 20 | /** |
21 | - * {@inheritdoc} |
|
22 | - */ |
|
21 | + * {@inheritdoc} |
|
22 | + */ |
|
23 | 23 | public function register(): void |
24 | 24 | { |
25 | 25 | // User |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | |
36 | 36 | |
37 | 37 | /** |
38 | - * {@inheritdoc} |
|
39 | - */ |
|
38 | + * {@inheritdoc} |
|
39 | + */ |
|
40 | 40 | public function addRoutes(Router $router): void |
41 | 41 | { |
42 | 42 | $router->group('/user', function (Router $router) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function addRoutes(Router $router): void |
41 | 41 | { |
42 | - $router->group('/user', function (Router $router) { |
|
42 | + $router->group('/user', function(Router $router) { |
|
43 | 43 | $router->add('/login', AuthAction::class, ['GET', 'POST'], 'user_login'); |
44 | 44 | $router->get('/logout', LogoutAction::class, 'user_logout'); |
45 | 45 | }); |
@@ -15,8 +15,7 @@ |
||
15 | 15 | * @class UserServiceProvider |
16 | 16 | * @package Platine\App\Provider |
17 | 17 | */ |
18 | -class UserServiceProvider extends ServiceProvider |
|
19 | -{ |
|
18 | +class UserServiceProvider extends ServiceProvider { |
|
20 | 19 | /** |
21 | 20 | * {@inheritdoc} |
22 | 21 | */ |
@@ -55,8 +55,7 @@ |
||
55 | 55 | * @class ConsoleServiceProvider |
56 | 56 | * @package Platine\App\Provider |
57 | 57 | */ |
58 | -class ConsoleServiceProvider extends ServiceProvider |
|
59 | -{ |
|
58 | +class ConsoleServiceProvider extends ServiceProvider { |
|
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |
62 | 61 | */ |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * @class AppServiceProvider |
57 | 57 | * @package Platine\App\Provider |
58 | 58 | */ |
59 | -class AppServiceProvider extends ServiceProvider |
|
60 | -{ |
|
59 | +class AppServiceProvider extends ServiceProvider { |
|
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
63 | 62 | */ |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class ServerCommand |
55 | 55 | * @package Platine\App\Console\Command |
56 | 56 | */ |
57 | -class ServerCommand extends Command |
|
58 | -{ |
|
57 | +class ServerCommand extends Command { |
|
59 | 58 | /** |
60 | 59 | * The shell instance to use |
61 | 60 | * @var Shell |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | * Create new instance |
67 | 66 | * {@inheritdoc} |
68 | 67 | */ |
69 | - public function __construct(Shell $shell) |
|
70 | - { |
|
68 | + public function __construct(Shell $shell) { |
|
71 | 69 | parent::__construct('server', 'Command to manage PHP development server'); |
72 | 70 | $this->addOption('-a|--address', 'Server address', '0.0.0.0', true); |
73 | 71 | $this->addOption('-p|--port', 'Server listen port', '8080', true); |
@@ -79,8 +77,7 @@ discard block |
||
79 | 77 | /** |
80 | 78 | * {@inheritdoc} |
81 | 79 | */ |
82 | - public function execute() |
|
83 | - { |
|
80 | + public function execute() { |
|
84 | 81 | $host = $this->getOptionValue('address'); |
85 | 82 | $port = $this->getOptionValue('port'); |
86 | 83 | $path = $this->getOptionValue('root'); |