Completed
Branch 0.2.1 (e70612)
by Anton
09:15
created
www/engine/System/Classes/Modules/Informer/Handler/Dashboard.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,11 +35,15 @@
 block discarded – undo
35 35
 
36 36
 			# Check if install file exists
37 37
 
38
-			if (Informer::checkInstallFile()) Messages::error(Language::get('DASHBOARD_MESSAGE_INSTALL_FILE'));
38
+			if (Informer::checkInstallFile()) {
39
+				Messages::error(Language::get('DASHBOARD_MESSAGE_INSTALL_FILE'));
40
+			}
39 41
 
40 42
 			# Check if configuration file is loaded
41 43
 
42
-			if (!Settings::loaded()) Messages::warning(Language::get('DASHBOARD_MESSAGE_CONFIG_FILE'));
44
+			if (!Settings::loaded()) {
45
+				Messages::warning(Language::get('DASHBOARD_MESSAGE_CONFIG_FILE'));
46
+			}
43 47
 
44 48
 			# ------------------------
45 49
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Informer/Informer.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,9 @@
 block discarded – undo
45 45
 
46 46
 		public static function mysqlVersion() {
47 47
 
48
-			if (!(DB::send("SELECT VERSION() as version") && DB::last()->status)) return false;
48
+			if (!(DB::send("SELECT VERSION() as version") && DB::last()->status)) {
49
+				return false;
50
+			}
49 51
 
50 52
 			return strval(DB::last()->row()['version']);
51 53
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Variable.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
 			# Check name exists
31 31
 
32
-			if (false === ($check_name = $this->variable->check('name', $name))) return 'VARIABLE_ERROR_MODIFY';
32
+			if (false === ($check_name = $this->variable->check('name', $name))) {
33
+				return 'VARIABLE_ERROR_MODIFY';
34
+			}
33 35
 
34
-			if ($check_name === 1) return 'VARIABLE_ERROR_NAME_DUPLICATE';
36
+			if ($check_name === 1) {
37
+				return 'VARIABLE_ERROR_NAME_DUPLICATE';
38
+			}
35 39
 
36 40
 			# Modify variable
37 41
 
@@ -43,7 +47,9 @@  discard block
 block discarded – undo
43 47
 
44 48
 			$modifier = ((0 === $this->variable->id) ? 'create' : 'edit');
45 49
 
46
-			if (!$this->variable->$modifier($data)) return 'VARIABLE_ERROR_MODIFY';
50
+			if (!$this->variable->$modifier($data)) {
51
+				return 'VARIABLE_ERROR_MODIFY';
52
+			}
47 53
 
48 54
 			# ------------------------
49 55
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Page.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,13 @@  discard block
 block discarded – undo
35 35
 
36 36
 			# Check name exists
37 37
 
38
-			if (false === ($check_name = $this->page->check('hash', $hash))) return 'PAGE_ERROR_MODIFY';
38
+			if (false === ($check_name = $this->page->check('hash', $hash))) {
39
+				return 'PAGE_ERROR_MODIFY';
40
+			}
39 41
 
40
-			if ($check_name === 1) return 'PAGE_ERROR_NAME_DUPLICATE';
42
+			if ($check_name === 1) {
43
+				return 'PAGE_ERROR_NAME_DUPLICATE';
44
+			}
41 45
 
42 46
 			# Modify page
43 47
 
@@ -57,7 +61,9 @@  discard block
 block discarded – undo
57 61
 
58 62
 			$modifier = ((0 === $this->page->id) ? 'create' : 'edit');
59 63
 
60
-			if (!$this->page->$modifier($data)) return 'PAGE_ERROR_MODIFY';
64
+			if (!$this->page->$modifier($data)) {
65
+				return 'PAGE_ERROR_MODIFY';
66
+			}
61 67
 
62 68
 			# ------------------------
63 69
 
Please login to merge, or discard this 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\Controller {
4 4
 
5
-	use Modules\Entitizer, Arr;
5
+	use Modules\Entitizer;
6
+	use Arr;
6 7
 
7 8
 	class Page {
8 9
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Menuitem.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@
 block discarded – undo
39 39
 
40 40
 			$modifier = ((0 === $this->menuitem->id) ? 'create' : 'edit');
41 41
 
42
-			if (!$this->menuitem->$modifier($data)) return 'MENUITEM_ERROR_MODIFY';
42
+			if (!$this->menuitem->$modifier($data)) {
43
+				return 'MENUITEM_ERROR_MODIFY';
44
+			}
43 45
 
44 46
 			# ------------------------
45 47
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/User.php 2 patches
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 = Auth\Validate::userName($name))) return 'USER_ERROR_NAME_INVALID';
34
+			if (false === ($name = Auth\Validate::userName($name))) {
35
+				return 'USER_ERROR_NAME_INVALID';
36
+			}
35 37
 
36
-			if (false === ($email = Validate::email($email))) return 'USER_ERROR_EMAIL_INVALID';
38
+			if (false === ($email = Validate::email($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 = Auth\Validate::userPassword($password))) return 'USER_ERROR_PASSWORD_INVALID';
46
+				if (false === ($password = Auth\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.
Unused Use Statements   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Controller {
4 4
 
5
-	use Modules\Auth, Modules\Entitizer, Str, Validate;
5
+	use Modules\Auth;
6
+	use Modules\Entitizer;
7
+	use Str;
8
+	use Validate;
6 9
 
7 10
 	class User {
8 11
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Widget.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
 			# Check name exists
31 31
 
32
-			if (false === ($check_name = $this->widget->check('name', $name))) return 'WIDGET_ERROR_MODIFY';
32
+			if (false === ($check_name = $this->widget->check('name', $name))) {
33
+				return 'WIDGET_ERROR_MODIFY';
34
+			}
33 35
 
34
-			if ($check_name === 1) return 'WIDGET_ERROR_NAME_DUPLICATE';
36
+			if ($check_name === 1) {
37
+				return 'WIDGET_ERROR_NAME_DUPLICATE';
38
+			}
35 39
 
36 40
 			# Modify widget
37 41
 
@@ -44,7 +48,9 @@  discard block
 block discarded – undo
44 48
 
45 49
 			$modifier = ((0 === $this->widget->id) ? 'create' : 'edit');
46 50
 
47
-			if (!$this->widget->$modifier($data)) return 'WIDGET_ERROR_MODIFY';
51
+			if (!$this->widget->$modifier($data)) {
52
+				return 'WIDGET_ERROR_MODIFY';
53
+			}
48 54
 
49 55
 			# ------------------------
50 56
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Handler/User.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@
 block discarded – undo
28 28
 
29 29
 		protected function processEntity(Template\Asset\Block $contents) {
30 30
 
31
-			if ($this->create) return $contents->block('info')->disable();
31
+			if ($this->create) {
32
+				return $contents->block('info')->disable();
33
+			}
32 34
 
33 35
 			$contents->block('info')->time_registered = Date::get(DATE_FORMAT_DATETIME, $this->entity->time_registered);
34 36
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Entitizer.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,9 @@
 block discarded – undo
29 29
 
30 30
 		public static function get(string $type, int $id = 0) {
31 31
 
32
-			if (!isset(self::$classes[$type])) throw new Exception\General(self::$error_message);
32
+			if (!isset(self::$classes[$type])) {
33
+				throw new Exception\General(self::$error_message);
34
+			}
33 35
 
34 36
 			$cached = isset(self::$cache[$type][$id]);
35 37
 
Please login to merge, or discard this patch.