Completed
Push — 4.0 ( 40f637...af9dea )
by Olivier
02:21
created
lib/Module.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,7 @@
 block discarded – undo
11 11
 
12 12
 namespace Icybee\Modules\Users;
13 13
 
14
-use ICanBoogie\I18n;
15 14
 use ICanBoogie\Operation;
16
-
17 15
 use Brickrouge\Button;
18 16
 use Brickrouge\Element;
19 17
 use Brickrouge\Form;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
 			Element::CHILDREN => [
83 83
 
84
-				new Button('logout', [ 'type' => 'submit' ])
84
+				new Button('logout', ['type' => 'submit'])
85 85
 
86 86
 			]
87 87
 
Please login to merge, or discard this patch.
lib/UserModel.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,6 @@
 block discarded – undo
12 12
 namespace Icybee\Modules\Users;
13 13
 
14 14
 use ICanBoogie\DateTime;
15
-use ICanBoogie\ActiveRecord;
16
-
17 15
 use Icybee\ConstructorModel;
18 16
 
19 17
 class UserModel extends ConstructorModel
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 				continue;
74 74
 			}
75 75
 
76
-			$has_many_roles->execute('INSERT {self} SET uid = ?, rid = ?', [ $rc, $rid ]);
76
+			$has_many_roles->execute('INSERT {self} SET uid = ?, rid = ?', [$rc, $rid]);
77 77
 		}
78 78
 	}
79 79
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 		foreach ($restricted_sites as $site_id)
90 90
 		{
91
-			$has_many_sites->execute('INSERT {self} SET uid = ?, site_id = ?', [ $rc, $site_id ]);
91
+			$has_many_sites->execute('INSERT {self} SET uid = ?, site_id = ?', [$rc, $site_id]);
92 92
 		}
93 93
 	}
94 94
 }
Please login to merge, or discard this patch.
config/event.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.
config/hooks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
config/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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' => [
Please login to merge, or discard this patch.
descriptor.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -17,19 +17,19 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 ];
Please login to merge, or discard this patch.
lib/Block/AvailableSites.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
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) . ')')
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
 please select another website to work with:</p>
77 77
 $form
78 78
 </div>
79
-EOT;
79
+eot;
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.
lib/Block/EditBlock.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		{
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 use Brickrouge\Group;
18 18
 use Brickrouge\Text;
19 19
 use Brickrouge\Widget;
20
-
21 20
 use Icybee\Modules\Users\Module;
22 21
 use Icybee\Modules\Users\Roles\Binding\UserBindings;
23 22
 use Icybee\Modules\Users\User;
Please login to merge, or discard this patch.
lib/Block/ManageBlock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.