Completed
Pull Request — master (#26)
by Daniel
15:44 queued 13:13
created
services/blocks/action/add_block.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 {
14 14
 	public function execute($style_id)
15 15
 	{
16
-		$name	= $this->request->variable('block', '');
17
-		$route	= $this->request->variable('route', '');
16
+		$name = $this->request->variable('block', '');
17
+		$route = $this->request->variable('route', '');
18 18
 
19 19
 		if (($block_instance = $this->block_factory->get_block($name)) === null)
20 20
 		{
Please login to merge, or discard this patch.
services/url_checker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 			$headers = $headers[0];
30 30
 		}
31 31
 
32
-		preg_match('/HTTP\/.* ([0-9]+) .*/', $headers , $status);
32
+		preg_match('/HTTP\/.* ([0-9]+) .*/', $headers, $status);
33 33
 
34 34
 		return ($status[1] == 200) ? true : false;
35 35
 	}
Please login to merge, or discard this patch.
services/forum/data.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -339,7 +339,7 @@
 block discarded – undo
339 339
 			$this->store['topic'][$row['topic_id']] = $row;
340 340
 
341 341
 			$this->store['tracking'][$row['forum_id']]['topic_list'][] = $row['topic_id'];
342
-			$this->store['tracking'][$row['forum_id']]['mark_time'] =& $row['forum_mark_time'];
342
+			$this->store['tracking'][$row['forum_id']]['mark_time'] = & $row['forum_mark_time'];
343 343
 			$this->store['post_ids']['first'][] = $row['topic_first_post_id'];
344 344
 			$this->store['post_ids']['last'][] = $row['topic_last_post_id'];
345 345
 		}
Please login to merge, or discard this patch.
model/base_collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 		{
122 122
 			$this->_entities = array_filter(
123 123
 				$this->_entities,
124
-				function ($v) use ($key)
124
+				function($v) use ($key)
125 125
 				{
126 126
 					return $v !== $key;
127 127
 				}
Please login to merge, or discard this patch.
cron/blocks_cleanup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	private function clean_styles()
93 93
 	{
94
-		$routes_ary	= $this->manager->get_routes_per_style();
95
-		$style_ids	= $this->get_style_ids();
94
+		$routes_ary = $this->manager->get_routes_per_style();
95
+		$style_ids = $this->get_style_ids();
96 96
 
97 97
 		$routes = array();
98 98
 		foreach ($routes_ary as $style_id => $style_routes)
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
 		foreach ($routes as $route => $row)
124 124
 		{
125
-			$url = $board_url . '/' . (($row['ext_name']) ? 'app.php' : '') . $row['route'];
125
+			$url = $board_url.'/'.(($row['ext_name']) ? 'app.php' : '').$row['route'];
126 126
 
127 127
 			// Route no longer exists => remove all blocks for route
128 128
 			if ($this->url_checker->exists($url) !== true)
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
 		if (sizeof($block_ids))
187 187
 		{
188
-			$this->db->sql_query('DELETE FROM ' . $this->cblocks_table . ' WHERE ' . $this->db->sql_in_set('block_id', $block_ids));
188
+			$this->db->sql_query('DELETE FROM '.$this->cblocks_table.' WHERE '.$this->db->sql_in_set('block_id', $block_ids));
189 189
 		}
190 190
 	}
191 191
 
Please login to merge, or discard this patch.
model/base_entity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	{
26 26
 		foreach ($data as $name => $value)
27 27
 		{
28
-			$mutator = 'set_' . $name;
28
+			$mutator = 'set_'.$name;
29 29
 			$this->$mutator($value);
30 30
 		}
31 31
 	}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		$data = array();
66 66
 		foreach ($attributes as $attribute)
67 67
 		{
68
-			$accessor = 'get_' . $attribute;
68
+			$accessor = 'get_'.$attribute;
69 69
 			$data[$attribute] = $this->$accessor();
70 70
 		}
71 71
 		unset($data['db_fields'], $data['required_fields']);
Please login to merge, or discard this patch.
model/base_mapper.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function save(\blitze\sitemaker\model\entity_interface $entity)
87 87
 	{
88
-		$accessor = 'get_' . $this->entity_pkey;
88
+		$accessor = 'get_'.$this->entity_pkey;
89 89
 		if (is_null($entity->$accessor()))
90 90
 		{
91 91
 			$entity = $this->insert($entity);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		{
108 108
 			if ($condition instanceof $this->entity_class)
109 109
 			{
110
-				$accessor = 'get_' . $this->entity_pkey;
110
+				$accessor = 'get_'.$this->entity_pkey;
111 111
 				$condition = array($this->entity_pkey, '=', $condition->$accessor());
112 112
 			}
113 113
 			else
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		}
118 118
 
119 119
 		$sql_where = $this->get_sql_condition($condition);
120
-		$this->db->sql_query('DELETE FROM ' . $this->entity_table . (sizeof($sql_where) ? ' WHERE ' . join(' AND ', $sql_where) : ''));
120
+		$this->db->sql_query('DELETE FROM '.$this->entity_table.(sizeof($sql_where) ? ' WHERE '.join(' AND ', $sql_where) : ''));
121 121
 	}
122 122
 
123 123
 	/**
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	protected function insert(\blitze\sitemaker\model\entity_interface $entity)
138 138
 	{
139
-		$this->db->sql_query('INSERT INTO ' . $this->entity_table . ' ' . $this->db->sql_build_array('INSERT', $entity->to_db()));
139
+		$this->db->sql_query('INSERT INTO '.$this->entity_table.' '.$this->db->sql_build_array('INSERT', $entity->to_db()));
140 140
 
141
-		$mutator = 'set_' . $this->entity_pkey;
141
+		$mutator = 'set_'.$this->entity_pkey;
142 142
 		$entity->$mutator((int) $this->db->sql_nextid());
143 143
 
144 144
 		return $entity;
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
 	 */
153 153
 	protected function update(\blitze\sitemaker\model\entity_interface $entity)
154 154
 	{
155
-		$accessor = 'get_' . $this->entity_pkey;
155
+		$accessor = 'get_'.$this->entity_pkey;
156 156
 
157
-		return $this->db->sql_query('UPDATE ' . $this->entity_table . '
158
-			SET ' . $this->db->sql_build_array('UPDATE', $entity->to_db()) . '
159
-			WHERE ' . $this->entity_pkey . ' = ' . (int) $entity->$accessor());
157
+		return $this->db->sql_query('UPDATE '.$this->entity_table.'
158
+			SET ' . $this->db->sql_build_array('UPDATE', $entity->to_db()).'
159
+			WHERE ' . $this->entity_pkey.' = '.(int) $entity->$accessor());
160 160
 	}
161 161
 
162 162
 	/**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	protected function find_sql(array $sql_where)
167 167
 	{
168
-		return 'SELECT * FROM ' . $this->entity_table .
169
-			(sizeof($sql_where) ? ' WHERE ' . join(' AND ', $sql_where) : '');
168
+		return 'SELECT * FROM '.$this->entity_table.
169
+			(sizeof($sql_where) ? ' WHERE '.join(' AND ', $sql_where) : '');
170 170
 	}
171 171
 
172 172
 	/**
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		{
183 183
 			list($field, $operator, $value) = $info;
184 184
 
185
-			$callable = 'get_sql_where_' . gettype($value);
185
+			$callable = 'get_sql_where_'.gettype($value);
186 186
 			if (is_callable(array($this, $callable)))
187 187
 			{
188 188
 				$sql_where[] = call_user_func_array(array($this, $callable), array($field, $value, $operator));
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	 */
221 221
 	protected function get_sql_where_string($field, $value, $operator)
222 222
 	{
223
-		return $field . " $operator '" . $this->db->sql_escape($value) . "'";
223
+		return $field." $operator '".$this->db->sql_escape($value)."'";
224 224
 	}
225 225
 
226 226
 	/**
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	 */
232 232
 	protected function get_sql_where_integer($field, $value, $operator)
233 233
 	{
234
-		return $field . " $operator " . (int) $value;
234
+		return $field." $operator ".(int) $value;
235 235
 	}
236 236
 
237 237
 	/**
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/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.