Completed
Pull Request — master (#26)
by Daniel
10:35 queued 08:50
created
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
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 		$post_id = (int) $topic_data['topic_first_post_id'];
172 172
 
173 173
 		$sql = 'SELECT o.*, p.bbcode_bitfield, p.bbcode_uid
174
-			FROM ' . POLL_OPTIONS_TABLE . ' o, ' . POSTS_TABLE . " p
174
+			FROM ' . POLL_OPTIONS_TABLE.' o, '.POSTS_TABLE." p
175 175
 			WHERE o.topic_id = $topic_id
176 176
 				AND p.post_id = $post_id
177 177
 				AND p.topic_id = o.topic_id
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @param int $poll_most
217 217
 	 * @param \phpbb\template\twig\twig $template
218 218
 	 */
219
-	private function build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig &$template)
219
+	private function build_poll_options(array $cur_voted_id, array $poll_info, $poll_total, $poll_most, \phpbb\template\twig\twig & $template)
220 220
 	{
221 221
 		foreach ($poll_info as $poll_option)
222 222
 		{
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 		if ($this->user->data['is_registered'])
248 248
 		{
249 249
 			$sql = 'SELECT poll_option_id
250
-			FROM ' . POLL_VOTES_TABLE . '
251
-			WHERE topic_id = ' . (int) $topic_id . '
250
+			FROM ' . POLL_VOTES_TABLE.'
251
+			WHERE topic_id = ' . (int) $topic_id.'
252 252
 				AND vote_user_id = ' . (int) $this->user->data['user_id'];
253 253
 			$result = $this->db->sql_query($sql);
254 254
 
@@ -263,9 +263,9 @@  discard block
 block discarded – undo
263 263
 			// Cookie based guest tracking ... I don't like this but hum ho
264 264
 			// it's oft requested. This relies on "nice" users who don't feel
265 265
 			// the need to delete cookies to mess with results.
266
-			if ($this->request->is_set($this->config['cookie_name'] . '_poll_' . $topic_id, \phpbb\request\request_interface::COOKIE))
266
+			if ($this->request->is_set($this->config['cookie_name'].'_poll_'.$topic_id, \phpbb\request\request_interface::COOKIE))
267 267
 			{
268
-				$cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'] . '_poll_' . $topic_id, '', true, \phpbb\request\request_interface::COOKIE));
268
+				$cur_voted_id = explode(',', $this->request->variable($this->config['cookie_name'].'_poll_'.$topic_id, '', true, \phpbb\request\request_interface::COOKIE));
269 269
 				$cur_voted_id = array_map('intval', $cur_voted_id);
270 270
 			}
271 271
 		}
Please login to merge, or discard this patch.
acp/settings_module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			$this->config->set('sm_show_forum_nav', $this->request->variable('show_forum_nav', 0));
136 136
 			$this->config->set('sm_forum_icon', $this->request->variable('forum_icon', ''));
137 137
 
138
-			$this->trigger_error($this->translator->lang('SETTINGS_SAVED') . adm_back_link($this->u_action));
138
+			$this->trigger_error($this->translator->lang('SETTINGS_SAVED').adm_back_link($this->u_action));
139 139
 		}
140 140
 	}
141 141
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	{
148 148
 		$style_prefs = (array) json_decode($this->config_text->get('sm_layout_prefs'), true);
149 149
 
150
-		$result = $this->db->sql_query('SELECT style_id, style_name FROM ' . STYLES_TABLE);
150
+		$result = $this->db->sql_query('SELECT style_id, style_name FROM '.STYLES_TABLE);
151 151
 
152 152
 		$styles = array();
153 153
 		while ($row = $this->db->sql_fetchrow($result))
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 			$path = dirname($path);
226 226
 			$name = basename($path);
227 227
 
228
-			$layouts[$name] = $this->phpbb_root_path . $path . '/';
228
+			$layouts[$name] = $this->phpbb_root_path.$path.'/';
229 229
 		}
230 230
 		ksort($layouts);
231 231
 
Please login to merge, or discard this patch.
blocks/custom.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$content = $this->request->variable('content', '', true);
86 86
 		$cblocks = $this->get_custom_blocks();
87 87
 
88
-		$sql_data =	$this->get_default_fields($block_id);
88
+		$sql_data = $this->get_default_fields($block_id);
89 89
 		$sql_data['block_content'] = $content;
90 90
 
91 91
 		generate_text_for_storage($sql_data['block_content'], $sql_data['bbcode_uid'], $sql_data['bbcode_bitfield'], $sql_data['bbcode_options'], true, false, true);
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
 	{
150 150
 		if (!$block_exists)
151 151
 		{
152
-			$sql = 'INSERT INTO ' . $this->cblocks_table . ' ' . $this->db->sql_build_array('INSERT', $sql_data);
152
+			$sql = 'INSERT INTO '.$this->cblocks_table.' '.$this->db->sql_build_array('INSERT', $sql_data);
153 153
 		}
154 154
 		else
155 155
 		{
156
-			$sql = 'UPDATE ' . $this->cblocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE block_id = ' . (int) $sql_data['block_id'];
156
+			$sql = 'UPDATE '.$this->cblocks_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_data).' WHERE block_id = '.(int) $sql_data['block_id'];
157 157
 		}
158 158
 		$this->db->sql_query($sql);
159 159
 		$this->cache->destroy('sm_cblocks');
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
 			$block_is_active = $status;
175 175
 			$status = ($content && $status) ? true : false;
176
-			$content = '<div id="block-editor-' . $cblock['block_id'] . '" class="editable editable-block" data-service="blitze.sitemaker.block.custom" data-method="edit" data-raw="' . $cblock['block_content'] . '" data-active="' . $block_is_active . '">' . $content . '</div>';
176
+			$content = '<div id="block-editor-'.$cblock['block_id'].'" class="editable editable-block" data-service="blitze.sitemaker.block.custom" data-method="edit" data-raw="'.$cblock['block_content'].'" data-active="'.$block_is_active.'">'.$content.'</div>';
177 177
 		}
178 178
 	}
179 179
 
Please login to merge, or discard this patch.
services/forum/attachments.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,10 +77,10 @@
 block discarded – undo
77 77
 	protected function get_attachment_sql(array $attach_ids, array $allowed_extensions, $exclude_in_message, $order_by)
78 78
 	{
79 79
 		return 'SELECT *
80
-			FROM ' . ATTACHMENTS_TABLE . '
81
-			WHERE ' . $this->db->sql_in_set('post_msg_id', array_map('intval', $attach_ids)) .
82
-				(($exclude_in_message) ? ' AND in_message = 0' : '') .
83
-				(sizeof($allowed_extensions) ? ' AND ' . $this->db->sql_in_set('extension', $allowed_extensions) : '') . '
80
+			FROM ' . ATTACHMENTS_TABLE.'
81
+			WHERE ' . $this->db->sql_in_set('post_msg_id', array_map('intval', $attach_ids)).
82
+				(($exclude_in_message) ? ' AND in_message = 0' : '').
83
+				(sizeof($allowed_extensions) ? ' AND '.$this->db->sql_in_set('extension', $allowed_extensions) : '').'
84 84
 			ORDER BY ' . $order_by;
85 85
 	}
86 86
 }
Please login to merge, or discard this patch.
blocks/attachments.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 				$this->ptemplate->assign_block_vars('postrow.attachment', array(
141 141
 					'DISPLAY_ATTACHMENT'	=> $attachment,
142 142
 					'EXTENSION_GROUP'		=> $extensions[$row['extension']]['group_name'],
143
-					'U_VIEWTOPIC'			=> append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "t=$topic_id&amp;p=$post_id") . '#p' . $post_id,
143
+					'U_VIEWTOPIC'			=> append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "t=$topic_id&amp;p=$post_id").'#p'.$post_id,
144 144
 				));
145 145
 			}
146 146
 		}
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	private function get_posts_data()
153 153
 	{
154 154
 		$topic_ids = $post_ids = array();
155
-		${$this->settings['ids_type'] . '_ids'} = array_filter(explode(',', $this->settings['ids']));
155
+		${$this->settings['ids_type'].'_ids'} = array_filter(explode(',', $this->settings['ids']));
156 156
 		$range_info = $this->date_range->get($this->settings['date_range']);
157 157
 
158 158
 		$sql_array = $this->forum_data->query(false)
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 			->get_sql_array();
165 165
 
166 166
 		$sql_array['SELECT'] = '';
167
-		$sql_array['WHERE'] .= ' AND p.topic_id = t.topic_id AND p.post_attachment <> 0' . (($this->settings['first_only']) ? ' AND p.post_id = t.topic_first_post_id' : '');
167
+		$sql_array['WHERE'] .= ' AND p.topic_id = t.topic_id AND p.post_attachment <> 0'.(($this->settings['first_only']) ? ' AND p.post_id = t.topic_first_post_id' : '');
168 168
 
169 169
 		return $this->forum_data->get_post_data(false, $post_ids, $this->settings['limit'], 0, $sql_array);
170 170
 	}
Please login to merge, or discard this patch.
services/forum/query_builder.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 			$this->store['sql_array']['SELECT'][] = 'ws.notify_status';
168 168
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
169 169
 				'FROM'	=> array($keys[$type]['table'] => 'ws'),
170
-				'ON'	=> $keys[$type]['cond'] . ' AND ws.user_id = ' . (int) $this->user->data['user_id'],
170
+				'ON'	=> $keys[$type]['cond'].' AND ws.user_id = '.(int) $this->user->data['user_id'],
171 171
 			);
172 172
 		}
173 173
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			$this->store['sql_array']['SELECT'][] = 'bm.topic_id as bookmarked';
187 187
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
188 188
 				'FROM'	=> array(BOOKMARKS_TABLE => 'bm'),
189
-				'ON'	=> 'bm.user_id = ' . (int) $this->user->data['user_id'] . ' AND t.topic_id = bm.topic_id'
189
+				'ON'	=> 'bm.user_id = '.(int) $this->user->data['user_id'].' AND t.topic_id = bm.topic_id'
190 190
 			);
191 191
 		}
192 192
 
@@ -207,12 +207,12 @@  discard block
 block discarded – undo
207 207
 			$this->store['sql_array']['SELECT'][] = 'tt.mark_time, ft.mark_time as forum_mark_time';
208 208
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
209 209
 				'FROM'	=> array(TOPICS_TRACK_TABLE => 'tt'),
210
-				'ON'	=> 'tt.user_id = ' . (int) $this->user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
210
+				'ON'	=> 'tt.user_id = '.(int) $this->user->data['user_id'].' AND t.topic_id = tt.topic_id'
211 211
 			);
212 212
 
213 213
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
214 214
 				'FROM'	=> array(FORUMS_TRACK_TABLE => 'ft'),
215
-				'ON'	=> 'ft.user_id = ' . (int) $this->user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
215
+				'ON'	=> 'ft.user_id = '.(int) $this->user->data['user_id'].' AND t.forum_id = ft.forum_id'
216 216
 			);
217 217
 		}
218 218
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	{
232 232
 		if ($unix_start_time && $unix_stop_time)
233 233
 		{
234
-			$this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time') . " BETWEEN $unix_start_time AND $unix_stop_time";
234
+			$this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time')." BETWEEN $unix_start_time AND $unix_stop_time";
235 235
 		}
236 236
 
237 237
 		return $this;
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 	 */
264 264
 	public function set_sorting($sort_key, $sort_dir = 'DESC')
265 265
 	{
266
-		$this->store['sql_array']['ORDER_BY'] = $sort_key . ' ' . $sort_dir;
266
+		$this->store['sql_array']['ORDER_BY'] = $sort_key.' '.$sort_dir;
267 267
 
268 268
 		return $this;
269 269
 	}
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	{
325 325
 		if (!empty($column_id))
326 326
 		{
327
-			$this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column . ' = ' . (int) $column_id;
327
+			$this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column.' = '.(int) $column_id;
328 328
 		}
329 329
 	}
330 330
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	{
336 336
 		if ($check_visibility)
337 337
 		{
338
-			$this->store['sql_array']['WHERE'][] = 't.topic_time <= ' . time();
338
+			$this->store['sql_array']['WHERE'][] = 't.topic_time <= '.time();
339 339
 			$this->store['sql_array']['WHERE'][] = $this->content_visibility->get_global_visibility_sql('topic', $this->ex_fid_ary, 't.');
340 340
 		}
341 341
 	}
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,13 +57,13 @@
 block discarded – undo
57 57
 		$this->ex_fid_ary = array_unique(array_keys($this->auth->acl_getf('!f_read', true)));
58 58
 	}
59 59
 
60
-    /**
61
-     * Begin query
62
-     *
63
-     * @param bool $track_topics
64
-     * @param bool $add_forum_data
65
-     * @return $this
66
-     */
60
+	/**
61
+	 * Begin query
62
+	 *
63
+	 * @param bool $track_topics
64
+	 * @param bool $add_forum_data
65
+	 * @return $this
66
+	 */
67 67
 	public function query($track_topics = true, $add_forum_data = true)
68 68
 	{
69 69
 		$this->_reset();
Please login to merge, or discard this patch.
model/entity/item.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public function set_item_icon($icon)
138 138
 	{
139
-		$this->item_icon = ($icon) ? trim($icon) . ' ' : '';
139
+		$this->item_icon = ($icon) ? trim($icon).' ' : '';
140 140
 		return $this;
141 141
 	}
142 142
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		// add leading / for local paths, except leading hashtags
154 154
 		if ($this->is_local($this->item_url) && $this->item_url[0] !== '#')
155 155
 		{
156
-			$this->item_url = '/' . ltrim($this->item_url, './');
156
+			$this->item_url = '/'.ltrim($this->item_url, './');
157 157
 		}
158 158
 
159 159
 		return $this;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
 		if ($this->is_local($item_url) && $item_url[0] === '/')
170 170
 		{
171
-			$item_url = $this->board_url . $item_url;
171
+			$item_url = $this->board_url.$item_url;
172 172
 			if ($this->mod_rewrite_enabled)
173 173
 			{
174 174
 				$item_url = str_replace('app.php/', '', $item_url);
Please login to merge, or discard this patch.
blocks/mybookmarks.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
 	/**
83 83
 	 * @param array $settings
84
-     * @return string[]
84
+	 * @return string[]
85 85
 	 */
86 86
 	private function get_bookmarks(array $settings)
87 87
 	{
Please login to merge, or discard this patch.
services/menus/action/add_item.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
 			'item_target'	=> $this->request->variable('item_target', 0),
35 35
 		));
36 36
 
37
-        /** @var \blitze\sitemaker\model\entity\item $entity */
38
-        $entity = $items_mapper->save($entity);
37
+		/** @var \blitze\sitemaker\model\entity\item $entity */
38
+		$entity = $items_mapper->save($entity);
39 39
 
40 40
 		return $entity->to_array();
41 41
 	}
Please login to merge, or discard this patch.