Passed
Pull Request — master (#11)
by Anton
03:24
created
www/engine/System/Languages/en-US/Phrases/Admin.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
 	'DASHBOARD_GROUP_DATABASE'                  => 'Database',
66 66
 
67 67
 	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Installation file <a href="$install_path$/install.php" target="_blank">install.php</a> ' .
68
-	                                               'still exists in the root of your site. It\'s necessary to remove it.',
68
+												   'still exists in the root of your site. It\'s necessary to remove it.',
69 69
 	'DASHBOARD_MESSAGE_SETTINGS_FILE'           => 'It seems you have not yet edited site settings. ' .
70
-	                                               'Go to <a href="$install_path$/admin/system/settings">settings page</a> to provide actual data.',
70
+												   'Go to <a href="$install_path$/admin/system/settings">settings page</a> to provide actual data.',
71 71
 
72 72
 	# Pages
73 73
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,9 +64,9 @@
 block discarded – undo
64 64
 	'DASHBOARD_GROUP_GENERAL'                   => 'General',
65 65
 	'DASHBOARD_GROUP_DATABASE'                  => 'Database',
66 66
 
67
-	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Installation file <a href="$install_path$/install.php" target="_blank">install.php</a> ' .
67
+	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Installation file <a href="$install_path$/install.php" target="_blank">install.php</a> '.
68 68
 	                                               'still exists in the root of your site. It\'s necessary to remove it.',
69
-	'DASHBOARD_MESSAGE_SETTINGS_FILE'           => 'It seems you have not yet edited site settings. ' .
69
+	'DASHBOARD_MESSAGE_SETTINGS_FILE'           => 'It seems you have not yet edited site settings. '.
70 70
 	                                               'Go to <a href="$install_path$/admin/system/settings">settings page</a> to provide actual data.',
71 71
 
72 72
 	# Pages
Please login to merge, or discard this patch.
www/engine/System/Languages/uk-UA/Phrases/Admin.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
 	'DASHBOARD_GROUP_DATABASE'                  => 'База даних',
66 66
 
67 67
 	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Інсталяційний файл <a href="$install_path$/install.php" target="_blank">install.php</a> ' .
68
-	                                               'досі знаходиться в кореневій директорії сайта. Необхідно видалити його.',
68
+												   'досі знаходиться в кореневій директорії сайта. Необхідно видалити його.',
69 69
 	'DASHBOARD_MESSAGE_SETTINGS_FILE'           => 'Схоже, Ви поки не редагували налаштування сайта. '.
70
-	                                               'Перейдіть на <a href="$install_path$/admin/system/settings">сторінку налаштувань</a> для введення актуальних даних.',
70
+												   'Перейдіть на <a href="$install_path$/admin/system/settings">сторінку налаштувань</a> для введення актуальних даних.',
71 71
 
72 72
 	# Pages
73 73
 
Please login to merge, or discard this patch.
www/engine/System/Languages/ru-RU/Phrases/Admin.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@
 block discarded – undo
65 65
 	'DASHBOARD_GROUP_DATABASE'                  => 'База данных',
66 66
 
67 67
 	'DASHBOARD_MESSAGE_INSTALL_FILE'            => 'Установочный файл <a href="$install_path$/install.php" target="_blank">install.php</a> ' .
68
-	                                               'по-прежнему находится в корневой директории сайта. Необходимо удалить его.',
68
+												   'по-прежнему находится в корневой директории сайта. Необходимо удалить его.',
69 69
 	'DASHBOARD_MESSAGE_SETTINGS_FILE'           => 'Похоже, Вы пока не редактировали настройки сайта. '.
70
-	                                               'Перейдите на <a href="$install_path$/admin/system/settings">страницу настроек</a> для ввода актуальных данных.',
70
+												   'Перейдите на <a href="$install_path$/admin/system/settings">страницу настроек</a> для ввода актуальных данных.',
71 71
 
72 72
 	# Pages
73 73
 
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Dataset/Dataset.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		 * If a validator was not given, a default validator will be used to convert a given variable type to a default's type.
30 30
 		 * In a case the conversion fails an existing value will not be changed
31 31
 		 *
32
-		 * @return the current dataset object
32
+		 * @return Dataset current dataset object
33 33
 		 */
34 34
 
35 35
 		public function addParam(string $name, $default, callable $validator = null) : Dataset {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		/**
49 49
 		 * Add multiple params
50 50
 		 *
51
-		 * @return the current dataset object
51
+		 * @return Dataset current dataset object
52 52
 		 */
53 53
 
54 54
 		public function addParams(array $data) : Dataset {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		/**
62 62
 		 * Update a value
63 63
 		 *
64
-		 * @return true on success, false on error, or null if the param does not exist
64
+		 * @return null|boolean on success, false on error, or null if the param does not exist
65 65
 		 */
66 66
 
67 67
 		public function set(string $name, $value) {
Please login to merge, or discard this patch.
Braces   +28 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 		public function addParam(string $name, $default, callable $validator = null) : Dataset {
36 36
 
37
-			if ('' === $name) return $this;
37
+			if ('' === $name) {
38
+				return $this;
39
+			}
38 40
 
39 41
 			$this->data[$name] = $default; $this->defaults[$name] = $default;
40 42
 
@@ -53,7 +55,9 @@  discard block
 block discarded – undo
53 55
 
54 56
 		public function addParams(array $data) : Dataset {
55 57
 
56
-			foreach ($data as $name => $value) if (is_scalar($name)) $this->addParam($name, $value);
58
+			foreach ($data as $name => $value) {
59
+				if (is_scalar($name)) $this->addParam($name, $value);
60
+			}
57 61
 
58 62
 			return $this;
59 63
 		}
@@ -66,16 +70,16 @@  discard block
 block discarded – undo
66 70
 
67 71
 		public function set(string $name, $value) {
68 72
 
69
-			if (!isset($this->validators[$name])) return null;
73
+			if (!isset($this->validators[$name])) {
74
+				return null;
75
+			}
70 76
 
71 77
 			try {
72 78
 
73
-				if (null === ($value = $this->validators[$name]($value))) return false;
74
-
75
-				else { $this->data[$name] = $value; return true; }
76
-			}
77
-
78
-			catch (TypeError $e) { return false; }
79
+				if (null === ($value = $this->validators[$name]($value))) {
80
+					return false;
81
+				} else { $this->data[$name] = $value; return true; }
82
+			} catch (TypeError $e) { return false; }
79 83
 		}
80 84
 
81 85
 		/**
@@ -90,7 +94,9 @@  discard block
 block discarded – undo
90 94
 
91 95
 			foreach ($data as $name => $value) {
92 96
 
93
-				if (null !== ($value = $this->set($name, $value))) $setted[$name] = $value;
97
+				if (null !== ($value = $this->set($name, $value))) {
98
+					$setted[$name] = $value;
99
+				}
94 100
 			}
95 101
 
96 102
 			# ------------------------
@@ -106,16 +112,18 @@  discard block
 block discarded – undo
106 112
 
107 113
 		public function cast(string $name, $value) {
108 114
 
109
-			if (!isset($this->validators[$name])) return null;
115
+			if (!isset($this->validators[$name])) {
116
+				return null;
117
+			}
110 118
 
111 119
 			try {
112 120
 
113
-				if (null !== ($value = $this->validators[$name]($value))) return $value;
114
-
115
-				else return $this->data[$name];
116
-			}
117
-
118
-			catch (TypeError $e) { return $this->data[$name]; }
121
+				if (null !== ($value = $this->validators[$name]($value))) {
122
+					return $value;
123
+				} else {
124
+					return $this->data[$name];
125
+				}
126
+			} catch (TypeError $e) { return $this->data[$name]; }
119 127
 		}
120 128
 
121 129
 		/**
@@ -130,7 +138,9 @@  discard block
 block discarded – undo
130 138
 
131 139
 			foreach ($data as $name => $value) {
132 140
 
133
-				if (null !== ($value = $this->cast($name, $value))) $casted[$name] = $value;
141
+				if (null !== ($value = $this->cast($name, $value))) {
142
+					$casted[$name] = $value;
143
+				}
134 144
 			}
135 145
 
136 146
 			# ------------------------
Please login to merge, or discard this patch.
www/engine/Framework/Classes/Form/Field/Select.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
 		/**
149 149
 		 * Set a value
150 150
 		 *
151
-		 * @return true if the result value is not empty, otherwise false
151
+		 * @return boolean if the result value is not empty, otherwise false
152 152
 		 */
153 153
 
154 154
 		public function setValue(string $value) {
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,9 +77,13 @@  discard block
 block discarded – undo
77 77
 
78 78
 			# Set appearance
79 79
 
80
-			if ($this->search) $tag->setAttribute('data-search', 'search');
80
+			if ($this->search) {
81
+				$tag->setAttribute('data-search', 'search');
82
+			}
81 83
 
82
-			if ($this->auto) $tag->setAttribute('data-auto', 'auto');
84
+			if ($this->auto) {
85
+				$tag->setAttribute('data-auto', 'auto');
86
+			}
83 87
 
84 88
 			# Set options
85 89
 
@@ -87,7 +91,9 @@  discard block
 block discarded – undo
87 91
 
88 92
 				$option = (new Tag('option', [], $text))->setAttribute('value', $value);
89 93
 
90
-				if ($this->value === $value) $option->setAttribute('selected', '');
94
+				if ($this->value === $value) {
95
+					$option->setAttribute('selected', '');
96
+				}
91 97
 
92 98
 				$options->addItem($option->getBlock());
93 99
 			}
Please login to merge, or discard this patch.
www/engine/System/Classes/Frames/Admin/Area/Install.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
 
13 13
 			# Handle request
14 14
 
15
-			if (Template::isBlock($result = $this->handle())) return $this->displayPage($result, STATUS_CODE_200);
15
+			if (Template::isBlock($result = $this->handle())) {
16
+				return $this->displayPage($result, STATUS_CODE_200);
17
+			}
16 18
 
17 19
 			# ------------------------
18 20
 
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Handler/Reset.php 2 patches
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 handle() {
14 14
 
15
-			if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register');
15
+			if (Auth::initial()) Request::redirect(INSTALL_PATH.'/admin/register');
16 16
 
17 17
 			return (new Auth\Action\Login)->handle();
18 18
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
 
13 13
 		protected function handle() {
14 14
 
15
-			if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register');
15
+			if (Auth::initial()) {
16
+				Request::redirect(INSTALL_PATH . '/admin/register');
17
+			}
16 18
 
17 19
 			return (new Auth\Action\Login)->handle();
18 20
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Auth/Handler/Recover.php 2 patches
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 handle() {
14 14
 
15
-			if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register');
15
+			if (Auth::initial()) Request::redirect(INSTALL_PATH.'/admin/register');
16 16
 
17 17
 			return (new Auth\Action\Login)->handle();
18 18
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
 
13 13
 		protected function handle() {
14 14
 
15
-			if (Auth::initial()) Request::redirect(INSTALL_PATH . '/admin/register');
15
+			if (Auth::initial()) {
16
+				Request::redirect(INSTALL_PATH . '/admin/register');
17
+			}
16 18
 
17 19
 			return (new Auth\Action\Login)->handle();
18 20
 		}
Please login to merge, or discard this patch.
www/engine/System/Classes/Modules/Entitizer/Collection/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->addParam('active', '', function (bool $active) {
15
+			$this->config->addParam('active', '', function(bool $active) {
16 16
 
17 17
 				return ($active ? "ent.active = 1" : '');
18 18
 			});
Please login to merge, or discard this patch.