Passed
Push — 0.4.0 ( cba0fe...bc0e2e )
by Anton
03:10
created
www/engine/System/Classes/Modules/Filemanager/Controller/Rename.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,23 +29,31 @@
 block discarded – undo
29 29
 
30 30
 			# Check for demo mode
31 31
 
32
-			if (MODE_DEMO) return 'DEMO_MODE_RESTRICTION';
32
+			if (MODE_DEMO) {
33
+				return 'DEMO_MODE_RESTRICTION';
34
+			}
33 35
 
34 36
 			# Validate name
35 37
 
36
-			if (false === ($name = Validate::fileName($name))) return ['name', 'FILEMANAGER_ERROR_NAME_INVALID'];
38
+			if (false === ($name = Validate::fileName($name))) {
39
+				return ['name', 'FILEMANAGER_ERROR_NAME_INVALID'];
40
+			}
37 41
 
38 42
 			# Check if item exists
39 43
 
40 44
 			if ((0 !== strcasecmp($this->entity->name(), $name)) &&
41 45
 
42
-				@file_exists($this->entity->parent()->pathFull() . $name)) return ['name', 'FILEMANAGER_ERROR_EXISTS'];
46
+				@file_exists($this->entity->parent()->pathFull() . $name)) {
47
+				return ['name', 'FILEMANAGER_ERROR_EXISTS'];
48
+			}
43 49
 
44 50
 			# Rename item
45 51
 
46
-			if (!$this->entity->rename($name)) return (($this->entity->type() === FILEMANAGER_TYPE_DIR) ?
52
+			if (!$this->entity->rename($name)) {
53
+				return (($this->entity->type() === FILEMANAGER_TYPE_DIR) ?
47 54
 
48 55
 				'FILEMANAGER_ERROR_DIR_RENAME' : 'FILEMANAGER_ERROR_FILE_RENAME');
56
+			}
49 57
 
50 58
 			# ------------------------
51 59
 
Please login to merge, or discard this patch.
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 (MODE_DEMO) return 'DEMO_MODE_RESTRICTION';
15
+			if (MODE_DEMO) {
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 (Settings::setArray($post) as $name => $result) {
27 29
 
28
-				if (!$result) return (isset($errors[$name]) ? [$name, $errors[$name]] : false);
30
+				if (!$result) {
31
+					return (isset($errors[$name]) ? [$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.