Completed
Branch 0.2.3 (4e241d)
by Anton
15:52 queued 09:37
created
www/engine/System/Classes/Modules/Settings/Controller/General.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 			# Check for demo mode
14 14
 
15
-			if (Informer::isDemoMode()) return 'DEMO_MODE_RESTRICTION';
15
+			if (Informer::isDemoMode()) {
16
+				return 'DEMO_MODE_RESTRICTION';
17
+			}
16 18
 
17 19
 			# Define errors list
18 20
 
@@ -25,12 +27,16 @@  discard block
 block discarded – undo
25 27
 
26 28
 			foreach ($post as $name => $value) {
27 29
 
28
-				if (!Settings::set($name, $value)) return (isset($errors[$name]) ? $errors[$name] : false);
30
+				if (!Settings::set($name, $value)) {
31
+					return (isset($errors[$name]) ? $errors[$name] : false);
32
+				}
29 33
 			}
30 34
 
31 35
 			# Save settings
32 36
 
33
-			if (!Settings::save()) return 'SETTINGS_ERROR_SAVE';
37
+			if (!Settings::save()) {
38
+				return 'SETTINGS_ERROR_SAVE';
39
+			}
34 40
 
35 41
 			# ------------------------
36 42
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Settings/Handler/General.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@
 block discarded – undo
40 40
 
41 41
 			# Display success message
42 42
 
43
-			if (false !== Request::get('submitted')) Messages::success(Language::get('SETTINGS_SUCCESS'));
43
+			if (false !== Request::get('submitted')) {
44
+				Messages::success(Language::get('SETTINGS_SUCCESS'));
45
+			}
44 46
 
45 47
 			# ------------------------
46 48
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Profile/Handler/Overview.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,14 +30,18 @@
 block discarded – undo
30 30
 
31 31
 			foreach (['full_name', 'city'] as $name) {
32 32
 
33
-				if ('' === ($text = Auth::user()->$name)) $contents->block($name)->disable();
34
-
35
-				else $contents->block($name)->text = $text;
33
+				if ('' === ($text = Auth::user()->$name)) {
34
+					$contents->block($name)->disable();
35
+				} else {
36
+					$contents->block($name)->text = $text;
37
+				}
36 38
 			}
37 39
 
38 40
 			# Set country
39 41
 
40
-			if ('' === ($country = Auth::user()->country)) $contents->block('country')->disable(); else {
42
+			if ('' === ($country = Auth::user()->country)) {
43
+				$contents->block('country')->disable();
44
+			} else {
41 45
 
42 46
 				$contents->block('country')->code = $country;
43 47
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Profile/Handler/Edit.php 1 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::success(Language::get('USER_SUCCESS_EDIT'));
53
+			if (false !== Request::get('submitted')) {
54
+				Messages::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/Auth/Handler/Recover.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,9 +14,11 @@
 block discarded – undo
14 14
 
15 15
 			# Init user by secret code
16 16
 
17
-			if (false !== ($code = Auth::secret())) $this->code = $code;
18
-
19
-			else Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/reset');
17
+			if (false !== ($code = Auth::secret())) {
18
+				$this->code = $code;
19
+			} else {
20
+				Request::redirect(INSTALL_PATH . (Auth::admin() ? '/admin' : '/profile') . '/reset');
21
+			}
20 22
 
21 23
 			# Create form
22 24
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Utils/Handler.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@
 block discarded – undo
20 20
 
21 21
 			# Implement form
22 22
 
23
-			if (null !== $this->form) $this->form->implement($contents);
23
+			if (null !== $this->form) {
24
+				$this->form->implement($contents);
25
+			}
24 26
 
25 27
 			# ------------------------
26 28
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Filemanager/Handler/Listview.php 2 patches
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,15 +23,19 @@  discard block
 block discarded – undo
23 23
 
24 24
 				while (false !== ($name = readdir($handler))) {
25 25
 
26
-					if (in_array($name, ['.', '..', '.empty'], true)) continue;
26
+					if (in_array($name, ['.', '..', '.empty'], true)) {
27
+						continue;
28
+					}
27 29
 
28 30
 					$path = ($prefix . $name); $path_full = ($this->parent->pathFull() . $name);
29 31
 
30 32
 					$data = ['name' => $name, 'path' => $path, 'path_full' => $path_full];
31 33
 
32
-					if (@is_dir($path_full)) $dirs[] = array_merge($data, ['type' => FILEMANAGER_TYPE_DIR]);
33
-
34
-					else if (@is_file($path_full)) $files[] = array_merge($data, ['type' => FILEMANAGER_TYPE_FILE]);
34
+					if (@is_dir($path_full)) {
35
+						$dirs[] = array_merge($data, ['type' => FILEMANAGER_TYPE_DIR]);
36
+					} else if (@is_file($path_full)) {
37
+						$files[] = array_merge($data, ['type' => FILEMANAGER_TYPE_FILE]);
38
+					}
35 39
 				}
36 40
 
37 41
 				closedir($handler);
@@ -98,9 +102,11 @@  discard block
 block discarded – undo
98 102
 
99 103
 			foreach ($this->items['list'] as $item) {
100 104
 
101
-				if ($item['type'] === FILEMANAGER_TYPE_DIR) $items->add($this->getDirItemBlock($item));
102
-
103
-				else if ($item['type'] === FILEMANAGER_TYPE_FILE) $items->add($this->getFileItemBlock($item));
105
+				if ($item['type'] === FILEMANAGER_TYPE_DIR) {
106
+					$items->add($this->getDirItemBlock($item));
107
+				} else if ($item['type'] === FILEMANAGER_TYPE_FILE) {
108
+					$items->add($this->getFileItemBlock($item));
109
+				}
104 110
 			}
105 111
 
106 112
 			# ------------------------
@@ -149,7 +155,9 @@  discard block
 block discarded – undo
149 155
 
150 156
 			$items = $this->getItemsBlock();
151 157
 
152
-			if ($items->count() > 0) $contents->items = $items;
158
+			if ($items->count() > 0) {
159
+				$contents->items = $items;
160
+			}
153 161
 
154 162
 			# Set pagination
155 163
 
Please login to merge, or discard this patch.
Unused Use Statements   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,15 @@
 block discarded – undo
2 2
 
3 3
 namespace Modules\Filemanager\Handler {
4 4
 
5
-	use Modules\Filemanager, Utils\Messages, Utils\Pagination, Utils\Uploader, Utils\View;
6
-	use Ajax, Arr, Explorer, Language, Number, Request, Template, Url;
5
+	use Modules\Filemanager;
6
+	use Utils\Pagination;
7
+	use Utils\Uploader;
8
+	use Utils\View;
9
+	use Arr;
10
+	use Number;
11
+	use Request;
12
+	use Template;
13
+	use Url;
7 14
 
8 15
 	class Listview {
9 16
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Filemanager/Utils/Container.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@  discard block
 block discarded – undo
16 16
 
17 17
 			$path = implode('/', $scheme); $path_full = (DIR_UPLOADS . (('' !== $path) ? ($path . '/') : ''));
18 18
 
19
-			if (!Explorer::isDir($path_full)) return;
19
+			if (!Explorer::isDir($path_full)) {
20
+				return;
21
+			}
20 22
 
21 23
 			$this->scheme = $scheme; $this->path = $path; $this->path_full = $path_full;
22 24
 		}
@@ -27,9 +29,12 @@  discard block
 block discarded – undo
27 29
 
28 30
 			$scheme = []; $breadcrumbs = [];
29 31
 
30
-			if ([] !== $this->scheme) foreach ($this->scheme as $name) {
32
+			if ([] !== $this->scheme) {
33
+				foreach ($this->scheme as $name) {
31 34
 
32
-				$scheme[] = $name; $breadcrumbs[] = ['path' => implode('/', $scheme), 'name' => $name];
35
+				$scheme[] = $name;
36
+			}
37
+			$breadcrumbs[] = ['path' => implode('/', $scheme), 'name' => $name];
33 38
 			}
34 39
 
35 40
 			# ------------------------
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Filemanager/Utils/Entity.php 1 patch
Braces   +36 added lines, -12 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 		private function getPrototype(string $name) {
14 14
 
15
-			if (preg_match('/[\/\\\\]/', $name)) return false;
15
+			if (preg_match('/[\/\\\\]/', $name)) {
16
+				return false;
17
+			}
16 18
 
17 19
 			$path = (($this->parent->path() ? ($this->parent->path() . '/') : '') . $name);
18 20
 
@@ -34,11 +36,17 @@  discard block
 block discarded – undo
34 36
 
35 37
 		public function init(string $name) {
36 38
 
37
-			if (false === ($prototype = $this->getPrototype($name))) return false;
39
+			if (false === ($prototype = $this->getPrototype($name))) {
40
+				return false;
41
+			}
38 42
 
39
-			if (!Explorer::{static::$checker}($prototype['path_full'])) return false;
43
+			if (!Explorer::{static::$checker}($prototype['path_full'])) {
44
+				return false;
45
+			}
40 46
 
41
-			foreach ($prototype as $var => $value) $this->$var = $value;
47
+			foreach ($prototype as $var => $value) {
48
+				$this->$var = $value;
49
+			}
42 50
 
43 51
 			# ------------------------
44 52
 
@@ -49,11 +57,17 @@  discard block
 block discarded – undo
49 57
 
50 58
 		public function create(string $name) {
51 59
 
52
-			if (('' !== $this->name) || (false === ($prototype = $this->getPrototype($name)))) return false;
60
+			if (('' !== $this->name) || (false === ($prototype = $this->getPrototype($name)))) {
61
+				return false;
62
+			}
53 63
 
54
-			if (!Explorer::{static::$creator}($prototype['path_full'])) return false;
64
+			if (!Explorer::{static::$creator}($prototype['path_full'])) {
65
+				return false;
66
+			}
55 67
 
56
-			foreach ($prototype as $var => $value) $this->$var = $value;
68
+			foreach ($prototype as $var => $value) {
69
+				$this->$var = $value;
70
+			}
57 71
 
58 72
 			# ------------------------
59 73
 
@@ -64,11 +78,17 @@  discard block
 block discarded – undo
64 78
 
65 79
 		public function rename(string $name) {
66 80
 
67
-			if (('' === $this->name) || (false === ($prototype = $this->getPrototype($name)))) return false;
81
+			if (('' === $this->name) || (false === ($prototype = $this->getPrototype($name)))) {
82
+				return false;
83
+			}
68 84
 
69
-			if (!@rename($this->path_full, $prototype['path_full'])) return false;
85
+			if (!@rename($this->path_full, $prototype['path_full'])) {
86
+				return false;
87
+			}
70 88
 
71
-			foreach ($prototype as $var => $value) $this->$var = $value;
89
+			foreach ($prototype as $var => $value) {
90
+				$this->$var = $value;
91
+			}
72 92
 
73 93
 			# ------------------------
74 94
 
@@ -79,9 +99,13 @@  discard block
 block discarded – undo
79 99
 
80 100
 		public function remove() {
81 101
 
82
-			if ('' === $this->name) return false;
102
+			if ('' === $this->name) {
103
+				return false;
104
+			}
83 105
 
84
-			if (!Explorer::{static::$remover}($this->path_full, true)) return false;
106
+			if (!Explorer::{static::$remover}($this->path_full, true)) {
107
+				return false;
108
+			}
85 109
 
86 110
 			$this->name = ''; $this->path = ''; $this->path_full = '';
87 111
 
Please login to merge, or discard this patch.