@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $this->template, |
80 | 80 | 'user/create', |
81 | 81 | [ |
82 | - 'param' => $formParam |
|
82 | + 'param' => $formParam |
|
83 | 83 | ] |
84 | 84 | ); |
85 | 85 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->template, |
108 | 108 | 'user/create', |
109 | 109 | [ |
110 | - 'param' => $formParam |
|
110 | + 'param' => $formParam |
|
111 | 111 | ] |
112 | 112 | ); |
113 | 113 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $this->template, |
88 | 88 | 'user/edit', |
89 | 89 | [ |
90 | - 'param' => $formParam |
|
90 | + 'param' => $formParam |
|
91 | 91 | ] |
92 | 92 | ); |
93 | 93 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $this->template, |
114 | 114 | 'user/edit', |
115 | 115 | [ |
116 | - 'param' => $formParam |
|
116 | + 'param' => $formParam |
|
117 | 117 | ] |
118 | 118 | ); |
119 | 119 | } |
@@ -22,8 +22,7 @@ |
||
22 | 22 | * |
23 | 23 | * @author tony |
24 | 24 | */ |
25 | -class EditAction implements RequestHandlerInterface |
|
26 | -{ |
|
25 | +class EditAction implements RequestHandlerInterface { |
|
27 | 26 | |
28 | 27 | protected LoggerInterface $logger; |
29 | 28 | protected Session $session; |
@@ -16,8 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @author tony |
18 | 18 | */ |
19 | -class DeleteAction implements RequestHandlerInterface |
|
20 | -{ |
|
19 | +class DeleteAction implements RequestHandlerInterface { |
|
21 | 20 | |
22 | 21 | protected LoggerInterface $logger; |
23 | 22 | protected UserRepository $userRepository; |
@@ -39,30 +39,30 @@ |
||
39 | 39 | public function setRules(): void |
40 | 40 | { |
41 | 41 | $this->validator->addRules('username', [ |
42 | - new NotEmpty(), |
|
43 | - new MinLength(3), |
|
42 | + new NotEmpty(), |
|
43 | + new MinLength(3), |
|
44 | 44 | new AlphaDash() |
45 | 45 | ]); |
46 | 46 | |
47 | 47 | $this->validator->addRules('lastname', [ |
48 | - new NotEmpty(), |
|
49 | - new MinLength(3) |
|
48 | + new NotEmpty(), |
|
49 | + new MinLength(3) |
|
50 | 50 | ]); |
51 | 51 | |
52 | 52 | $this->validator->addRules('firstname', [ |
53 | - new NotEmpty(), |
|
54 | - new MinLength(3) |
|
53 | + new NotEmpty(), |
|
54 | + new MinLength(3) |
|
55 | 55 | ]); |
56 | 56 | |
57 | 57 | $this->validator->addRules('age', [ |
58 | - new NotEmpty(), |
|
59 | - new Number(), |
|
60 | - new Min(0), |
|
61 | - new Max(100), |
|
58 | + new NotEmpty(), |
|
59 | + new Number(), |
|
60 | + new Min(0), |
|
61 | + new Max(100), |
|
62 | 62 | ]); |
63 | 63 | |
64 | 64 | $this->validator->addRules('password', [ |
65 | - new MinLength(5), |
|
65 | + new MinLength(5), |
|
66 | 66 | ]); |
67 | 67 | } |
68 | 68 | } |
@@ -4,8 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Platine\Orm\Entity; |
6 | 6 | |
7 | -class UserParam extends BaseParam |
|
8 | -{ |
|
7 | +class UserParam extends BaseParam { |
|
9 | 8 | protected string $username = ''; |
10 | 9 | protected string $lastname = ''; |
11 | 10 | protected string $firstname = ''; |
@@ -11,15 +11,13 @@ discard block |
||
11 | 11 | use Platine\Orm\Entity; |
12 | 12 | use Platine\Stdlib\Helper\Str; |
13 | 13 | |
14 | -class BaseParam |
|
15 | -{ |
|
14 | +class BaseParam { |
|
16 | 15 | |
17 | 16 | /** |
18 | 17 | * Create new instance |
19 | 18 | * @param array<string, mixed> $data |
20 | 19 | */ |
21 | - public function __construct(array $data = []) |
|
22 | - { |
|
20 | + public function __construct(array $data = []) { |
|
23 | 21 | $params = array_merge($this->getDefault(), $data); |
24 | 22 | $this->load($params); |
25 | 23 | } |
@@ -62,8 +60,7 @@ discard block |
||
62 | 60 | * @param string $name |
63 | 61 | * @return mixed|null |
64 | 62 | */ |
65 | - public function __get($name) |
|
66 | - { |
|
63 | + public function __get($name) { |
|
67 | 64 | if (property_exists($this, $name)) { |
68 | 65 | return $this->{$name}; |
69 | 66 | } |
@@ -61,8 +61,7 @@ |
||
61 | 61 | * class ActionServiceProvider |
62 | 62 | * @package Platine\Framework |
63 | 63 | */ |
64 | -class ActionServiceProvider extends ServiceProvider |
|
65 | -{ |
|
64 | +class ActionServiceProvider extends ServiceProvider { |
|
66 | 65 | |
67 | 66 | /** |
68 | 67 | * {@inheritdoc} |