Completed
Pull Request — master (#7)
by Anton
04:49
created
www/engine/System/Classes/Modules/Entitizer/Listview/Variables.php 1 patch
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Listview {
4 4
 
5
-	use Modules\Entitizer, Template;
5
+	use Modules\Entitizer;
6
+	use Template;
6 7
 
7 8
 	class Variables extends Entitizer\Utils\Listview {
8 9
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Listview/Widgets.php 1 patch
Unused Use Statements   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Listview {
4 4
 
5
-	use Modules\Entitizer, Template, Language;
5
+	use Modules\Entitizer;
6
+	use Template;
7
+	use Language;
6 8
 
7 9
 	class Widgets extends Entitizer\Utils\Listview {
8 10
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Filemanager/Handler/Dir.php 1 patch
Unused Use Statements   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Filemanager\Handler {
4 4
 
5
-	use Modules\Filemanager, Date, Template;
5
+	use Modules\Filemanager;
6
+	use Date;
7
+	use Template;
6 8
 
7 9
 	class Dir extends Filemanager\Utils\Handler {
8 10
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Filemanager/Handler/File.php 1 patch
Unused Use Statements   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,12 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Filemanager\Handler {
4 4
 
5
-	use Modules\Filemanager, Date, Explorer, Mime, Number, Template;
5
+	use Modules\Filemanager;
6
+	use Date;
7
+	use Explorer;
8
+	use Mime;
9
+	use Number;
10
+	use Template;
6 11
 
7 12
 	class File extends Filemanager\Utils\Handler {
8 13
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Form/Menuitem.php 1 patch
Unused Use Statements   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Form {
4 4
 
5
-	use Modules\Entitizer, Utils\Form, Utils\Lister;
5
+	use Modules\Entitizer;
6
+	use Utils\Form;
7
+	use Utils\Lister;
6 8
 
7 9
 	class Page extends Form {
8 10
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Form/Variable.php 1 patch
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Form {
4 4
 
5
-	use Modules\Entitizer, Utils\Form;
5
+	use Modules\Entitizer;
6
+	use Utils\Form;
6 7
 
7 8
 	class Widget extends Form {
8 9
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Utils/Template/Variables.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,15 @@
 block discarded – undo
23 23
 
24 24
 			$selection = ['name', 'value']; $order = ['name' => 'ASC'];
25 25
 
26
-			if (!(DB::select(TABLE_VARIABLES, $selection, null, $order) && DB::last()->status)) return;
26
+			if (!(DB::select(TABLE_VARIABLES, $selection, null, $order) && DB::last()->status)) {
27
+				return;
28
+			}
27 29
 
28 30
 			# Process results
29 31
 
30
-			while (null !== ($variable = DB::last()->row())) $this->addItem($variable['name'], $variable['value']);
32
+			while (null !== ($variable = DB::last()->row())) {
33
+				$this->addItem($variable['name'], $variable['value']);
34
+			}
31 35
 		}
32 36
 
33 37
 		# Return items
Please login to merge, or discard this patch.
www/engine/System/Classes/Utils/Template/Widgets.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,11 +23,15 @@
 block discarded – undo
23 23
 
24 24
 			$selection = ['name', 'contents']; $condition = ['display' => 1]; $order = ['name' => 'ASC'];
25 25
 
26
-			if (!(DB::select(TABLE_WIDGETS, $selection, $condition, $order) && DB::last()->status)) return;
26
+			if (!(DB::select(TABLE_WIDGETS, $selection, $condition, $order) && DB::last()->status)) {
27
+				return;
28
+			}
27 29
 
28 30
 			# Process results
29 31
 
30
-			while (null !== ($widget = DB::last()->row())) $this->addItem($widget['name'], $widget['contents']);
32
+			while (null !== ($widget = DB::last()->row())) {
33
+				$this->addItem($widget['name'], $widget['contents']);
34
+			}
31 35
 		}
32 36
 
33 37
 		# Return items
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/User.php 2 patches
Unused Use Statements   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Controller {
4 4
 
5
-	use Modules\Auth, Modules\Entitizer, Utils\Validate, Str;
5
+	use Modules\Entitizer;
6
+	use Utils\Validate;
7
+	use Str;
6 8
 
7 9
 	class User {
8 10
 
Please login to merge, or discard this patch.
Braces   +27 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,30 +31,46 @@  discard block
 block discarded – undo
31 31
 
32 32
 			# Validate name & email
33 33
 
34
-			if (false === ($name = Validate::userName($name))) return 'USER_ERROR_NAME_INVALID';
34
+			if (false === ($name = Validate::userName($name))) {
35
+				return 'USER_ERROR_NAME_INVALID';
36
+			}
35 37
 
36
-			if (false === ($email = Validate::userEmail($email))) return 'USER_ERROR_EMAIL_INVALID';
38
+			if (false === ($email = Validate::userEmail($email))) {
39
+				return 'USER_ERROR_EMAIL_INVALID';
40
+			}
37 41
 
38 42
 			# Validate password
39 43
 
40 44
 			if ((0 === $this->user->id) || ('' !== $password)) {
41 45
 
42
-				if (false === ($password = Validate::userPassword($password))) return 'USER_ERROR_PASSWORD_INVALID';
46
+				if (false === ($password = Validate::userPassword($password))) {
47
+					return 'USER_ERROR_PASSWORD_INVALID';
48
+				}
43 49
 
44
-				if (0 !== strcmp($password, $password_retype)) return 'USER_ERROR_PASSWORD_MISMATCH';
50
+				if (0 !== strcmp($password, $password_retype)) {
51
+					return 'USER_ERROR_PASSWORD_MISMATCH';
52
+				}
45 53
 			}
46 54
 
47 55
 			# Check name exists
48 56
 
49
-			if (false === ($check_name = $this->user->check('name', $name))) return 'USER_ERROR_MODIFY';
57
+			if (false === ($check_name = $this->user->check('name', $name))) {
58
+				return 'USER_ERROR_MODIFY';
59
+			}
50 60
 
51
-			if ($check_name === 1) return 'USER_ERROR_NAME_DUPLICATE';
61
+			if ($check_name === 1) {
62
+				return 'USER_ERROR_NAME_DUPLICATE';
63
+			}
52 64
 
53 65
 			# Check email exists
54 66
 
55
-			if (false === ($check_email = $this->user->check('email', $email))) return 'USER_ERROR_MODIFY';
67
+			if (false === ($check_email = $this->user->check('email', $email))) {
68
+				return 'USER_ERROR_MODIFY';
69
+			}
56 70
 
57
-			if ($check_email === 1) return 'USER_ERROR_EMAIL_DUPLICATE';
71
+			if ($check_email === 1) {
72
+				return 'USER_ERROR_EMAIL_DUPLICATE';
73
+			}
58 74
 
59 75
 			# Modify user
60 76
 
@@ -84,7 +100,9 @@  discard block
 block discarded – undo
84 100
 
85 101
 			$modifier = ((0 === $this->user->id) ? 'create' : 'edit');
86 102
 
87
-			if (!$this->user->$modifier($data)) return 'USER_ERROR_MODIFY';
103
+			if (!$this->user->$modifier($data)) {
104
+				return 'USER_ERROR_MODIFY';
105
+			}
88 106
 
89 107
 			# ------------------------
90 108
 
Please login to merge, or discard this patch.