Passed
Pull Request — master (#10)
by Anton
04:10
created
www/engine/System/Classes/Utils/Pagination.php 1 patch
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,7 +14,9 @@  discard block
 block discarded – undo
14 14
 
15 15
 			for ($index = ($active - 2); $index <= ($active + 2); $index++) {
16 16
 
17
-				if (!($index > 0 && $index <= $count)) continue;
17
+				if (!($index > 0 && $index <= $count)) {
18
+					continue;
19
+				}
18 20
 
19 21
 				$class = (($index === $active) ? 'active item' : 'item');
20 22
 
@@ -41,7 +43,9 @@  discard block
 block discarded – undo
41 43
 
42 44
 				$block->link = $url->set('index', $index)->string(); $block->index = $index;
43 45
 
44
-				if ($closest) $block->block('ellipsis')->disable();
46
+				if ($closest) {
47
+					$block->block('ellipsis')->disable();
48
+				}
45 49
 			}
46 50
 		}
47 51
 
@@ -58,9 +62,9 @@  discard block
 block discarded – undo
58 62
 
59 63
 				list ($extremum, $index) = $data; $block = $pagination->block($class);
60 64
 
61
-				if ($active === $extremum) { $block->disable(); $pagination->block($class . '_disabled')->enable(); }
62
-
63
-				else $block->link = $url->set('index', $index)->string();
65
+				if ($active === $extremum) { $block->disable(); $pagination->block($class . '_disabled')->enable(); } else {
66
+					$block->link = $url->set('index', $index)->string();
67
+				}
64 68
 			}
65 69
 		}
66 70
 
@@ -68,9 +72,13 @@  discard block
 block discarded – undo
68 72
 
69 73
 		public static function block(int $index, int $display, int $total, Url $url) {
70 74
 
71
-			if (($index <= 0) || ($display <= 0) || ($total <= 0)) return false;
75
+			if (($index <= 0) || ($display <= 0) || ($total <= 0)) {
76
+				return false;
77
+			}
72 78
 
73
-			if (($display >= $total) || ($index > ($count = ceil($total / $display)))) return false;
79
+			if (($display >= $total) || ($index > ($count = ceil($total / $display)))) {
80
+				return false;
81
+			}
74 82
 
75 83
 			# Create block
76 84
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Utils/Form.php 1 patch
Braces   +14 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,11 @@  discard block
 block discarded – undo
12 12
 
13 13
 			$text = Language::get($code);
14 14
 
15
-			if (!$popup) Messages::set('error', $text); else Popup::set('negative', $text);
15
+			if (!$popup) {
16
+				Messages::set('error', $text);
17
+			} else {
18
+				Popup::set('negative', $text);
19
+			}
16 20
 
17 21
 			# ------------------------
18 22
 
@@ -23,15 +27,21 @@  discard block
 block discarded – undo
23 27
 
24 28
 		public function handle(callable $callback, bool $popup = false) {
25 29
 
26
-			if (false === ($post = $this->post())) return false;
30
+			if (false === ($post = $this->post())) {
31
+				return false;
32
+			}
27 33
 
28 34
 			# Check form for errors
29 35
 
30
-			if ($this->errors()) return $this->displayError('FORM_ERROR_REQUIRED', $popup);
36
+			if ($this->errors()) {
37
+				return $this->displayError('FORM_ERROR_REQUIRED', $popup);
38
+			}
31 39
 
32 40
 			# Call controller method
33 41
 
34
-			if (is_string($result = $callback($post))) return $this->displayError($result, $popup);
42
+			if (is_string($result = $callback($post))) {
43
+				return $this->displayError($result, $popup);
44
+			}
35 45
 
36 46
 			if (is_array($result)) { $this->get($result[0])->error(true); return $this->displayError($result[1], $popup); }
37 47
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Utils/Uploader.php 1 patch
Braces   +45 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,19 +10,33 @@  discard block
 block discarded – undo
10 10
 
11 11
 		private static function translateError(int $error) {
12 12
 
13
-			if ($error === UPLOAD_ERR_INI_SIZE)         return 'UPLOADER_ERROR_INI_SIZE';
13
+			if ($error === UPLOAD_ERR_INI_SIZE) {
14
+				return 'UPLOADER_ERROR_INI_SIZE';
15
+			}
14 16
 
15
-			if ($error === UPLOAD_ERR_FORM_SIZE)        return 'UPLOADER_ERROR_FORM_SIZE';
17
+			if ($error === UPLOAD_ERR_FORM_SIZE) {
18
+				return 'UPLOADER_ERROR_FORM_SIZE';
19
+			}
16 20
 
17
-			if ($error === UPLOAD_ERR_PARTIAL)          return 'UPLOADER_ERROR_PARTIAL';
21
+			if ($error === UPLOAD_ERR_PARTIAL) {
22
+				return 'UPLOADER_ERROR_PARTIAL';
23
+			}
18 24
 
19
-			if ($error === UPLOAD_ERR_NO_FILE)          return 'UPLOADER_ERROR_NO_FILE';
25
+			if ($error === UPLOAD_ERR_NO_FILE) {
26
+				return 'UPLOADER_ERROR_NO_FILE';
27
+			}
20 28
 
21
-			if ($error === UPLOAD_ERR_NO_TMP_DIR)       return 'UPLOADER_ERROR_NO_TMP_DIR';
29
+			if ($error === UPLOAD_ERR_NO_TMP_DIR) {
30
+				return 'UPLOADER_ERROR_NO_TMP_DIR';
31
+			}
22 32
 
23
-			if ($error === UPLOAD_ERR_CANT_WRITE)       return 'UPLOADER_ERROR_CANT_WRITE';
33
+			if ($error === UPLOAD_ERR_CANT_WRITE) {
34
+				return 'UPLOADER_ERROR_CANT_WRITE';
35
+			}
24 36
 
25
-			if ($error === UPLOAD_ERR_EXTENSION)        return 'UPLOADER_ERROR_EXTENSION';
37
+			if ($error === UPLOAD_ERR_EXTENSION) {
38
+				return 'UPLOADER_ERROR_EXTENSION';
39
+			}
26 40
 
27 41
 			# ------------------------
28 42
 
@@ -33,19 +47,27 @@  discard block
 block discarded – undo
33 47
 
34 48
 		public static function save(string $name, string $dir_name) {
35 49
 
36
-			if ((false === ($file = Request::file($name))) || !is_uploaded_file($file['tmp_name'])) return false;
50
+			if ((false === ($file = Request::file($name))) || !is_uploaded_file($file['tmp_name'])) {
51
+				return false;
52
+			}
37 53
 
38 54
 			# Check for demo mode
39 55
 
40
-			if (Informer::isDemoMode()) return 'DEMO_MODE_RESTRICTION';
56
+			if (Informer::isDemoMode()) {
57
+				return 'DEMO_MODE_RESTRICTION';
58
+			}
41 59
 
42 60
 			# Check for upload errors
43 61
 
44
-			if ($file['error'] !== UPLOAD_ERR_OK) return self::translateError($file['error']);
62
+			if ($file['error'] !== UPLOAD_ERR_OK) {
63
+				return self::translateError($file['error']);
64
+			}
45 65
 
46 66
 			# Check size
47 67
 
48
-			if ($file['size'] > CONFIG_UPLOADS_MAX_SIZE) return 'UPLOADER_ERROR_SIZE';
68
+			if ($file['size'] > CONFIG_UPLOADS_MAX_SIZE) {
69
+				return 'UPLOADER_ERROR_SIZE';
70
+			}
49 71
 
50 72
 			# Check file extension
51 73
 
@@ -53,21 +75,29 @@  discard block
 block discarded – undo
53 75
 
54 76
 			$extension = strtolower(Explorer::extension($file['name'], false));
55 77
 
56
-			if (in_array($extension, $extensions, true)) return 'UPLOADER_ERROR_TYPE';
78
+			if (in_array($extension, $extensions, true)) {
79
+				return 'UPLOADER_ERROR_TYPE';
80
+			}
57 81
 
58 82
 			# Check target directory
59 83
 
60
-			if (!Explorer::isDir($dir_name)) return 'UPLOADER_ERROR_DIR';
84
+			if (!Explorer::isDir($dir_name)) {
85
+				return 'UPLOADER_ERROR_DIR';
86
+			}
61 87
 
62 88
 			# Check target file
63 89
 
64 90
 			$file_name = ($dir_name . '/' . basename($file['name']));
65 91
 
66
-			if (Explorer::isDir($file_name) || Explorer::isFile($file_name)) return 'UPLOADER_ERROR_EXISTS';
92
+			if (Explorer::isDir($file_name) || Explorer::isFile($file_name)) {
93
+				return 'UPLOADER_ERROR_EXISTS';
94
+			}
67 95
 
68 96
 			# Save uploaded file
69 97
 
70
-			if (!@move_uploaded_file($file['tmp_name'], $file_name)) return 'UPLOADER_ERROR_SAVE';
98
+			if (!@move_uploaded_file($file['tmp_name'], $file_name)) {
99
+				return 'UPLOADER_ERROR_SAVE';
100
+			}
71 101
 
72 102
 			# ------------------------
73 103
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Controller/Recover.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 		public function __invoke(array $post) {
12 12
 
13
-			if (!Auth::check()) return false;
13
+			if (!Auth::check()) {
14
+				return false;
15
+			}
14 16
 
15 17
 			# Declare variables
16 18
 
@@ -22,13 +24,15 @@  discard block
 block discarded – undo
22 24
 
23 25
 			# Validate values
24 26
 
25
-			if (false === ($password_new = Validate::userPassword($password_new)))
26
-
27
+			if (false === ($password_new = Validate::userPassword($password_new))) {
28
+			
27 29
 				return ['password_new', 'USER_ERROR_PASSWORD_NEW_INVALID'];
30
+			}
28 31
 
29
-			if (0 !== strcmp($password_new, $password_retype))
30
-
32
+			if (0 !== strcmp($password_new, $password_retype)) {
33
+			
31 34
 				return ['password_retype', 'USER_ERROR_PASSWORD_MISMATCH'];
35
+			}
32 36
 
33 37
 			# Encode password
34 38
 
@@ -38,7 +42,9 @@  discard block
 block discarded – undo
38 42
 
39 43
 			$data = ['auth_key' => $auth_key, 'password' => $password];
40 44
 
41
-			if (!Auth::user()->edit($data)) return 'USER_ERROR_AUTH_RECOVER';
45
+			if (!Auth::user()->edit($data)) {
46
+				return 'USER_ERROR_AUTH_RECOVER';
47
+			}
42 48
 
43 49
 			# Remove secret
44 50
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Controller/Register.php 1 patch
Braces   +33 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 		public function __invoke(array $post) {
12 12
 
13
-			if (Auth::check()) return true;
13
+			if (Auth::check()) {
14
+				return true;
15
+			}
14 16
 
15 17
 			# Declare variables
16 18
 
@@ -22,15 +24,25 @@  discard block
 block discarded – undo
22 24
 
23 25
 			# Validate values
24 26
 
25
-			if (false === ($name = Validate::userName($name))) return ['name', 'USER_ERROR_NAME_INVALID'];
27
+			if (false === ($name = Validate::userName($name))) {
28
+				return ['name', 'USER_ERROR_NAME_INVALID'];
29
+			}
26 30
 
27
-			if (false === ($password = Validate::userPassword($password))) return ['password', 'USER_ERROR_PASSWORD_INVALID'];
31
+			if (false === ($password = Validate::userPassword($password))) {
32
+				return ['password', 'USER_ERROR_PASSWORD_INVALID'];
33
+			}
28 34
 
29
-			if (false === ($email = Validate::userEmail($email))) return ['email', 'USER_ERROR_EMAIL_INVALID'];
35
+			if (false === ($email = Validate::userEmail($email))) {
36
+				return ['email', 'USER_ERROR_EMAIL_INVALID'];
37
+			}
30 38
 
31
-			if (0 !== strcmp($password, $password_retype)) return ['password_retype', 'USER_ERROR_PASSWORD_MISMATCH'];
39
+			if (0 !== strcmp($password, $password_retype)) {
40
+				return ['password_retype', 'USER_ERROR_PASSWORD_MISMATCH'];
41
+			}
32 42
 
33
-			if (false === Security::checkCaptcha($captcha)) return ['captcha', 'USER_ERROR_CAPTCHA_INCORRECT'];
43
+			if (false === Security::checkCaptcha($captcha)) {
44
+				return ['captcha', 'USER_ERROR_CAPTCHA_INCORRECT'];
45
+			}
34 46
 
35 47
 			# Create user object
36 48
 
@@ -38,15 +50,23 @@  discard block
 block discarded – undo
38 50
 
39 51
 			# Check name exists
40 52
 
41
-			if (false === ($check_name = $user->check($name, 'name'))) return 'USER_ERROR_AUTH_REGISTER';
53
+			if (false === ($check_name = $user->check($name, 'name'))) {
54
+				return 'USER_ERROR_AUTH_REGISTER';
55
+			}
42 56
 
43
-			if ($check_name === 1) return ['name', 'USER_ERROR_NAME_DUPLICATE'];
57
+			if ($check_name === 1) {
58
+				return ['name', 'USER_ERROR_NAME_DUPLICATE'];
59
+			}
44 60
 
45 61
 			# Check email exists
46 62
 
47
-			if (false === ($check_email = $user->check($email, 'email'))) return 'USER_ERROR_AUTH_REGISTER';
63
+			if (false === ($check_email = $user->check($email, 'email'))) {
64
+				return 'USER_ERROR_AUTH_REGISTER';
65
+			}
48 66
 
49
-			if ($check_email === 1) return ['email', 'USER_ERROR_EMAIL_DUPLICATE'];
67
+			if ($check_email === 1) {
68
+				return ['email', 'USER_ERROR_EMAIL_DUPLICATE'];
69
+			}
50 70
 
51 71
 			# Encode password
52 72
 
@@ -69,7 +89,9 @@  discard block
 block discarded – undo
69 89
 			$data['time_registered']    = REQUEST_TIME;
70 90
 			$data['time_logged']        = REQUEST_TIME;
71 91
 
72
-			if (!$user->create($data)) return 'USER_ERROR_AUTH_REGISTER';
92
+			if (!$user->create($data)) {
93
+				return 'USER_ERROR_AUTH_REGISTER';
94
+			}
73 95
 
74 96
 			# Send mail
75 97
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Controller/Reset.php 1 patch
Braces   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 		public function __invoke(array $post) {
12 12
 
13
-			if (Auth::check()) return true;
13
+			if (Auth::check()) {
14
+				return true;
15
+			}
14 16
 
15 17
 			# Declare variables
16 18
 
@@ -22,9 +24,13 @@  discard block
 block discarded – undo
22 24
 
23 25
 			# Validate values
24 26
 
25
-			if (false === ($name = Validate::userName($name))) return ['name', 'USER_ERROR_NAME_INVALID'];
27
+			if (false === ($name = Validate::userName($name))) {
28
+				return ['name', 'USER_ERROR_NAME_INVALID'];
29
+			}
26 30
 
27
-			if (false === Security::checkCaptcha($captcha)) return ['captcha', 'USER_ERROR_CAPTCHA_INCORRECT'];
31
+			if (false === Security::checkCaptcha($captcha)) {
32
+				return ['captcha', 'USER_ERROR_CAPTCHA_INCORRECT'];
33
+			}
28 34
 
29 35
 			# Create user object
30 36
 
@@ -32,13 +38,19 @@  discard block
 block discarded – undo
32 38
 
33 39
 			# Init user
34 40
 
35
-			if (!$user->init($name, 'name')) return ['name', 'USER_ERROR_NAME_INCORRECT'];
41
+			if (!$user->init($name, 'name')) {
42
+				return ['name', 'USER_ERROR_NAME_INCORRECT'];
43
+			}
36 44
 
37
-			if (Auth::admin() && ($user->rank < RANK_ADMINISTRATOR)) return ['name', 'USER_ERROR_NAME_INCORRECT'];
45
+			if (Auth::admin() && ($user->rank < RANK_ADMINISTRATOR)) {
46
+				return ['name', 'USER_ERROR_NAME_INCORRECT'];
47
+			}
38 48
 
39 49
 			# Check access
40 50
 
41
-			if (!Auth::admin() && ($user->rank === RANK_GUEST)) return 'USER_ERROR_ACCESS';
51
+			if (!Auth::admin() && ($user->rank === RANK_GUEST)) {
52
+				return 'USER_ERROR_ACCESS';
53
+			}
42 54
 
43 55
 			# Create session
44 56
 
@@ -48,7 +60,9 @@  discard block
 block discarded – undo
48 60
 
49 61
 			$data = ['id' => $user->id, 'code' => $code, 'ip' => $ip, 'time' => $time];
50 62
 
51
-			if (!$secret->create($data)) return 'USER_ERROR_AUTH_RESET';
63
+			if (!$secret->create($data)) {
64
+				return 'USER_ERROR_AUTH_RESET';
65
+			}
52 66
 
53 67
 			# Send mail
54 68
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Controller/Login.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
10 10
 
11 11
 		public function __invoke(array $post) {
12 12
 
13
-			if (Auth::check()) return true;
13
+			if (Auth::check()) {
14
+				return true;
15
+			}
14 16
 
15 17
 			# Declare variables
16 18
 
@@ -22,9 +24,13 @@  discard block
 block discarded – undo
22 24
 
23 25
 			# Validate values
24 26
 
25
-			if (false === ($name = Validate::userName($name))) return ['name', 'USER_ERROR_NAME_INVALID'];
27
+			if (false === ($name = Validate::userName($name))) {
28
+				return ['name', 'USER_ERROR_NAME_INVALID'];
29
+			}
26 30
 
27
-			if (false === ($password = Validate::userPassword($password))) return ['password', 'USER_ERROR_PASSWORD_INVALID'];
31
+			if (false === ($password = Validate::userPassword($password))) {
32
+				return ['password', 'USER_ERROR_PASSWORD_INVALID'];
33
+			}
28 34
 
29 35
 			# Create user object
30 36
 
@@ -32,19 +38,27 @@  discard block
 block discarded – undo
32 38
 
33 39
 			# Init user
34 40
 
35
-			if (!$user->init($name, 'name')) return ['name', 'USER_ERROR_NAME_INCORRECT'];
41
+			if (!$user->init($name, 'name')) {
42
+				return ['name', 'USER_ERROR_NAME_INCORRECT'];
43
+			}
36 44
 
37
-			if (Auth::admin() && ($user->rank < RANK_ADMINISTRATOR)) return ['name', 'USER_ERROR_NAME_INCORRECT'];
45
+			if (Auth::admin() && ($user->rank < RANK_ADMINISTRATOR)) {
46
+				return ['name', 'USER_ERROR_NAME_INCORRECT'];
47
+			}
38 48
 
39 49
 			# Check password
40 50
 
41 51
 			$password = Str::encode($user->auth_key, $password);
42 52
 
43
-			if (0 !== strcmp($user->password, $password)) return ['password', 'USER_ERROR_PASSWORD_INCORRECT'];
53
+			if (0 !== strcmp($user->password, $password)) {
54
+				return ['password', 'USER_ERROR_PASSWORD_INCORRECT'];
55
+			}
44 56
 
45 57
 			# Check access
46 58
 
47
-			if (!Auth::admin() && ($user->rank === RANK_GUEST)) return 'USER_ERROR_ACCESS';
59
+			if (!Auth::admin() && ($user->rank === RANK_GUEST)) {
60
+				return 'USER_ERROR_ACCESS';
61
+			}
48 62
 
49 63
 			# Create session
50 64
 
@@ -54,7 +68,9 @@  discard block
 block discarded – undo
54 68
 
55 69
 			$data = ['id' => $user->id, 'code' => $code, 'ip' => $ip, 'time' => $time];
56 70
 
57
-			if (!$session->create($data)) return 'USER_ERROR_AUTH_LOGIN';
71
+			if (!$session->create($data)) {
72
+				return 'USER_ERROR_AUTH_LOGIN';
73
+			}
58 74
 
59 75
 			# Set session variable
60 76
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Auth.php 1 patch
Braces   +36 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,9 +12,13 @@  discard block
 block discarded – undo
12 12
 
13 13
 		private static function getAuth(string $code, string $type, int $lifetime) {
14 14
 
15
-			if (!($auth = Entitizer::get($type))->init($code, 'code')) return false;
15
+			if (!($auth = Entitizer::get($type))->init($code, 'code')) {
16
+				return false;
17
+			}
16 18
 
17
-			if (($auth->ip !== REQUEST_CLIENT_IP) || ($auth->time < (REQUEST_TIME - $lifetime))) return false;
19
+			if (($auth->ip !== REQUEST_CLIENT_IP) || ($auth->time < (REQUEST_TIME - $lifetime))) {
20
+				return false;
21
+			}
18 22
 
19 23
 			# ------------------------
20 24
 
@@ -25,9 +29,13 @@  discard block
 block discarded – undo
25 29
 
26 30
 		private static function getUser(int $id) {
27 31
 
28
-			if (0 === ($user = Entitizer::get(TABLE_USERS, $id))->id) return false;
32
+			if (0 === ($user = Entitizer::get(TABLE_USERS, $id))->id) {
33
+				return false;
34
+			}
29 35
 
30
-			if ($user->rank < (self::$admin ? RANK_ADMINISTRATOR : RANK_USER)) return false;
36
+			if ($user->rank < (self::$admin ? RANK_ADMINISTRATOR : RANK_USER)) {
37
+				return false;
38
+			}
31 39
 
32 40
 			# ------------------------
33 41
 
@@ -42,17 +50,23 @@  discard block
 block discarded – undo
42 50
 
43 51
 			# Check session code
44 52
 
45
-			if (false === ($code = Validate::authCode(Session::get('code')))) return false;
53
+			if (false === ($code = Validate::authCode(Session::get('code')))) {
54
+				return false;
55
+			}
46 56
 
47 57
 			# Get auth
48 58
 
49 59
 			$type = TABLE_USERS_SESSIONS; $lifetime = CONFIG_USER_SESSION_LIFETIME;
50 60
 
51
-			if (false === ($session = self::getAuth($code, $type, $lifetime))) return false;
61
+			if (false === ($session = self::getAuth($code, $type, $lifetime))) {
62
+				return false;
63
+			}
52 64
 
53 65
 			# Get user
54 66
 
55
-			if (false === ($user = self::getUser($session->id))) return false;
67
+			if (false === ($user = self::getUser($session->id))) {
68
+				return false;
69
+			}
56 70
 
57 71
 			# Update session
58 72
 
@@ -71,21 +85,29 @@  discard block
 block discarded – undo
71 85
 
72 86
 		public static function secret() {
73 87
 
74
-			if ((null === self::$user) || (0 !== self::$user->id)) return false;
88
+			if ((null === self::$user) || (0 !== self::$user->id)) {
89
+				return false;
90
+			}
75 91
 
76 92
 			# Check secret code
77 93
 
78
-			if (false === ($code = Validate::authCode(Request::get('code')))) return false;
94
+			if (false === ($code = Validate::authCode(Request::get('code')))) {
95
+				return false;
96
+			}
79 97
 
80 98
 			# Get auth
81 99
 
82 100
 			$type = TABLE_USERS_SECRETS; $lifetime = CONFIG_USER_SECRET_LIFETIME;
83 101
 
84
-			if (false === ($secret = self::getAuth($code, $type, $lifetime))) return false;
102
+			if (false === ($secret = self::getAuth($code, $type, $lifetime))) {
103
+				return false;
104
+			}
85 105
 
86 106
 			# Get user
87 107
 
88
-			if (false === ($user = self::getUser($secret->id))) return false;
108
+			if (false === ($user = self::getUser($secret->id))) {
109
+				return false;
110
+			}
89 111
 
90 112
 			# ------------------------
91 113
 
@@ -96,7 +118,9 @@  discard block
 block discarded – undo
96 118
 
97 119
 		public static function logout() {
98 120
 
99
-			if ((null === self::$user) || (0 === self::$user->id)) return false;
121
+			if ((null === self::$user) || (0 === self::$user->id)) {
122
+				return false;
123
+			}
100 124
 
101 125
 			# Remove session
102 126
 
Please login to merge, or discard this patch.
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::set('error', Language::get('DASHBOARD_MESSAGE_INSTALL_FILE'));
38
+			if (Informer::checkInstallFile()) {
39
+				Messages::set('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::set('warning', Language::get('DASHBOARD_MESSAGE_CONFIG_FILE'));
44
+			if (!Settings::loaded()) {
45
+				Messages::set('warning', Language::get('DASHBOARD_MESSAGE_CONFIG_FILE'));
46
+			}
43 47
 
44 48
 			# ------------------------
45 49
 
Please login to merge, or discard this patch.