Completed
Push — master ( 8e013f...5c10bd )
by Anton
03:39
created
www/engine/System/Classes/Modules/Entitizer/Definition/User.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,24 +14,24 @@
 block discarded – undo
14 14
 
15 15
 			# Add params
16 16
 
17
-			$this->addInteger       ('rank',            true, 1, RANK_USER, true, false);
18
-			$this->addTextual       ('name',            true, 16, false, true, true);
19
-			$this->addTextual       ('email',           true, 128, false, true, true);
20
-			$this->addTextual       ('auth_key',        true, 40, true, false, false);
21
-			$this->addTextual       ('password',        true, 40, true, false, false);
22
-			$this->addTextual       ('first_name',      true, 255, false, false, false);
23
-			$this->addTextual       ('last_name',       true, 255, false, false, false);
24
-			$this->addInteger       ('sex',             true, 1, SEX_NOT_SELECTED, false, false);
25
-			$this->addTextual       ('city',            true, 255, false, false, false);
26
-			$this->addTextual       ('country',         true, 2, false, false, false);
27
-			$this->addTextual       ('timezone',        true, 40, false, false, false);
28
-			$this->addInteger       ('time_registered', false, 10, 0, true, false);
29
-			$this->addInteger       ('time_logged',     false, 10, 0, true, false);
17
+			$this->addInteger('rank', true, 1, RANK_USER, true, false);
18
+			$this->addTextual('name', true, 16, false, true, true);
19
+			$this->addTextual('email', true, 128, false, true, true);
20
+			$this->addTextual('auth_key', true, 40, true, false, false);
21
+			$this->addTextual('password', true, 40, true, false, false);
22
+			$this->addTextual('first_name', true, 255, false, false, false);
23
+			$this->addTextual('last_name', true, 255, false, false, false);
24
+			$this->addInteger('sex', true, 1, SEX_NOT_SELECTED, false, false);
25
+			$this->addTextual('city', true, 255, false, false, false);
26
+			$this->addTextual('country', true, 2, false, false, false);
27
+			$this->addTextual('timezone', true, 40, false, false, false);
28
+			$this->addInteger('time_registered', false, 10, 0, true, false);
29
+			$this->addInteger('time_logged', false, 10, 0, true, false);
30 30
 
31 31
 			# Add orderers
32 32
 
33
-			$this->addOrderer       ('rank', true);
34
-			$this->addOrderer       ('name');
33
+			$this->addOrderer('rank', true);
34
+			$this->addOrderer('name');
35 35
 		}
36 36
 	}
37 37
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Definition/Widget.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@
 block discarded – undo
14 14
 
15 15
 			# Add params
16 16
 
17
-			$this->addTextual       ('name',            true, 255, false, true, true);
18
-			$this->addTextual       ('title',           true, 255, false, true, false);
19
-			$this->addBoolean       ('display',         true, true);
20
-			$this->addTextual       ('contents',        false, 0, false, false, false);
17
+			$this->addTextual('name', true, 255, false, true, true);
18
+			$this->addTextual('title', true, 255, false, true, false);
19
+			$this->addBoolean('display', true, true);
20
+			$this->addTextual('contents', false, 0, false, false, false);
21 21
 
22 22
 			# Add orderers
23 23
 
24
-			$this->addOrderer       ('title');
24
+			$this->addOrderer('title');
25 25
 		}
26 26
 	}
27 27
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Entity/Page.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 		private function getLink() {
21 21
 
22
-			if (0 === $this->id) return '';
22
+			if (0 === $this->id) {
23
+				return '';
24
+			}
23 25
 
24 26
 			return (INSTALL_PATH . '/' . $this->data['slug']);
25 27
 		}
@@ -28,7 +30,9 @@  discard block
 block discarded – undo
28 30
 
29 31
 		private function getCanonical() {
30 32
 
31
-			if (0 === $this->id) return '';
33
+			if (0 === $this->id) {
34
+				return '';
35
+			}
32 36
 
33 37
 			return (Settings::get('system_url') . (($this->id !== 1) ? ('/' . $this->data['slug']) : ''));
34 38
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Entity/Menuitem.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,13 @@
 block discarded – undo
12 12
 
13 13
 		private function getLink() {
14 14
 
15
-			if ('' === $this->data['slug']) return '';
15
+			if ('' === $this->data['slug']) {
16
+				return '';
17
+			}
16 18
 
17
-			if (false !== Validate::url($this->data['slug'])) return $this->data['slug'];
19
+			if (false !== Validate::url($this->data['slug'])) {
20
+				return $this->data['slug'];
21
+			}
18 22
 
19 23
 			# ------------------------
20 24
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Utils/Param/Id.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
 			return ("`" . $this->name . "` int(10) unsigned NOT NULL") .
25 25
 
26
-			       ($this->auto_increment ? " AUTO_INCREMENT" : "");
26
+				   ($this->auto_increment ? " AUTO_INCREMENT" : "");
27 27
 		}
28 28
 
29 29
 		# Cast value
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Utils/Param/Type/Textual.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 			return ("`" . $this->name . "` " . ($this->short ? ("varchar(" . $this->maxlength . ")") : "text")) .
27 27
 
28
-			       (($this->binary ? " CHARACTER SET utf8 COLLATE utf8_bin" : "") . " NOT NULL");
28
+				   (($this->binary ? " CHARACTER SET utf8 COLLATE utf8_bin" : "") . " NOT NULL");
29 29
 		}
30 30
 
31 31
 		# Cast value
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
 
17 17
 			# Set field configuration
18 18
 
19
-			foreach (get_defined_vars() as $name => $value) $this->$name = $value;
19
+			foreach (get_defined_vars() as $name => $value) {
20
+				$this->$name = $value;
21
+			}
20 22
 		}
21 23
 
22 24
 		# Get field statement
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Utils/Param/Type/Integer.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 			return ("`" . $this->name . "` " . ($this->short ? "tiny" : "") . "int(" . $this->maxlength . ") ") .
27 27
 
28
-			       ("unsigned NOT NULL DEFAULT '" . $this->default . "'");
28
+				   ("unsigned NOT NULL DEFAULT '" . $this->default . "'");
29 29
 		}
30 30
 
31 31
 		# Cast value
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
 
17 17
 			# Set field configuration
18 18
 
19
-			foreach (get_defined_vars() as $name => $value) $this->$name = $value;
19
+			foreach (get_defined_vars() as $name => $value) {
20
+				$this->$name = $value;
21
+			}
20 22
 		}
21 23
 
22 24
 		# Get field statement
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Utils/Param/Param.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
 			return ($this->index ? (($this->unique ? ($this->primary ? "PRIMARY " : "UNIQUE ") : "") .
42 42
 
43
-			       ("KEY `" . $this->name . "` (`" . $this->name . "`)")) : false);
43
+				   ("KEY `" . $this->name . "` (`" . $this->name . "`)")) : false);
44 44
 		}
45 45
 	}
46 46
 }
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Utils/Definition.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 		private function addParam(Param $param) {
14 14
 
15
-			if (('' === $param->name()) || isset($this->params[$param->name()])) return;
15
+			if (('' === $param->name()) || isset($this->params[$param->name()])) {
16
+				return;
17
+			}
16 18
 
17 19
 			$this->params[$param->name()] = $param;
18 20
 		}
@@ -26,7 +28,9 @@  discard block
 block discarded – undo
26 28
 
27 29
 			foreach ($this->params as $param) {
28 30
 
29
-				if (false !== ($statement = $param->$method())) $statements[] = $statement;
31
+				if (false !== ($statement = $param->$method())) {
32
+					$statements[] = $statement;
33
+				}
30 34
 			}
31 35
 
32 36
 			# ------------------------
@@ -63,7 +67,9 @@  discard block
 block discarded – undo
63 67
 
64 68
 		protected function addOrderer(string $name, bool $descending = false) {
65 69
 
66
-			if (!isset($this->params[$name]) || isset($this->orderers[$name])) return;
70
+			if (!isset($this->params[$name]) || isset($this->orderers[$name])) {
71
+				return;
72
+			}
67 73
 
68 74
 			$this->orderers[$name] = $descending;
69 75
 		}
@@ -128,10 +134,12 @@  discard block
 block discarded – undo
128 134
 
129 135
 			$params = [];
130 136
 
131
-			foreach ($data as $name => $value) if (isset($this->params[$name])) {
137
+			foreach ($data as $name => $value) {
138
+				if (isset($this->params[$name])) {
132 139
 
133 140
 				$params[$name] = $this->params[$name]->cast($value);
134 141
 			}
142
+			}
135 143
 
136 144
 			# ------------------------
137 145
 
Please login to merge, or discard this patch.