Passed
Branch 0.3.0 (b16461)
by Anton
03:34
created
www/engine/System/Classes/Modules/Entitizer/View/Users.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,29 +12,29 @@
 block discarded – undo
12 12
 
13 13
 		protected function init() {
14 14
 
15
-			$this->config->add('rank', null, function (int $rank = null) {
15
+			$this->config->add('rank', null, function(int $rank = null) {
16 16
 
17
-				return ((null !== $rank) ? ("ent.rank >= " . $rank) : '');
17
+				return ((null !== $rank) ? ("ent.rank >= ".$rank) : '');
18 18
 			});
19 19
 
20
-			$this->config->add('time_registered >=', 0, function (int $time) {
20
+			$this->config->add('time_registered >=', 0, function(int $time) {
21 21
 
22
-				return ((0 < $time) ? ("ent.time_registered >= " . $time) : '');
22
+				return ((0 < $time) ? ("ent.time_registered >= ".$time) : '');
23 23
 			});
24 24
 
25
-			$this->config->add('time_registered <=', 0, function (int $time) {
25
+			$this->config->add('time_registered <=', 0, function(int $time) {
26 26
 
27
-				return ((0 < $time) ? ("ent.time_registered <= " . $time) : '');
27
+				return ((0 < $time) ? ("ent.time_registered <= ".$time) : '');
28 28
 			});
29 29
 
30
-			$this->config->add('time_logged >=', 0, function (int $time) {
30
+			$this->config->add('time_logged >=', 0, function(int $time) {
31 31
 
32
-				return ((0 < $time) ? ("ent.time_logged >= " . $time) : '');
32
+				return ((0 < $time) ? ("ent.time_logged >= ".$time) : '');
33 33
 			});
34 34
 
35
-			$this->config->add('time_logged <=', 0, function (int $time) {
35
+			$this->config->add('time_logged <=', 0, function(int $time) {
36 36
 
37
-				return ((0 < $time) ? ("ent.time_logged <= " . $time) : '');
37
+				return ((0 < $time) ? ("ent.time_logged <= ".$time) : '');
38 38
 			});
39 39
 		}
40 40
 	}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/View/Menuitems.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 		protected function init() {
14 14
 
15
-			$this->config->add('active', false, function (bool $active) {
15
+			$this->config->add('active', false, function(bool $active) {
16 16
 
17 17
 				return ($active ? "ent.active = 1" : '');
18 18
 			});
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Page.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,11 +44,15 @@
 block discarded – undo
44 44
 			$data['contents']           = $contents;
45 45
 			$data['time_modified']      = REQUEST_TIME;
46 46
 
47
-			if (0 === $this->page->id) $data['time_created'] = REQUEST_TIME;
47
+			if (0 === $this->page->id) {
48
+				$data['time_created'] = REQUEST_TIME;
49
+			}
48 50
 
49 51
 			$modifier = ((0 === $this->page->id) ? 'create' : 'edit');
50 52
 
51
-			if (!$this->page->$modifier($data)) return 'PAGE_ERROR_MODIFY';
53
+			if (!$this->page->$modifier($data)) {
54
+				return 'PAGE_ERROR_MODIFY';
55
+			}
52 56
 
53 57
 			# ------------------------
54 58
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Widget.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
 			# Check name exists
31 31
 
32
-			if (false === ($check_name = $this->widget->check($name, 'name'))) return 'WIDGET_ERROR_MODIFY';
32
+			if (false === ($check_name = $this->widget->check($name, 'name'))) {
33
+				return 'WIDGET_ERROR_MODIFY';
34
+			}
33 35
 
34
-			if ($check_name === 1) return ['name', 'WIDGET_ERROR_NAME_DUPLICATE'];
36
+			if ($check_name === 1) {
37
+				return ['name', 'WIDGET_ERROR_NAME_DUPLICATE'];
38
+			}
35 39
 
36 40
 			# Modify widget
37 41
 
@@ -44,7 +48,9 @@  discard block
 block discarded – undo
44 48
 
45 49
 			$modifier = ((0 === $this->widget->id) ? 'create' : 'edit');
46 50
 
47
-			if (!$this->widget->$modifier($data)) return 'WIDGET_ERROR_MODIFY';
51
+			if (!$this->widget->$modifier($data)) {
52
+				return 'WIDGET_ERROR_MODIFY';
53
+			}
48 54
 
49 55
 			# ------------------------
50 56
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Controller/Variable.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,13 @@  discard block
 block discarded – undo
29 29
 
30 30
 			# Check name exists
31 31
 
32
-			if (false === ($check_name = $this->variable->check($name, 'name'))) return 'VARIABLE_ERROR_MODIFY';
32
+			if (false === ($check_name = $this->variable->check($name, 'name'))) {
33
+				return 'VARIABLE_ERROR_MODIFY';
34
+			}
33 35
 
34
-			if ($check_name === 1) return ['name', 'VARIABLE_ERROR_NAME_DUPLICATE'];
36
+			if ($check_name === 1) {
37
+				return ['name', 'VARIABLE_ERROR_NAME_DUPLICATE'];
38
+			}
35 39
 
36 40
 			# Modify variable
37 41
 
@@ -43,7 +47,9 @@  discard block
 block discarded – undo
43 47
 
44 48
 			$modifier = ((0 === $this->variable->id) ? 'create' : 'edit');
45 49
 
46
-			if (!$this->variable->$modifier($data)) return 'VARIABLE_ERROR_MODIFY';
50
+			if (!$this->variable->$modifier($data)) {
51
+				return 'VARIABLE_ERROR_MODIFY';
52
+			}
47 53
 
48 54
 			# ------------------------
49 55
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Handler/Page.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,14 +34,18 @@
 block discarded – undo
34 34
 
35 35
 				$parent->block('browse')->disable(); $parent->block('browse_disabled')->enable();
36 36
 
37
-			} else $parent->block('browse')->link = $this->parent->link;
37
+			} else {
38
+				$parent->block('browse')->link = $this->parent->link;
39
+			}
38 40
 		}
39 41
 
40 42
 		# Add additional parent data for specific entity
41 43
 
42 44
 		protected function processEntity(Template\Asset\Block $contents) {
43 45
 
44
-			if (!$this->create && $this->parent->locked) $contents->block('locked')->enable();
46
+			if (!$this->create && $this->parent->locked) {
47
+				$contents->block('locked')->enable();
48
+			}
45 49
 		}
46 50
 	}
47 51
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Handler/User.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@
 block discarded – undo
28 28
 
29 29
 		protected function processEntity(Template\Asset\Block $contents) {
30 30
 
31
-			if ($this->create) $contents->block('info')->disable(); else {
31
+			if ($this->create) {
32
+				$contents->block('info')->disable();
33
+			} else {
32 34
 
33 35
 				$contents->block('info')->time_registered = Date::get(DATE_FORMAT_DATETIME, $this->entity->time_registered);
34 36
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Lister/Menuitems.php 1 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/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
 
@@ -23,13 +25,17 @@  discard block
 block discarded – undo
23 25
 
24 26
 			# Process post data
25 27
 
26
-			foreach ($post as $name => $value) if (!Settings::set($name, $value))
28
+			foreach ($post as $name => $value) {
29
+				if (!Settings::set($name, $value))
27 30
 
28 31
 				return (isset($errors[$name]) ? [$name, $errors[$name]] : false);
32
+			}
29 33
 
30 34
 			# Save settings
31 35
 
32
-			if (!Settings::save()) return 'SETTINGS_ERROR_SAVE';
36
+			if (!Settings::save()) {
37
+				return 'SETTINGS_ERROR_SAVE';
38
+			}
33 39
 
34 40
 			# ------------------------
35 41
 
Please login to merge, or discard this patch.