Passed
Branch develop (786e4f)
by Daniel
07:32
created
services/blocks/cfg_fields.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		$options = $this->get_select_options($option_ary, $selected_item, $key, $data_toggle_key);
43 43
 		$data_toggle = ($data_toggle_key) ? ' data-togglable-settings="true"' : '';
44 44
 
45
-		return '<select id="' . $key . '" name="config[' . $key . ']' . (($multi_select) ? '[]" multiple="multiple"' : '"') . (($size > 1) ? ' size="' . $size . '"' : '') . $data_toggle . '>' . $options . '</select>';
45
+		return '<select id="'.$key.'" name="config['.$key.']'.(($multi_select) ? '[]" multiple="multiple"' : '"').(($size > 1) ? ' size="'.$size.'"' : '').$data_toggle.'>'.$options.'</select>';
46 46
 	}
47 47
 
48 48
 	/**
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 	{
58 58
 		$selected_items = $this->ensure_array($selected_items);
59 59
 
60
-		$html = '<select id="' . $field . '" name="config[' . $field . '][]" multiple="multiple">';
60
+		$html = '<select id="'.$field.'" name="config['.$field.'][]" multiple="multiple">';
61 61
 		foreach ($option_ary as $value => $title)
62 62
 		{
63 63
 			$selected = $this->get_selected_option($value, $selected_items);
64
-			$html .= '<option value="' . $value . '"' . $selected . '>' . $this->translator->lang($title) . '</option>';
64
+			$html .= '<option value="'.$value.'"'.$selected.'>'.$this->translator->lang($title).'</option>';
65 65
 		}
66 66
 		$html .= '</select>';
67 67
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 		foreach ($option_ary as $value => $title)
121 121
 		{
122 122
 			$selected = $this->get_selected_option($value, $selected_item, 'checked');
123
-			$html .= '<label><input type="radio" name="config[' . $key . ']" value="' . $value . '"' . $selected . ' class="radio" /> ' . $this->translator->lang($title) . '</label><br />';
123
+			$html .= '<label><input type="radio" name="config['.$key.']" value="'.$value.'"'.$selected.' class="radio" /> '.$this->translator->lang($title).'</label><br />';
124 124
 		}
125 125
 
126 126
 		return $html;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 */
165 165
 	protected function get_selected_option($needle, array $haystack, $type = 'selected')
166 166
 	{
167
-		return (in_array($needle, $haystack)) ? ' ' . $type . '="' . $type . '"' : '';
167
+		return (in_array($needle, $haystack)) ? ' '.$type.'="'.$type.'"' : '';
168 168
 	}
169 169
 
170 170
 	/**
@@ -178,12 +178,12 @@  discard block
 block discarded – undo
178 178
 	 */
179 179
 	protected function get_checkbox_column(array $row, array $selected_items, $field, $column_class, $column_count, &$index)
180 180
 	{
181
-		$column = '<div class="' . $column_class . $field . '-checkbox" id="' . $field . '-col-' . $column_count . '">';
181
+		$column = '<div class="'.$column_class.$field.'-checkbox" id="'.$field.'-col-'.$column_count.'">';
182 182
 		foreach ($row as $value => $title)
183 183
 		{
184 184
 			$title = $this->translator->lang($title);
185 185
 			$selected = $this->get_selected_option($value, $selected_items, 'checked');
186
-			$column .= '<label><input type="checkbox" name="config[' . $field . '][' . $index . ']" value="' . $value . '"' . $selected . ' class="checkbox" /> ' . $title . '</label><br />';
186
+			$column .= '<label><input type="checkbox" name="config['.$field.']['.$index.']" value="'.$value.'"'.$selected.' class="checkbox" /> '.$title.'</label><br />';
187 187
 			$index++;
188 188
 		}
189 189
 		$column .= '</div>';
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 		foreach ($option_ary as $value => $title)
205 205
 		{
206 206
 			$selected = $this->get_selected_option($value, $selected_items);
207
-			$togglable_option = ($togglable_key) ? ' data-toggle-setting="#' . $togglable_key . '-' . $value . '"' : '';
208
-			$options .= '<option value="' . $value . '"' . $selected . $togglable_option . '>' . $this->translator->lang($title) . '</option>';
207
+			$togglable_option = ($togglable_key) ? ' data-toggle-setting="#'.$togglable_key.'-'.$value.'"' : '';
208
+			$options .= '<option value="'.$value.'"'.$selected.$togglable_option.'>'.$this->translator->lang($title).'</option>';
209 209
 		}
210 210
 		return $options;
211 211
 	}
Please login to merge, or discard this patch.
services/blocks/cfg_handler.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		// @codeCoverageIgnoreStart
62 62
 		if (!function_exists('build_cfg_template'))
63 63
 		{
64
-			include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext);
64
+			include($this->phpbb_root_path.'includes/functions_acp.'.$this->php_ext);
65 65
 		}
66 66
 		// @codeCoverageIgnoreEnd
67 67
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		// @codeCoverageIgnoreStart
101 101
 		if (!function_exists('validate_config_vars'))
102 102
 		{
103
-			include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext);
103
+			include($this->phpbb_root_path.'includes/functions_acp.'.$this->php_ext);
104 104
 		}
105 105
 		// @codeCoverageIgnoreEnd
106 106
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 		if (empty($vars['object']))
219 219
 		{
220 220
 			$object = $this;
221
-			$method = 'prep_' . $type[0] . '_field_for_display';
221
+			$method = 'prep_'.$type[0].'_field_for_display';
222 222
 
223 223
 			if (is_callable(array($this, $method)))
224 224
 			{
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 		$l_explain = '';
281 281
 		if (!empty($vars['explain']))
282 282
 		{
283
-			$l_explain = (isset($vars['lang_explain'])) ? $this->translator->lang($vars['lang_explain']) : $this->translator->lang($vars['lang'] . '_EXPLAIN');
283
+			$l_explain = (isset($vars['lang_explain'])) ? $this->translator->lang($vars['lang_explain']) : $this->translator->lang($vars['lang'].'_EXPLAIN');
284 284
 		}
285 285
 
286 286
 		return $l_explain;
@@ -341,9 +341,9 @@  discard block
 block discarded – undo
341 341
 	{
342 342
 		$vars['method'] = 'build_select';
343 343
 		$vars['params'][] = $field;
344
-		$vars['params'][] = $type[1] ?: 1;				// size
345
-		$vars['params'][] = (bool) $type[2] ?: false;	// multi select
346
-		$vars['params'][] = $type[3] ?: '';				// togggle key
344
+		$vars['params'][] = $type[1] ?: 1; // size
345
+		$vars['params'][] = (bool) $type[2] ?: false; // multi select
346
+		$vars['params'][] = $type[3] ?: ''; // togggle key
347 347
 		$type[0] = 'custom';
348 348
 	}
349 349
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 	{
384 384
 		$this->prep_checkbox_field_for_display($vars, $type, $field);
385 385
 
386
-		$vars['method'] ='build_multi_select';
386
+		$vars['method'] = 'build_multi_select';
387 387
 	}
388 388
 
389 389
 	/**
Please login to merge, or discard this patch.