Completed
Pull Request — master (#26)
by Daniel
09:39
created
model/mapper/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,8 @@
 block discarded – undo
70 70
 	 */
71 71
 	protected function find_sql(array $sql_where)
72 72
 	{
73
-		return 'SELECT * FROM ' . $this->entity_table .
74
-			((sizeof($sql_where)) ? ' WHERE ' . join(' AND ', $sql_where) : '') . '
73
+		return 'SELECT * FROM '.$this->entity_table.
74
+			((sizeof($sql_where)) ? ' WHERE '.join(' AND ', $sql_where) : '').'
75 75
 			ORDER BY route ASC';
76 76
 	}
77 77
 }
Please login to merge, or discard this patch.
model/mapper/blocks.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 	 */
26 26
 	protected function find_sql(array $sql_where)
27 27
 	{
28
-		return 'SELECT * FROM ' . $this->entity_table .
29
-			((sizeof($sql_where)) ? ' WHERE ' . join(' AND ', $sql_where) : '') . '
28
+		return 'SELECT * FROM '.$this->entity_table.
29
+			((sizeof($sql_where)) ? ' WHERE '.join(' AND ', $sql_where) : '').'
30 30
 			ORDER BY position, weight ASC';
31 31
 	}
32 32
 
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 		// move blocks up for position
41 41
 		if ($condition instanceof $this->entity_class)
42 42
 		{
43
-			$this->db->sql_query('UPDATE ' . $this->entity_table . '
43
+			$this->db->sql_query('UPDATE '.$this->entity_table.'
44 44
 				SET weight = weight - 1
45
-				WHERE weight > ' . (int) $condition->get_weight() . '
46
-					AND style = ' . (int) $condition->get_style() . '
47
-					AND route_id = ' . (int) $condition->get_route_id() . "
48
-					AND position = '" . $this->db->sql_escape($condition->get_position()) . "'");
45
+				WHERE weight > ' . (int) $condition->get_weight().'
46
+					AND style = ' . (int) $condition->get_style().'
47
+					AND route_id = ' . (int) $condition->get_route_id()."
48
+					AND position = '" . $this->db->sql_escape($condition->get_position())."'");
49 49
 		}
50 50
 	}
51 51
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 	protected function move_blocks_down(\blitze\sitemaker\model\entity_interface $entity)
66 66
 	{
67 67
 		/** @type \blitze\sitemaker\model\blocks\entity\block $entity */
68
-		$sql = 'UPDATE ' . $this->entity_table . '
68
+		$sql = 'UPDATE '.$this->entity_table.'
69 69
 			SET weight = weight + 1
70
-			WHERE weight >= ' . (int) $entity->get_weight() . '
71
-				AND route_id = ' . (int) $entity->get_route_id() . '
70
+			WHERE weight >= ' . (int) $entity->get_weight().'
71
+				AND route_id = ' . (int) $entity->get_route_id().'
72 72
 				AND style = ' . (int) $entity->get_style();
73 73
 		$this->db->sql_query($sql);
74 74
 	}
Please login to merge, or discard this patch.
model/mapper/items.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,6 +172,6 @@
 block discarded – undo
172 172
 	 */
173 173
 	protected function get_sql_where($menu_id)
174 174
 	{
175
-		return '%smenu_id = ' . (int) $menu_id;
175
+		return '%smenu_id = '.(int) $menu_id;
176 176
 	}
177 177
 }
Please login to merge, or discard this patch.
model/entity/item.php 1 patch
Spacing   +4 added lines, -4 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);
@@ -185,6 +185,6 @@  discard block
 block discarded – undo
185 185
 	private function is_local($item_url)
186 186
 	{
187 187
 		$host = parse_url($item_url, PHP_URL_HOST);
188
-		return (!$item_url || !empty($host) || substr($item_url, 0, 2) === '//') ? false: true;
188
+		return (!$item_url || !empty($host) || substr($item_url, 0, 2) === '//') ? false : true;
189 189
 	}
190 190
 }
Please login to merge, or discard this patch.
model/entity/block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
 	 */
142 142
 	public function set_class($class)
143 143
 	{
144
-		$this->class = ($class) ? ' ' . trim($class) : '';
144
+		$this->class = ($class) ? ' '.trim($class) : '';
145 145
 		return $this;
146 146
 	}
147 147
 
Please login to merge, or discard this patch.
model/mapper_factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 	 */
40 40
 	public function create($type)
41 41
 	{
42
-		$mapper_class = 'blitze\\sitemaker\\model\\mapper\\' . $type;
43
-		$collection = 'blitze\\sitemaker\\model\\collections\\' . $type;
42
+		$mapper_class = 'blitze\\sitemaker\\model\\mapper\\'.$type;
43
+		$collection = 'blitze\\sitemaker\\model\\collections\\'.$type;
44 44
 
45 45
 		return new $mapper_class($this->db, new $collection, $this, $this->mapper_tables[$type], $this->config);
46 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
 
@@ -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 = ' . $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.
blocks/login.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 			$this->ptemplate->assign_vars(array(
78 78
 				'S_SHOW_HIDE_ME'		=> ($settings['show_hide_me']) ? true : false,
79 79
 				'S_AUTOLOGIN_ENABLED'   => ($settings['allow_autologin']) ? true : false,
80
-				'S_LOGIN_ACTION'		=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=login'),
81
-				'U_REGISTER'			=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=register'),
82
-				'U_SEND_PASSWORD'		=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=sendpassword'),
80
+				'S_LOGIN_ACTION'		=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=login'),
81
+				'U_REGISTER'			=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=register'),
82
+				'U_SEND_PASSWORD'		=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=sendpassword'),
83 83
 				'U_REDIRECT'			=> reapply_sid(ltrim(rtrim(build_url(array('edit_mode')), '?'), './../'))
84 84
 			));
85 85
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	private function hide_quicklogin()
105 105
 	{
106 106
 		$current_page = $this->user->page['page_name'];
107
-		if ($current_page === 'index.' . $this->php_ext)
107
+		if ($current_page === 'index.'.$this->php_ext)
108 108
 		{
109 109
 			$this->template->assign_var('S_USER_LOGGED_IN', true);
110 110
 		}
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, true, 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.