Passed
Push — 0.3.0 ( 7b15ee...0d73f1 )
by Anton
03:54
created
www/engine/System/Classes/Modules/Profile/Handler/Edit.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 
46 46
 			if ($this->form_personal->handle($controller_personal) || $this->form_password->handle($controller_password)) {
47 47
 
48
-				Request::redirect(INSTALL_PATH . '/profile/edit?submitted');
48
+				Request::redirect(INSTALL_PATH.'/profile/edit?submitted');
49 49
 			}
50 50
 
51 51
 			# Display success message
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 
51 51
 			# Display success message
52 52
 
53
-			if (false !== Request::get('submitted')) Messages::set('success', Language::get('USER_SUCCESS_EDIT'));
53
+			if (false !== Request::get('submitted')) {
54
+				Messages::set('success', Language::get('USER_SUCCESS_EDIT'));
55
+			}
54 56
 
55 57
 			# ------------------------
56 58
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Install/Handler/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
 			if ($this->form->handle(new Install\Controller\Database())) {
37 37
 
38
-				Request::redirect(INSTALL_PATH . '/admin/register');
38
+				Request::redirect(INSTALL_PATH.'/admin/register');
39 39
 			}
40 40
 
41 41
 			# ------------------------
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Install/Handler/Check.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
 				$class = ($value ? 'positive' : 'negative'); $icon = ($value ? 'check circle' : 'warning circle');
20 20
 
21
-				$text = Language::get('INSTALL_REQUIREMENT_' . strtoupper($name) . '_' . ($value ? 'SUCCESS' : 'FAIL'));
21
+				$text = Language::get('INSTALL_REQUIREMENT_'.strtoupper($name).'_'.($value ? 'SUCCESS' : 'FAIL'));
22 22
 
23 23
 				$requirements[] = ['class' => $class, 'icon' => $icon, 'text' => $text];
24 24
 			}
Please login to merge, or discard this patch.
www/engine/System/Classes/Installer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 			$checked = (Install::status() && Validate::boolean(Request::get('checked')));
16 16
 
17
-			$class = ('Handlers\Admin\Install\\' . (!$checked ? 'Check' : 'Database'));
17
+			$class = ('Handlers\Admin\Install\\'.(!$checked ? 'Check' : 'Database'));
18 18
 
19 19
 			# ------------------------
20 20
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Handlers/Tools/Captcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
 			# Customize captcha
26 26
 
27
-			$font = (DIR_SYSTEM_DATA . CONFIG_CAPTCHA_FONT); $size = CONFIG_CAPTCHA_FONT_SIZE;
27
+			$font = (DIR_SYSTEM_DATA.CONFIG_CAPTCHA_FONT); $size = CONFIG_CAPTCHA_FONT_SIZE;
28 28
 
29 29
 			$indent = CONFIG_CAPTCHA_TEXT_INDENT; $step = CONFIG_CAPTCHA_TEXT_STEP;
30 30
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Frames/Site/Section.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 		private function getLayout(Template\Asset\Block $contents) {
27 27
 
28
-			$layout = View::get('Layouts\\' . $this->layout);
28
+			$layout = View::get('Layouts\\'.$this->layout);
29 29
 
30 30
 			# Create layout components
31 31
 
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
 
101 101
 			$page->keywords = ('' !== $this->keywords) ? $this->keywords : Settings::get('site_keywords');
102 102
 
103
-			$page->robots = (($this->robots_index ? 'INDEX' : 'NOINDEX') . ',' . ($this->robots_follow ? 'FOLLOW' : 'NOFOLLOW'));
103
+			$page->robots = (($this->robots_index ? 'INDEX' : 'NOINDEX').','.($this->robots_follow ? 'FOLLOW' : 'NOFOLLOW'));
104 104
 
105 105
 			# Set title
106 106
 
107
-			$page->title = ((('' !== $this->title) ? ($this->title . ' | ') : '') . Settings::get('site_title'));
107
+			$page->title = ((('' !== $this->title) ? ($this->title.' | ') : '').Settings::get('site_title'));
108 108
 
109 109
 			# Set canonical
110 110
 
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
 
140 140
 				if (($this instanceof Component\Profile\Auth)) {
141 141
 
142
-					if (Auth::check()) Request::redirect(INSTALL_PATH . '/profile');
142
+					if (Auth::check()) Request::redirect(INSTALL_PATH.'/profile');
143 143
 
144 144
 				} else if (!Auth::check() || ((false !== Request::get('logout')) && Auth::logout())) {
145 145
 
146
-					Request::redirect(INSTALL_PATH . '/profile/login');
146
+					Request::redirect(INSTALL_PATH.'/profile/login');
147 147
 				}
148 148
 			}
149 149
 
Please login to merge, or discard this patch.
Unused Use Statements   +13 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,19 @@
 block discarded – undo
2 2
 
3 3
 namespace Frames\Site {
4 4
 
5
-	use Frames, Frames\Status, Modules\Auth, Modules\Extend, Modules\Settings, Utils\Menu, Utils\Messages;
6
-	use Utils\Template\Variables, Utils\Template\Widgets, Utils\View, Date, Request, Template;
5
+	use Frames;
6
+	use Frames\Status;
7
+	use Modules\Auth;
8
+	use Modules\Extend;
9
+	use Modules\Settings;
10
+	use Utils\Menu;
11
+	use Utils\Messages;
12
+	use Utils\Template\Variables;
13
+	use Utils\Template\Widgets;
14
+	use Utils\View;
15
+	use Date;
16
+	use Request;
17
+	use Template;
7 18
 
8 19
 	abstract class Section extends Frames\Section {
9 20
 
Please login to merge, or discard this patch.
Braces   +29 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@  discard block
 block discarded – undo
39 39
 
40 40
 			if (Settings::get('users_registration')) {
41 41
 
42
-				if (!Auth::check()) $layout->block('auth')->enable(); else {
42
+				if (!Auth::check()) {
43
+					$layout->block('auth')->enable();
44
+				} else {
43 45
 
44 46
 					$layout->block('user')->enable();
45 47
 
@@ -47,7 +49,9 @@  discard block
 block discarded – undo
47 49
 
48 50
 					$layout->block('user')->name = Auth::user()->name;
49 51
 
50
-					if (Auth::user()->rank === RANK_ADMINISTRATOR) $layout->block('user')->block('admin')->enable();
52
+					if (Auth::user()->rank === RANK_ADMINISTRATOR) {
53
+						$layout->block('user')->block('admin')->enable();
54
+					}
51 55
 				}
52 56
 			}
53 57
 
@@ -104,9 +108,11 @@  discard block
 block discarded – undo
104 108
 
105 109
 			# Set canonical
106 110
 
107
-			if ('' === $this->canonical) $page->block('canonical')->disable();
108
-
109
-			else $page->block('canonical')->link = $this->canonical;
111
+			if ('' === $this->canonical) {
112
+				$page->block('canonical')->disable();
113
+			} else {
114
+				$page->block('canonical')->link = $this->canonical;
115
+			}
110 116
 
111 117
 			# Set layout
112 118
 
@@ -127,19 +133,27 @@  discard block
 block discarded – undo
127 133
 
128 134
 			# Check site status
129 135
 
130
-			if (Settings::get('site_status') === STATUS_MAINTENANCE) return Status::maintenance();
136
+			if (Settings::get('site_status') === STATUS_MAINTENANCE) {
137
+				return Status::maintenance();
138
+			}
131 139
 
132
-			if (Settings::get('site_status') === STATUS_UPDATE) return Status::update();
140
+			if (Settings::get('site_status') === STATUS_UPDATE) {
141
+				return Status::update();
142
+			}
133 143
 
134 144
 			# Check access rights
135 145
 
136 146
 			if ($this instanceof Component\Profile) {
137 147
 
138
-				if (!Settings::get('users_registration')) return Status::error404();
148
+				if (!Settings::get('users_registration')) {
149
+					return Status::error404();
150
+				}
139 151
 
140 152
 				if (($this instanceof Component\Profile\Auth)) {
141 153
 
142
-					if (Auth::check()) Request::redirect(INSTALL_PATH . '/profile');
154
+					if (Auth::check()) {
155
+						Request::redirect(INSTALL_PATH . '/profile');
156
+					}
143 157
 
144 158
 				} else if (!Auth::check() || ((false !== Request::get('logout')) && Auth::logout())) {
145 159
 
@@ -153,9 +167,13 @@  discard block
 block discarded – undo
153 167
 
154 168
 				# Set global components
155 169
 
156
-				foreach (Variables::generate() as $name => $value) Template::global($name, $value);
170
+				foreach (Variables::generate() as $name => $value) {
171
+					Template::global($name, $value);
172
+				}
157 173
 
158
-				foreach (Widgets::generate() as $name => $block) Template::widget($name, $block);
174
+				foreach (Widgets::generate() as $name => $block) {
175
+					Template::widget($name, $block);
176
+				}
159 177
 
160 178
 				# Display page
161 179
 
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\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 ['name', 'USER_ERROR_NAME_INVALID'];
34
+			if (false === ($name = Validate::userName($name))) {
35
+				return ['name', 'USER_ERROR_NAME_INVALID'];
36
+			}
35 37
 
36
-			if (false === ($email = Validate::userEmail($email))) return ['email', 'USER_ERROR_EMAIL_INVALID'];
38
+			if (false === ($email = Validate::userEmail($email))) {
39
+				return ['email', '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 ['password', 'USER_ERROR_PASSWORD_INVALID'];
46
+				if (false === ($password = Validate::userPassword($password))) {
47
+					return ['password', 'USER_ERROR_PASSWORD_INVALID'];
48
+				}
43 49
 
44
-				if (0 !== strcmp($password, $password_retype)) return ['password_retype', 'USER_ERROR_PASSWORD_MISMATCH'];
50
+				if (0 !== strcmp($password, $password_retype)) {
51
+					return ['password_retype', '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 ['name', 'USER_ERROR_NAME_DUPLICATE'];
61
+			if ($check_name === 1) {
62
+				return ['name', '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 ['email', 'USER_ERROR_EMAIL_DUPLICATE'];
71
+			if ($check_email === 1) {
72
+				return ['email', '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.
www/engine/System/Classes/Modules/Entitizer/Entity/Page.php 4 patches
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\Entity {
4 4
 
5
-	use Modules\Auth, Modules\Entitizer, Modules\Settings, DB;
5
+	use Modules\Auth;
6
+	use Modules\Entitizer;
7
+	use Modules\Settings;
8
+	use DB;
6 9
 
7 10
 	class Page extends Entitizer\Utils\Entity {
8 11
 
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 
65 65
 			$query = ("SELECT " . implode(', ', $selection) .", rel.ancestor as parent_id ") .
66 66
 
67
-			         ("FROM " . static::$table . " ent ") .
67
+					 ("FROM " . static::$table . " ent ") .
68 68
 
69
-			         ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") .
69
+					 ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") .
70 70
 
71
-			         ("WHERE ent.visibility = " . VISIBILITY_PUBLISHED . " AND ent.access <= " . Auth::user()->rank . " AND ") .
71
+					 ("WHERE ent.visibility = " . VISIBILITY_PUBLISHED . " AND ent.access <= " . Auth::user()->rank . " AND ") .
72 72
 
73
-			         ("ent.locked = 0 AND ent.slug = '" . addslashes($slug) . "' LIMIT 1");
73
+					 ("ent.locked = 0 AND ent.slug = '" . addslashes($slug) . "' LIMIT 1");
74 74
 
75 75
 			# Select entity from DB
76 76
 
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
 
92 92
 			$query = ("UPDATE " . static::$table . " ent JOIN (") .
93 93
 
94
-			         ("SELECT rel.descendant as id, GROUP_CONCAT(ens.name ORDER BY rls.depth DESC SEPARATOR '/') slug ") .
94
+					 ("SELECT rel.descendant as id, GROUP_CONCAT(ens.name ORDER BY rls.depth DESC SEPARATOR '/') slug ") .
95 95
 
96
-			         ("FROM " . static::$table_relations . " rel ") .
96
+					 ("FROM " . static::$table_relations . " rel ") .
97 97
 
98
-			         ("JOIN " . static::$table_relations . " rls ON rls.descendant = rel.descendant ") .
98
+					 ("JOIN " . static::$table_relations . " rls ON rls.descendant = rel.descendant ") .
99 99
 
100
-			         ("JOIN " . static::$table . " ens ON ens.id = rls.ancestor ") .
100
+					 ("JOIN " . static::$table . " ens ON ens.id = rls.ancestor ") .
101 101
 
102
-			         ("WHERE rel.ancestor = " . $this->id . " GROUP BY rel.descendant") .
102
+					 ("WHERE rel.ancestor = " . $this->id . " GROUP BY rel.descendant") .
103 103
 
104
-			         (") slg ON slg.id = ent.id SET ent.locked = 1, ent.slug = slg.slug");
104
+					 (") slg ON slg.id = ent.id SET ent.locked = 1, ent.slug = slg.slug");
105 105
 
106 106
 			if (!(DB::send($query) && DB::last()->status)) return false;
107 107
 
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
 
110 110
 			$query = ("UPDATE " . static::$table . " ent JOIN (") .
111 111
 
112
-			         ("SELECT rel.descendant as id FROM " . static::$table_relations . " rel ") .
112
+					 ("SELECT rel.descendant as id FROM " . static::$table_relations . " rel ") .
113 113
 
114
-			         ("JOIN " . static::$table . " enc ON enc.id = rel.descendant AND enc.locked = 1 ") .
114
+					 ("JOIN " . static::$table . " enc ON enc.id = rel.descendant AND enc.locked = 1 ") .
115 115
 
116
-			         ("LEFT JOIN " . static::$table . " end ON end.id != enc.id AND end.slug = enc.slug ") .
116
+					 ("LEFT JOIN " . static::$table . " end ON end.id != enc.id AND end.slug = enc.slug ") .
117 117
 
118
-			         ("WHERE end.id IS NULL GROUP BY rel.descendant") .
118
+					 ("WHERE end.id IS NULL GROUP BY rel.descendant") .
119 119
 
120
-			         (") chk ON chk.id = ent.id SET ent.locked = 0");
120
+					 (") chk ON chk.id = ent.id SET ent.locked = 0");
121 121
 
122 122
 			if (!(DB::send($query) && DB::last()->status)) return false;
123 123
 
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 			if ('' === $this->data['slug']) return '';
23 23
 
24
-			return (INSTALL_PATH . '/' . $this->data['slug']);
24
+			return (INSTALL_PATH.'/'.$this->data['slug']);
25 25
 		}
26 26
 
27 27
 		# Get canonical
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 			if ('' === $this->data['slug']) return '';
32 32
 
33
-			return (Settings::get('system_url') . (($this->id !== 1) ? ('/' . $this->data['slug']) : ''));
33
+			return (Settings::get('system_url').(($this->id !== 1) ? ('/'.$this->data['slug']) : ''));
34 34
 		}
35 35
 
36 36
 		# Implement entity
@@ -58,19 +58,19 @@  discard block
 block discarded – undo
58 58
 
59 59
 			$selection = array_keys($this->definition->params());
60 60
 
61
-			foreach ($selection as $key => $field) $selection[$key] = ('ent.' . $field);
61
+			foreach ($selection as $key => $field) $selection[$key] = ('ent.'.$field);
62 62
 
63 63
 			# Process query
64 64
 
65
-			$query = ("SELECT " . implode(', ', $selection) .", rel.ancestor as parent_id ") .
65
+			$query = ("SELECT ".implode(', ', $selection).", rel.ancestor as parent_id ").
66 66
 
67
-			         ("FROM " . static::$table . " ent ") .
67
+			         ("FROM ".static::$table." ent ").
68 68
 
69
-			         ("LEFT JOIN " . static::$table_relations . " rel ON rel.descendant = ent.id AND rel.depth = 1 ") .
69
+			         ("LEFT JOIN ".static::$table_relations." rel ON rel.descendant = ent.id AND rel.depth = 1 ").
70 70
 
71
-			         ("WHERE ent.visibility = " . VISIBILITY_PUBLISHED . " AND ent.access <= " . Auth::user()->rank . " AND ") .
71
+			         ("WHERE ent.visibility = ".VISIBILITY_PUBLISHED." AND ent.access <= ".Auth::user()->rank." AND ").
72 72
 
73
-			         ("ent.locked = 0 AND ent.slug = '" . addslashes($slug) . "' LIMIT 1");
73
+			         ("ent.locked = 0 AND ent.slug = '".addslashes($slug)."' LIMIT 1");
74 74
 
75 75
 			# Select entity from DB
76 76
 
@@ -89,17 +89,17 @@  discard block
 block discarded – undo
89 89
 
90 90
 			# Send lock/update request
91 91
 
92
-			$query = ("UPDATE " . static::$table . " ent JOIN (") .
92
+			$query = ("UPDATE ".static::$table." ent JOIN (").
93 93
 
94
-			         ("SELECT rel.descendant as id, GROUP_CONCAT(ens.name ORDER BY rls.depth DESC SEPARATOR '/') slug ") .
94
+			         ("SELECT rel.descendant as id, GROUP_CONCAT(ens.name ORDER BY rls.depth DESC SEPARATOR '/') slug ").
95 95
 
96
-			         ("FROM " . static::$table_relations . " rel ") .
96
+			         ("FROM ".static::$table_relations." rel ").
97 97
 
98
-			         ("JOIN " . static::$table_relations . " rls ON rls.descendant = rel.descendant ") .
98
+			         ("JOIN ".static::$table_relations." rls ON rls.descendant = rel.descendant ").
99 99
 
100
-			         ("JOIN " . static::$table . " ens ON ens.id = rls.ancestor ") .
100
+			         ("JOIN ".static::$table." ens ON ens.id = rls.ancestor ").
101 101
 
102
-			         ("WHERE rel.ancestor = " . $this->id . " GROUP BY rel.descendant") .
102
+			         ("WHERE rel.ancestor = ".$this->id." GROUP BY rel.descendant").
103 103
 
104 104
 			         (") slg ON slg.id = ent.id SET ent.locked = 1, ent.slug = slg.slug");
105 105
 
@@ -107,15 +107,15 @@  discard block
 block discarded – undo
107 107
 
108 108
 			# Send unlock request
109 109
 
110
-			$query = ("UPDATE " . static::$table . " ent JOIN (") .
110
+			$query = ("UPDATE ".static::$table." ent JOIN (").
111 111
 
112
-			         ("SELECT rel.descendant as id FROM " . static::$table_relations . " rel ") .
112
+			         ("SELECT rel.descendant as id FROM ".static::$table_relations." rel ").
113 113
 
114
-			         ("JOIN " . static::$table . " enc ON enc.id = rel.descendant AND enc.locked = 1 ") .
114
+			         ("JOIN ".static::$table." enc ON enc.id = rel.descendant AND enc.locked = 1 ").
115 115
 
116
-			         ("LEFT JOIN " . static::$table . " end ON end.id != enc.id AND end.slug = enc.slug ") .
116
+			         ("LEFT JOIN ".static::$table." end ON end.id != enc.id AND end.slug = enc.slug ").
117 117
 
118
-			         ("WHERE end.id IS NULL GROUP BY rel.descendant") .
118
+			         ("WHERE end.id IS NULL GROUP BY rel.descendant").
119 119
 
120 120
 			         (") chk ON chk.id = ent.id SET ent.locked = 0");
121 121
 
Please login to merge, or discard this patch.
Braces   +33 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 		private function getLink() {
21 21
 
22
-			if ('' === $this->data['slug']) return '';
22
+			if ('' === $this->data['slug']) {
23
+				return '';
24
+			}
23 25
 
24 26
 			return (INSTALL_PATH . '/' . $this->data['slug']);
25 27
 		}
@@ -28,7 +30,9 @@  discard block
 block discarded – undo
28 30
 
29 31
 		private function getCanonical() {
30 32
 
31
-			if ('' === $this->data['slug']) return '';
33
+			if ('' === $this->data['slug']) {
34
+				return '';
35
+			}
32 36
 
33 37
 			return (Settings::get('system_url') . (($this->id !== 1) ? ('/' . $this->data['slug']) : ''));
34 38
 		}
@@ -48,7 +52,9 @@  discard block
 block discarded – undo
48 52
 
49 53
 		public function initBySlug(string $slug) {
50 54
 
51
-			if (!$this->modifiable || (0 !== $this->id)) return false;
55
+			if (!$this->modifiable || (0 !== $this->id)) {
56
+				return false;
57
+			}
52 58
 
53 59
 			# Process value
54 60
 
@@ -58,7 +64,9 @@  discard block
 block discarded – undo
58 64
 
59 65
 			$selection = array_keys($this->definition->params());
60 66
 
61
-			foreach ($selection as $key => $field) $selection[$key] = ('ent.' . $field);
67
+			foreach ($selection as $key => $field) {
68
+				$selection[$key] = ('ent.' . $field);
69
+			}
62 70
 
63 71
 			# Process query
64 72
 
@@ -74,7 +82,9 @@  discard block
 block discarded – undo
74 82
 
75 83
 			# Select entity from DB
76 84
 
77
-			if (($this->error = !(DB::send($query) && DB::last()->status)) || (DB::last()->rows !== 1)) return false;
85
+			if (($this->error = !(DB::send($query) && DB::last()->status)) || (DB::last()->rows !== 1)) {
86
+				return false;
87
+			}
78 88
 
79 89
 			# ------------------------
80 90
 
@@ -85,7 +95,9 @@  discard block
 block discarded – undo
85 95
 
86 96
 		public function updateSlugs() {
87 97
 
88
-			if (!$this->modifiable || (0 === $this->id)) return false;
98
+			if (!$this->modifiable || (0 === $this->id)) {
99
+				return false;
100
+			}
89 101
 
90 102
 			# Send lock/update request
91 103
 
@@ -103,7 +115,9 @@  discard block
 block discarded – undo
103 115
 
104 116
 			         (") slg ON slg.id = ent.id SET ent.locked = 1, ent.slug = slg.slug");
105 117
 
106
-			if (!(DB::send($query) && DB::last()->status)) return false;
118
+			if (!(DB::send($query) && DB::last()->status)) {
119
+				return false;
120
+			}
107 121
 
108 122
 			# Send unlock request
109 123
 
@@ -119,7 +133,9 @@  discard block
 block discarded – undo
119 133
 
120 134
 			         (") chk ON chk.id = ent.id SET ent.locked = 0");
121 135
 
122
-			if (!(DB::send($query) && DB::last()->status)) return false;
136
+			if (!(DB::send($query) && DB::last()->status)) {
137
+				return false;
138
+			}
123 139
 
124 140
 			# ------------------------
125 141
 
@@ -130,7 +146,9 @@  discard block
 block discarded – undo
130 146
 
131 147
 		public function create(array $data) {
132 148
 
133
-			if (!parent::create($data)) return false;
149
+			if (!parent::create($data)) {
150
+				return false;
151
+			}
134 152
 
135 153
 			$this->updateSlugs();
136 154
 
@@ -143,7 +161,9 @@  discard block
 block discarded – undo
143 161
 
144 162
 		public function edit(array $data) {
145 163
 
146
-			if (!parent::edit($data)) return false;
164
+			if (!parent::edit($data)) {
165
+				return false;
166
+			}
147 167
 
148 168
 			$this->updateSlugs();
149 169
 
@@ -156,7 +176,9 @@  discard block
 block discarded – undo
156 176
 
157 177
 		public function move(int $parent_id) {
158 178
 
159
-			if (!parent::move($parent_id)) return false;
179
+			if (!parent::move($parent_id)) {
180
+				return false;
181
+			}
160 182
 
161 183
 			$this->updateSlugs();
162 184
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Form/Page.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\Range;
5
+	use Modules\Entitizer;
6
+	use Utils\Form;
7
+	use Utils\Range;
6 8
 
7 9
 	class Page extends Form {
8 10
 
Please login to merge, or discard this patch.