Completed
Pull Request — master (#26)
by Daniel
10:35 queued 08:50
created
services/blocks/cfg_fields.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@
 block discarded – undo
24 24
 		$this->translator = $translator;
25 25
 	}
26 26
 
27
-    /**
28
-     * Used to add a select drop down in blocks config
29
-     *
30
-     * @param array $option_ary
31
-     * @param string $selected_item
32
-     * @param string $key
33
-     * @return string
34
-     */
27
+	/**
28
+	 * Used to add a select drop down in blocks config
29
+	 *
30
+	 * @param array $option_ary
31
+	 * @param string $selected_item
32
+	 * @param string $key
33
+	 * @return string
34
+	 */
35 35
 	public function build_select($option_ary, $selected_item, $key)
36 36
 	{
37 37
 		$html = '<select id="' . $key . '" name="config[' . $key . ']">';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
      */
35 35
 	public function build_select($option_ary, $selected_item, $key)
36 36
 	{
37
-		$html = '<select id="' . $key . '" name="config[' . $key . ']">';
37
+		$html = '<select id="'.$key.'" name="config['.$key.']">';
38 38
 		foreach ($option_ary as $value => $title)
39 39
 		{
40 40
 			$selected = ($value == $selected_item) ? ' selected="selected"' : '';
41
-			$html .= '<option value="' . $value . '"' . $selected . '>' . $this->translator->lang($title) . '</option>';
41
+			$html .= '<option value="'.$value.'"'.$selected.'>'.$this->translator->lang($title).'</option>';
42 42
 		}
43 43
 		$html .= '</select>';
44 44
 
@@ -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;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	 */
164 164
 	protected function get_selected_option($needle, array $haystack, $type = 'selected')
165 165
 	{
166
-		return (in_array($needle, $haystack)) ? ' ' . $type . '="' . $type . '"' : '';
166
+		return (in_array($needle, $haystack)) ? ' '.$type.'="'.$type.'"' : '';
167 167
 	}
168 168
 
169 169
 	/**
@@ -177,12 +177,12 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	protected function get_checkbox_column(array $row, array $selected_items, $field, $column_class, $column_count, &$index)
179 179
 	{
180
-		$column = '<div class="' . $column_class . $field . '-checkbox" id="' . $field . '-col-' . $column_count . '">';
180
+		$column = '<div class="'.$column_class.$field.'-checkbox" id="'.$field.'-col-'.$column_count.'">';
181 181
 		foreach ($row as $value => $title)
182 182
 		{
183 183
 			$title = $this->translator->lang($title);
184 184
 			$selected = $this->get_selected_option($value, $selected_items, 'checked');
185
-			$column .= '<label><input type="checkbox" name="config[' . $field . '][' . $index . ']" value="' . $value . '"' . $selected . ' class="checkbox" /> ' . $title . '</label><br />';
185
+			$column .= '<label><input type="checkbox" name="config['.$field.']['.$index.']" value="'.$value.'"'.$selected.' class="checkbox" /> '.$title.'</label><br />';
186 186
 			$index++;
187 187
 		}
188 188
 		$column .= '</div>';
Please login to merge, or discard this patch.