Completed
Pull Request — master (#26)
by Daniel
14:39 queued 11:18
created
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.
services/tree/builder.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function get_item_info($item_id = 0)
57 57
 	{
58
-		$sql = 'SELECT * FROM ' . $this->table_name . ' ' . $this->get_sql_where('WHERE') .
59
-			(($item_id) ? " AND {$this->column_item_id} = " . (int) $item_id : '');
58
+		$sql = 'SELECT * FROM '.$this->table_name.' '.$this->get_sql_where('WHERE').
59
+			(($item_id) ? " AND {$this->column_item_id} = ".(int) $item_id : '');
60 60
 
61 61
 		$result = $this->db->sql_query($sql);
62 62
 		$row = $this->db->sql_fetchrow($result);
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	public function update_item($item_id, array $sql_data)
76 76
 	{
77 77
 		$sql = "UPDATE {$this->table_name}
78
-			SET " . $this->db->sql_build_array('UPDATE', $sql_data) . "
79
-			WHERE $this->column_item_id = " . (int) $item_id;
78
+			SET ".$this->db->sql_build_array('UPDATE', $sql_data)."
79
+			WHERE $this->column_item_id = ".(int) $item_id;
80 80
 		$this->db->sql_query($sql);
81 81
 
82 82
 		return $sql_data;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 		// Rather than updating each item individually, we will just delete all items
111 111
 		// then add them all over again with new parent_id|left_id|right_id
112
-		$this->db->sql_query("DELETE FROM {$this->table_name} " . $this->get_sql_where('WHERE'));
112
+		$this->db->sql_query("DELETE FROM {$this->table_name} ".$this->get_sql_where('WHERE'));
113 113
 
114 114
 		// Now we add it back
115 115
 		$sql_data = $this->add_sub_tree($tree, 0);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 			if ($depth && !$parent_id)
160 160
 			{
161
-				throw new \RuntimeException($this->message_prefix . 'MALFORMED_TREE');
161
+				throw new \RuntimeException($this->message_prefix.'MALFORMED_TREE');
162 162
 			}
163 163
 
164 164
 			$key = $i + $max_id + 1;
@@ -230,23 +230,23 @@  discard block
 block discarded – undo
230 230
 		foreach ($branch as $i => $row)
231 231
 		{
232 232
 			$left_id	= $right_id + 1;
233
-			$right_id   = $right_id + 2;
233
+			$right_id = $right_id + 2;
234 234
 
235 235
 			$sql_data[$i] = $row;
236
-			$sql_data[$i]['parent_id']	= $parent_id;
237
-			$sql_data[$i]['left_id']	= $left_id;
238
-			$sql_data[$i]['right_id']	= $right_id;
239
-			$sql_data[$i]['depth']		= $depth;
236
+			$sql_data[$i]['parent_id'] = $parent_id;
237
+			$sql_data[$i]['left_id'] = $left_id;
238
+			$sql_data[$i]['right_id'] = $right_id;
239
+			$sql_data[$i]['depth'] = $depth;
240 240
 
241 241
 			if ($row['parent_id'])
242 242
 			{
243
-				$left_id	= $sql_data[$row['parent_id']]['right_id'];
244
-				$right_id   = $left_id + 1;
243
+				$left_id = $sql_data[$row['parent_id']]['right_id'];
244
+				$right_id = $left_id + 1;
245 245
 
246
-				$sql_data[$i]['parent_id']	= $row['parent_id'];
247
-				$sql_data[$i]['depth']		= $sql_data[$row['parent_id']]['depth'] + 1;
248
-				$sql_data[$i]['left_id']	= $left_id;
249
-				$sql_data[$i]['right_id']	= $right_id;
246
+				$sql_data[$i]['parent_id'] = $row['parent_id'];
247
+				$sql_data[$i]['depth'] = $sql_data[$row['parent_id']]['depth'] + 1;
248
+				$sql_data[$i]['left_id'] = $left_id;
249
+				$sql_data[$i]['right_id'] = $right_id;
250 250
 
251 251
 				$this->update_right_side($sql_data, $right_id, $row['parent_id'], $branch);
252 252
 			}
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 				$this->db->sql_transaction('rollback');
273 273
 				$this->lock->release();
274 274
 
275
-				throw new \RuntimeException($this->message_prefix . 'INVALID_PARENT');
275
+				throw new \RuntimeException($this->message_prefix.'INVALID_PARENT');
276 276
 			}
277 277
 
278 278
 			// adjust items in affected branch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	protected function get_max_id($column, $use_sql_where = true)
301 301
 	{
302 302
 		$sql = "SELECT MAX($column) AS $column
303
-			FROM {$this->table_name} " .
303
+			FROM {$this->table_name} ".
304 304
 			(($use_sql_where) ? $this->get_sql_where('WHERE') : '');
305 305
 		$result = $this->db->sql_query($sql);
306 306
 		$max_id = $this->db->sql_fetchfield($column);
Please login to merge, or discard this patch.
services/auto_lang.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 			$default_lang_files = $finder
65 65
 				->prefix($lang_file)
66 66
 				->suffix(".$this->php_ext")
67
-				->extension_directory('/language/' . basename($this->config['default_lang']))
68
-				->core_path('language/' . basename($this->config['default_lang']) . '/')
67
+				->extension_directory('/language/'.basename($this->config['default_lang']))
68
+				->core_path('language/'.basename($this->config['default_lang']).'/')
69 69
 				->find();
70 70
 		}
71 71
 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
 		$user_lang_files = $finder
85 85
 			->prefix($lang_file)
86 86
 			->suffix(".$this->php_ext")
87
-			->extension_directory('/language/' . $this->user->lang_name)
88
-			->core_path('language/' . $this->user->lang_name . '/')
87
+			->extension_directory('/language/'.$this->user->lang_name)
88
+			->core_path('language/'.$this->user->lang_name.'/')
89 89
 			->find();
90 90
 
91 91
 		$lang_files = array_unique(array_merge($user_lang_files, $english_lang_files, $default_lang_files));
Please login to merge, or discard this patch.
services/menus/action/add_menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
 		/** @type \blitze\sitemaker\model\menus\entity\menu $entity */
22 22
 		$entity = $menu_mapper->create_entity(array(
23
-			'menu_name' => $this->translator->lang('MENU') . '-' . mt_rand(1000, 9999),
23
+			'menu_name' => $this->translator->lang('MENU').'-'.mt_rand(1000, 9999),
24 24
 		));
25 25
 
26 26
 		$entity = $menu_mapper->save($entity);
Please login to merge, or discard this patch.
services/menus/action_handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 */
47 47
 	public function create($action)
48 48
 	{
49
-		$action_class = 'blitze\\sitemaker\\services\\menus\\action\\' . $action;
49
+		$action_class = 'blitze\\sitemaker\\services\\menus\\action\\'.$action;
50 50
 
51 51
 		if (!class_exists($action_class))
52 52
 		{
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', $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', $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.
services/forum/manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
 		if (!class_exists('acp_forums'))
56 56
 		{
57
-			include($this->phpbb_root_path . 'includes/acp/acp_forums.' . $this->php_ext);
57
+			include($this->phpbb_root_path.'includes/acp/acp_forums.'.$this->php_ext);
58 58
 		}
59 59
 
60 60
 		$translator->add_lang('acp/forums');
Please login to merge, or discard this patch.
services/forum/query_builder.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
 
192 192
 		return $this;
193 193
 	}
194
-	*/
194
+	 */
195 195
 
196 196
 	/**
197 197
 	 * Fetch Topic Tracking Info
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -202,12 +202,12 @@  discard block
 block discarded – undo
202 202
 			$this->store['sql_array']['SELECT'][] = 'tt.mark_time, ft.mark_time as forum_mark_time';
203 203
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
204 204
 				'FROM'	=> array(TOPICS_TRACK_TABLE => 'tt'),
205
-				'ON'	=> 'tt.user_id = ' . $this->user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
205
+				'ON'	=> 'tt.user_id = '.$this->user->data['user_id'].' AND t.topic_id = tt.topic_id'
206 206
 			);
207 207
 
208 208
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
209 209
 				'FROM'	=> array(FORUMS_TRACK_TABLE => 'ft'),
210
-				'ON'	=> 'ft.user_id = ' . $this->user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
210
+				'ON'	=> 'ft.user_id = '.$this->user->data['user_id'].' AND t.forum_id = ft.forum_id'
211 211
 			);
212 212
 		}
213 213
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	{
227 227
 		if ($unix_start_time && $unix_stop_time)
228 228
 		{
229
-			$this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time') . " BETWEEN $unix_start_time AND $unix_stop_time";
229
+			$this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time')." BETWEEN $unix_start_time AND $unix_stop_time";
230 230
 		}
231 231
 
232 232
 		return $this;
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 	 */
259 259
 	public function set_sorting($sort_key, $sort_dir = 'DESC')
260 260
 	{
261
-		$this->store['sql_array']['ORDER_BY'] = $sort_key . ' ' . $sort_dir;
261
+		$this->store['sql_array']['ORDER_BY'] = $sort_key.' '.$sort_dir;
262 262
 
263 263
 		return $this;
264 264
 	}
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 	{
320 320
 		if (!empty($column_id))
321 321
 		{
322
-			$this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column . ' = ' . (int) $column_id;
322
+			$this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column.' = '.(int) $column_id;
323 323
 		}
324 324
 	}
325 325
 
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	{
331 331
 		if ($check_visibility)
332 332
 		{
333
-			$this->store['sql_array']['WHERE'][] = 't.topic_time <= ' . time();
333
+			$this->store['sql_array']['WHERE'][] = 't.topic_time <= '.time();
334 334
 			$this->store['sql_array']['WHERE'][] = $this->content_visibility->get_global_visibility_sql('topic', $this->ex_fid_ary, 't.');
335 335
 		}
336 336
 	}
Please login to merge, or discard this patch.