Passed
Pull Request — master (#10)
by Anton
04:10
created
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/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.
www/engine/System/Classes/Modules/Entitizer/Form/User.php 1 patch
Unused Use Statements   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Entitizer\Form {
4 4
 
5
-	use Modules\Auth, Modules\Entitizer, Utils\Form, Utils\Range, Geo\Country, Geo\Timezone, Language;
5
+	use Modules\Auth;
6
+	use Modules\Entitizer;
7
+	use Utils\Form;
8
+	use Utils\Range;
9
+	use Geo\Country;
10
+	use Geo\Timezone;
11
+	use Language;
6 12
 
7 13
 	class User extends Form {
8 14
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Handler/Menuitem.php 2 patches
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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@
 block discarded – undo
32 32
 
33 33
 				$parent->block('browse')->disable(); $parent->block('browse_disabled')->enable();
34 34
 
35
-			} else $parent->block('browse')->link = $this->parent->link;
35
+			} else {
36
+				$parent->block('browse')->link = $this->parent->link;
37
+			}
36 38
 		}
37 39
 
38 40
 		# Add item additional data
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Lister/Menuitems.php 2 patches
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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@
 block discarded – undo
32 32
 
33 33
 				$parent->block('browse')->disable(); $parent->block('browse_disabled')->enable();
34 34
 
35
-			} else $parent->block('browse')->link = $this->parent->link;
35
+			} else {
36
+				$parent->block('browse')->link = $this->parent->link;
37
+			}
36 38
 		}
37 39
 
38 40
 		# Add item additional data
Please login to merge, or discard this patch.