Completed
Pull Request — master (#26)
by Daniel
13:06 queued 10:06
created
services/forum/data.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@
 block discarded – undo
232 232
 		if (sizeof($post_ids))
233 233
 		{
234 234
 			$sql_where[] = $this->db->sql_in_set('p.post_id', $post_ids);
235
-		}
236
-		else if (sizeof($this->store['topic']))
235
+		} else if (sizeof($this->store['topic']))
237 236
 		{
238 237
 			$this->_limit_posts_by_topic($sql_where, $topic_first_or_last_post);
239 238
 		}
Please login to merge, or discard this patch.
services/forum/tracker.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
40 40
 		if ($this->can_track_by_lastread())
41 41
 		{
42 42
 			$info = $this->build_tracking_info('get_topic_tracking', $forums, $topics);
43
-		}
44
-		else if ($this->can_track_anonymous())
43
+		} else if ($this->can_track_anonymous())
45 44
 		{
46 45
 			$info = $this->build_tracking_info('get_complete_topic_tracking', $forums, $topics);
47 46
 		}
Please login to merge, or discard this patch.
services/poll.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	 * @param array $topic_data
69 69
 	 * @param \phpbb\template\twig\twig $template
70 70
 	 */
71
-	public function build(array $topic_data, \phpbb\template\twig\twig &$template)
71
+	public function build(array $topic_data, \phpbb\template\twig\twig & $template)
72 72
 	{
73 73
 		$this->translator->add_lang('viewtopic');
74 74
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 			'S_POLL_ACTION'		=> $viewtopic_url,
101 101
 			'S_FORM_TOKEN'		=> $this->sitemaker->get_form_key('posting'),
102 102
 
103
-			'U_VIEW_RESULTS'	=> $viewtopic_url . '&view=viewpoll',
103
+			'U_VIEW_RESULTS'	=> $viewtopic_url.'&view=viewpoll',
104 104
 		));
105 105
 	}
106 106
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		$post_id = (int) $topic_data['topic_first_post_id'];
133 133
 
134 134
 		$sql = 'SELECT o.*, p.bbcode_bitfield, p.bbcode_uid
135
-			FROM ' . POLL_OPTIONS_TABLE . ' o, ' . POSTS_TABLE . " p
135
+			FROM ' . POLL_OPTIONS_TABLE.' o, '.POSTS_TABLE." p
136 136
 			WHERE o.topic_id = $topic_id
137 137
 				AND p.post_id = $post_id
138 138
 				AND p.topic_id = o.topic_id
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 * @param int $poll_most
178 178
 	 * @param \phpbb\template\twig\twig $template
179 179
 	 */
180
-	private function _build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig &$template)
180
+	private function _build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig & $template)
181 181
 	{
182 182
 		foreach ($poll_info as $poll_option)
183 183
 		{
@@ -208,8 +208,8 @@  discard block
 block discarded – undo
208 208
 		if ($this->user->data['is_registered'])
209 209
 		{
210 210
 			$sql = 'SELECT poll_option_id
211
-			FROM ' . POLL_VOTES_TABLE . '
212
-			WHERE topic_id = ' . (int) $topic_id . '
211
+			FROM ' . POLL_VOTES_TABLE.'
212
+			WHERE topic_id = ' . (int) $topic_id.'
213 213
 				AND vote_user_id = ' . $this->user->data['user_id'];
214 214
 			$result = $this->db->sql_query($sql);
215 215
 
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
 			// Cookie based guest tracking ... I don't like this but hum ho
225 225
 			// it's oft requested. This relies on "nice" users who don't feel
226 226
 			// the need to delete cookies to mess with results.
227
-			if ($this->request->is_set($this->config['cookie_name'] . '_poll_' . $topic_id, \phpbb\request\request_interface::COOKIE))
227
+			if ($this->request->is_set($this->config['cookie_name'].'_poll_'.$topic_id, \phpbb\request\request_interface::COOKIE))
228 228
 			{
229
-				$cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'] . '_poll_' . $topic_id, '', true, \phpbb\request\request_interface::COOKIE));
229
+				$cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'].'_poll_'.$topic_id, '', true, \phpbb\request\request_interface::COOKIE));
230 230
 				$cur_voted_id = array_map('intval', $cur_voted_id);
231 231
 			}
232 232
 		}
Please login to merge, or discard this patch.
services/members.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
 		if (!function_exists('phpbb_get_user_avatar'))
64 64
 		{
65
-			include($phpbb_root_path . 'includes/functions_display.' . $php_ext);
65
+			include($phpbb_root_path.'includes/functions_display.'.$php_ext);
66 66
 		}
67 67
 	}
68 68
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	protected function member_posts(array $row)
101 101
 	{
102
-		$u_posts = append_sid($this->phpbb_root_path . 'search.' . $this->php_ext, "author_id={$row['user_id']}&sr=posts" . $this->explain_range);
103
-		$user_posts = '<a href="' . $u_posts . '">' . $row['user_posts'] . '</a>';
102
+		$u_posts = append_sid($this->phpbb_root_path.'search.'.$this->php_ext, "author_id={$row['user_id']}&amp;sr=posts".$this->explain_range);
103
+		$user_posts = '<a href="'.$u_posts.'">'.$row['user_posts'].'</a>';
104 104
 
105 105
 		return array(
106 106
 			'USERNAME'		=> get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']),
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 			'WHERE'			=> $this->db->sql_in_set('u.user_type', array(USER_NORMAL, USER_FOUNDER)),
169 169
 		);
170 170
 
171
-		$sql_method = 'set_' . $this->settings['query_type'] . '_sql';
171
+		$sql_method = 'set_'.$this->settings['query_type'].'_sql';
172 172
 		call_user_func_array(array($this, $sql_method), array(&$sql_ary));
173 173
 
174 174
 		$this->set_range_sql($sql_ary);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 		$this->info_header = '';
199 199
 		$this->view_mode = 'member_bots';
200 200
 
201
-		$sql_ary['WHERE'] = 'u.user_type = ' . USER_IGNORE;
201
+		$sql_ary['WHERE'] = 'u.user_type = '.USER_IGNORE;
202 202
 	}
203 203
 
204 204
 	/**
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	protected function set_tenured_sql(array &$sql_ary)
208 208
 	{
209 209
 		$sql_ary['SELECT'] .= ', u.user_regdate as member_date';
210
-		$sql_ary['ORDER_BY'] = 'u.user_regdate ' . (($this->settings['query_type'] == 'tenured') ? 'ASC' : 'DESC');
210
+		$sql_ary['ORDER_BY'] = 'u.user_regdate '.(($this->settings['query_type'] == 'tenured') ? 'ASC' : 'DESC');
211 211
 
212 212
 		$this->sql_date_field = 'u.user_regdate';
213 213
 		$this->settings['date_range'] = '';
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		$sql_ary['SELECT'] .= ', COUNT(p.post_id) as user_posts';
231 231
 		$sql_ary['FROM'] += array(TOPICS_TABLE => 't');
232 232
 		$sql_ary['FROM'] += array(POSTS_TABLE => 'p');
233
-		$sql_ary['WHERE'] .= ' AND ' . time() . ' > t.topic_time AND t.topic_id = p.topic_id AND p.post_visibility = ' . ITEM_APPROVED . ' AND p.poster_id = u.user_id';
233
+		$sql_ary['WHERE'] .= ' AND '.time().' > t.topic_time AND t.topic_id = p.topic_id AND p.post_visibility = '.ITEM_APPROVED.' AND p.poster_id = u.user_id';
234 234
 		$sql_ary['GROUP_BY'] = 'u.user_id';
235 235
 		$sql_ary['ORDER_BY'] = 'user_posts DESC, u.username ASC';
236 236
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		if ($this->settings['date_range'] && $this->sql_date_field)
248 248
 		{
249 249
 			$range = $this->date_range->get($this->settings['date_range']);
250
-			$this->explain_range = '&amp;date=' . $range['date'];
250
+			$this->explain_range = '&amp;date='.$range['date'];
251 251
 
252 252
 			$sql_ary['WHERE'] .= " AND {$this->sql_date_field} BETWEEN {$range['start']} AND {$range['stop']}";
253 253
 		}
Please login to merge, or discard this patch.
services/blocks/cfg_fields.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		foreach ($option_ary as $value => $title)
120 120
 		{
121 121
 			$selected = $this->get_selected_option($value, $selected_item, 'checked');
122
-			$html .= '<label><input type="radio" name="config[' . $key . ']" value="' . $value . '"' . $selected . ' class="radio" /> ' . $this->translator->lang($title) . '</label><br />';
122
+			$html .= '<label><input type="radio" name="config['.$key.']" value="'.$value.'"'.$selected.' class="radio" /> '.$this->translator->lang($title).'</label><br />';
123 123
 		}
124 124
 
125 125
 		return $html;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	public function build_hidden($value, $field)
136 136
 	{
137
-		return '<input type="hidden" name="config[' . $field . ']" value="' . $value . '" />';
137
+		return '<input type="hidden" name="config['.$field.']" value="'.$value.'" />';
138 138
 	}
139 139
 
140 140
 	/**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	 */
175 175
 	protected function get_selected_option($needle, array $haystack, $type = 'selected')
176 176
 	{
177
-		return (in_array($needle, $haystack)) ? ' ' . $type . '="' . $type . '"' : '';
177
+		return (in_array($needle, $haystack)) ? ' '.$type.'="'.$type.'"' : '';
178 178
 	}
179 179
 
180 180
 	/**
@@ -187,12 +187,12 @@  discard block
 block discarded – undo
187 187
 	 */
188 188
 	protected function get_checkbox_column(array $row, array $selected_items, $field, $column_count, $column_class)
189 189
 	{
190
-		$column = '<div class="' . $column_class . $field . '-checkbox" id="' . $field . '-col-' . $column_count . '">';
190
+		$column = '<div class="'.$column_class.$field.'-checkbox" id="'.$field.'-col-'.$column_count.'">';
191 191
 		foreach ($row as $value => $title)
192 192
 		{
193 193
 			$title = $this->translator->lang($title);
194 194
 			$selected = $this->get_selected_option($value, $selected_items, 'checked');
195
-			$column .= '<label><input type="checkbox" name="config[' . $field . '][]" value="' . $value . '"' . $selected . ' accesskey="' . $field . '" class="checkbox" /> ' . $title . '</label><br />';
195
+			$column .= '<label><input type="checkbox" name="config['.$field.'][]" value="'.$value.'"'.$selected.' accesskey="'.$field.'" class="checkbox" /> '.$title.'</label><br />';
196 196
 		}
197 197
 		$column .= '</div>';
198 198
 
Please login to merge, or discard this patch.
services/blocks/admin_bar.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -96,13 +96,13 @@  discard block
 block discarded – undo
96 96
 	public function set_javascript_data($route, $style_id)
97 97
 	{
98 98
 		$board_url = generate_board_url();
99
-		$ajax_url = $board_url . ((!$this->config['enable_mod_rewrite']) ? '/app.' . $this->php_ext : '');
99
+		$ajax_url = $board_url.((!$this->config['enable_mod_rewrite']) ? '/app.'.$this->php_ext : '');
100 100
 
101 101
 		$is_default_route = $u_default_route = false;
102 102
 		if ($this->config['sitemaker_default_layout'])
103 103
 		{
104 104
 			$is_default_route = ($this->config['sitemaker_default_layout'] === $route) ? true : false;
105
-			$u_default_route .= $board_url . '/' . $this->config['sitemaker_default_layout'];
105
+			$u_default_route .= $board_url.'/'.$this->config['sitemaker_default_layout'];
106 106
 			$u_default_route = reapply_sid($u_default_route);
107 107
 		}
108 108
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 			list($controller_service, $controller_method) = explode(':', $controller);
150 150
 			$controller_params	= $symfony_request->attributes->get('_route_params');
151 151
 			$controller_object	= $this->phpbb_container->get($controller_service);
152
-			$controller_class	= get_class($controller_object);
152
+			$controller_class = get_class($controller_object);
153 153
 
154 154
 			$r = new \ReflectionMethod($controller_class, $controller_method);
155 155
 			$class_params = $r->getParameters();
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 				'CONTROLLER_METHOD'	=> $controller_method,
163 163
 				'CONTROLLER_PARAMS'	=> $controller_arguments,
164 164
 				'S_IS_STARTPAGE'	=> $this->is_startpage($controller_service, $controller_arguments),
165
-				'UA_EXTENSION'		=> $namespace . '/' . $extension,
165
+				'UA_EXTENSION'		=> $namespace.'/'.$extension,
166 166
 			));
167 167
 		}
168 168
 	}
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
 	{
198 198
 		$routes_ary = $this->get_routes();
199 199
 
200
-		$options = '<option value="">' . $this->translator->lang('SELECT') . '</option>';
200
+		$options = '<option value="">'.$this->translator->lang('SELECT').'</option>';
201 201
 		foreach ($routes_ary as $route)
202 202
 		{
203 203
 			$selected = ($route == $current_route) ? ' selected="selected"' : '';
204
-			$options .= '<option value="' . $route . '"' . $selected . '>' . $route . '</option>';
204
+			$options .= '<option value="'.$route.'"'.$selected.'>'.$route.'</option>';
205 205
 		}
206 206
 
207 207
 		return $options;
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	public function get_excluded_position_options(array $ex_positions)
217 217
 	{
218
-		$options = '<option value=""' . ((!sizeof($ex_positions)) ? ' selected="selected"' : '') . '>' . $this->translator->lang('NONE') . '</option>';
218
+		$options = '<option value=""'.((!sizeof($ex_positions)) ? ' selected="selected"' : '').'>'.$this->translator->lang('NONE').'</option>';
219 219
 		foreach ($ex_positions as $position)
220 220
 		{
221
-			$options .= '<option value="' . $position . '" selected="selected">' . $position . '</option>';
221
+			$options .= '<option value="'.$position.'" selected="selected">'.$position.'</option>';
222 222
 		}
223 223
 
224 224
 		return $options;
Please login to merge, or discard this patch.
services/blocks/action/edit_block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,6 +59,6 @@
 block discarded – undo
59 59
 		$class_name = get_class($block_instance);
60 60
 		list($namespace, $extension) = explode('\\', $class_name);
61 61
 
62
-		return $namespace . '/' . $extension;
62
+		return $namespace.'/'.$extension;
63 63
 	}
64 64
 }
Please login to merge, or discard this patch.
services/blocks/action_handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 	 */
64 64
 	public function create($action)
65 65
 	{
66
-		$action_class = 'blitze\\sitemaker\\services\\blocks\\action\\' . $action;
66
+		$action_class = 'blitze\\sitemaker\\services\\blocks\\action\\'.$action;
67 67
 
68 68
 		if (!class_exists($action_class))
69 69
 		{
Please login to merge, or discard this patch.
services/blocks/display.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	protected function toggle_edit_mode()
143 143
 	{
144
-		$edit_mode = $this->request->variable($this->config['cookie_name'] . '_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE);
144
+		$edit_mode = $this->request->variable($this->config['cookie_name'].'_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE);
145 145
 
146 146
 		if ($this->request->is_set('edit_mode'))
147 147
 		{
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 				);
199 199
 			}
200 200
 
201
-			$u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'style')), '?'), './../'), 'edit_mode=' . (int) !$edit_mode);
201
+			$u_edit_mode = append_sid(generate_board_url().'/'.ltrim(rtrim(build_url(array('edit_mode', 'style')), '?'), './../'), 'edit_mode='.(int) !$edit_mode);
202 202
 		}
203 203
 		else
204 204
 		{
Please login to merge, or discard this patch.