@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | return [ |
11 | 11 | |
12 | - ICanBoogie\HTTP\AuthenticationRequired::class .'::rescue' => $hooks . 'on_security_exception_rescue', |
|
12 | + ICanBoogie\HTTP\AuthenticationRequired::class . '::rescue' => $hooks . 'on_security_exception_rescue', |
|
13 | 13 | ICanBoogie\HTTP\PermissionRequired::class . '::rescue' => $hooks . 'on_security_exception_rescue', |
14 | 14 | ICanBoogie\Routing\RouteDispatcher::class . '::dispatch:before' => $hooks . 'before_routing_dispatcher_dispatch', |
15 | 15 | Icybee\Modules\Users\Roles\Operation\DeleteOperation::class . '::process:before' => $hooks . 'before_roles_delete', |
@@ -11,8 +11,8 @@ |
||
11 | 11 | |
12 | 12 | 'patron.markups' => [ |
13 | 13 | |
14 | - 'user' => [ $hooks . 'markup_user' ], |
|
15 | - 'users:form:login' => [ $hooks . 'markup_form_login' ] |
|
14 | + 'user' => [$hooks . 'markup_user'], |
|
15 | + 'users:form:login' => [$hooks . 'markup_form_login'] |
|
16 | 16 | |
17 | 17 | ] |
18 | 18 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | 'pattern' => '/api/logout', |
27 | 27 | 'controller' => LogoutOperation::class, |
28 | - 'via' => [ 'GET', 'POST' ] |
|
28 | + 'via' => ['GET', 'POST'] |
|
29 | 29 | |
30 | 30 | ], |
31 | 31 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ] + Make::admin('users', Routing\UsersAdminController::class, [ |
59 | 59 | |
60 | 60 | 'id_name' => 'uid', |
61 | - 'only' => [ 'index', 'new', 'edit', 'confirm-delete', 'profile', 'authenticate' ], |
|
61 | + 'only' => ['index', 'new', 'edit', 'confirm-delete', 'profile', 'authenticate'], |
|
62 | 62 | 'actions' => [ |
63 | 63 | |
64 | 64 | 'profile' => [ |
@@ -17,19 +17,19 @@ discard block |
||
17 | 17 | Model::SCHEMA => [ |
18 | 18 | |
19 | 19 | 'uid' => 'serial', |
20 | - 'constructor' => [ 'varchar', 64, 'indexed' => true ], |
|
21 | - 'email' => [ 'varchar', 64, 'unique' => true ], |
|
22 | - 'password_hash' => [ 'varchar', 255, 'charset' => 'ascii/bin' ], |
|
23 | - 'username' => [ 'varchar', 32, 'unique' => true ], |
|
24 | - 'firstname' => [ 'varchar', 32 ], |
|
25 | - 'lastname' => [ 'varchar', 32 ], |
|
26 | - 'nickname' => [ 'varchar', 32 ], |
|
27 | - 'name_as' => [ 'integer', 'tiny' ], |
|
28 | - 'language' => [ 'varchar', 8 ], |
|
29 | - 'timezone' => [ 'varchar', 32 ], |
|
20 | + 'constructor' => ['varchar', 64, 'indexed' => true], |
|
21 | + 'email' => ['varchar', 64, 'unique' => true], |
|
22 | + 'password_hash' => ['varchar', 255, 'charset' => 'ascii/bin'], |
|
23 | + 'username' => ['varchar', 32, 'unique' => true], |
|
24 | + 'firstname' => ['varchar', 32], |
|
25 | + 'lastname' => ['varchar', 32], |
|
26 | + 'nickname' => ['varchar', 32], |
|
27 | + 'name_as' => ['integer', 'tiny'], |
|
28 | + 'language' => ['varchar', 8], |
|
29 | + 'timezone' => ['varchar', 32], |
|
30 | 30 | 'logged_at' => 'datetime', |
31 | - 'created_at' => [ 'timestamp', 'default' => 'CURRENT_TIMESTAMP' ], |
|
32 | - 'is_activated' => [ 'boolean', 'indexed' => true ] |
|
31 | + 'created_at' => ['timestamp', 'default' => 'CURRENT_TIMESTAMP'], |
|
32 | + 'is_activated' => ['boolean', 'indexed' => true] |
|
33 | 33 | |
34 | 34 | ] |
35 | 35 | ], |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | Model::CLASSNAME => 'ICanBoogie\ActiveRecord\Model', |
42 | 42 | Model::SCHEMA => [ |
43 | 43 | |
44 | - 'uid' => [ 'foreign', 'primary' => true ], |
|
45 | - 'rid' => [ 'foreign', 'primary' => true ] |
|
44 | + 'uid' => ['foreign', 'primary' => true], |
|
45 | + 'rid' => ['foreign', 'primary' => true] |
|
46 | 46 | |
47 | 47 | ] |
48 | 48 | ], |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | Model::CLASSNAME => 'ICanBoogie\ActiveRecord\Model', |
55 | 55 | Model::SCHEMA => [ |
56 | 56 | |
57 | - 'uid' => [ 'foreign', 'primary' => true ], |
|
58 | - 'site_id' => [ 'foreign', 'primary' => true ] |
|
57 | + 'uid' => ['foreign', 'primary' => true], |
|
58 | + 'site_id' => ['foreign', 'primary' => true] |
|
59 | 59 | |
60 | 60 | ] |
61 | 61 | ] |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ], |
70 | 70 | |
71 | 71 | Descriptor::REQUIRED => true, |
72 | - Descriptor::REQUIRES => [ 'users.roles' ], |
|
72 | + Descriptor::REQUIRES => ['users.roles'], |
|
73 | 73 | Descriptor::TITLE => "Users" |
74 | 74 | |
75 | 75 | ]; |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | /* @var $site \Icybee\Modules\Sites\Site */ |
23 | 23 | $site = $app->site; |
24 | - $ws_title = \ICanBoogie\escape($site->admin_title ? $site->admin_title : $site->title .':' . $site->language); |
|
24 | + $ws_title = \ICanBoogie\escape($site->admin_title ? $site->admin_title : $site->title . ':' . $site->language); |
|
25 | 25 | |
26 | 26 | $available = $site->model |
27 | 27 | ->where('site_id IN(' . implode(',', $app->user->restricted_sites_ids) . ')') |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | Element::GROUPS => [ |
67 | 67 | |
68 | - 'connection' => [ 'title' => 'Connection' ], |
|
69 | - 'advanced' => [ 'title' => 'Advanced' ] |
|
68 | + 'connection' => ['title' => 'Connection'], |
|
69 | + 'advanced' => ['title' => 'Advanced'] |
|
70 | 70 | |
71 | 71 | ] |
72 | 72 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | Group::LABEL => 'language', |
173 | 173 | Element::GROUP => 'advanced', |
174 | 174 | Element::DESCRIPTION => 'language', |
175 | - Element::OPTIONS => [ null => '' ] + $languages |
|
175 | + Element::OPTIONS => [null => ''] + $languages |
|
176 | 176 | |
177 | 177 | ]), |
178 | 178 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | return null; |
215 | 215 | } |
216 | 216 | |
217 | - $rid = [ 2 => true ]; |
|
217 | + $rid = [2 => true]; |
|
218 | 218 | |
219 | 219 | if ($uid) |
220 | 220 | { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | Form::LABEL => 'roles', |
237 | 237 | Element::GROUP => 'advanced', |
238 | 238 | Element::OPTIONS => $options, |
239 | - Element::OPTIONS_DISABLED => [ 2 => true ], |
|
239 | + Element::OPTIONS_DISABLED => [2 => true], |
|
240 | 240 | Element::REQUIRED => true, |
241 | 241 | Element::DESCRIPTION => 'roles', |
242 | 242 | |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | { |
256 | 256 | $values = $this->values; |
257 | 257 | |
258 | - $options = [ '<username>' ]; |
|
258 | + $options = ['<username>']; |
|
259 | 259 | |
260 | 260 | if ($values[User::USERNAME]) |
261 | 261 | { |
@@ -30,8 +30,8 @@ |
||
30 | 30 | { |
31 | 31 | parent::__construct($module, $attributes + [ |
32 | 32 | |
33 | - self::T_COLUMNS_ORDER => [ User::USERNAME, User::IS_ACTIVATED, User::EMAIL, 'roles', User::CREATED_AT, User::LOGGED_AT ], |
|
34 | - self::T_ORDER_BY => [ 'created_at', 'desc' ] |
|
33 | + self::T_COLUMNS_ORDER => [User::USERNAME, User::IS_ACTIVATED, User::EMAIL, 'roles', User::CREATED_AT, User::LOGGED_AT], |
|
34 | + self::T_ORDER_BY => ['created_at', 'desc'] |
|
35 | 35 | |
36 | 36 | ]); |
37 | 37 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | |
95 | 95 | if ($value) |
96 | 96 | { |
97 | - $query->and([ $this->id => $value ]); |
|
97 | + $query->and([$this->id => $value]); |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | return $query; |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | parent::__construct('select', $attributes + [ |
33 | 33 | |
34 | - Element::OPTIONS => [ null => '' ] + $this->create_options($attributes) |
|
34 | + Element::OPTIONS => [null => ''] + $this->create_options($attributes) |
|
35 | 35 | |
36 | 36 | ]); |
37 | 37 | } |