Completed
Push — master ( e581ca...436d2e )
by Daniel
08:58
created
model/blocks/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/blocks/entity/block.php 2 patches
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) ? ' ' . $class : '';
144
+		$this->class = ($class) ? ' '.$class : '';
145 145
 		return $this;
146 146
 	}
147 147
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,8 +175,7 @@
 block discarded – undo
175 175
 		if (!is_array($settings))
176 176
 		{
177 177
 			$this->settings = $settings;
178
-		}
179
-		else if (sizeof($settings))
178
+		} else if (sizeof($settings))
180 179
 		{
181 180
 			$this->settings = json_encode($settings);
182 181
 			$this->hash = md5($this->settings);
Please login to merge, or discard this patch.
model/menus/mapper/items.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
 		if ($entity->get_item_id())
97 97
 		{
98 98
 			$item = $this->tree->update_item($entity->get_item_id(), $sql_data);
99
-		}
100
-		else
99
+		} else
101 100
 		{
102 101
 			$item = $this->tree->insert($sql_data);
103 102
 		}
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/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/update_block.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
 		if (isset($allowed_fields[$field]))
36 36
 		{
37
-			$mutator = 'set_' . $field;
37
+			$mutator = 'set_'.$field;
38 38
 			$entity->$mutator($allowed_fields[$field]);
39 39
 			$entity = $block_mapper->save($entity);
40 40
 		}
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/date_range.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 		$time = $this->user->create_datetime($this->time);
39 39
 		$now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset());
40 40
 
41
-		$method = 'get_' . $range;
41
+		$method = 'get_'.$range;
42 42
 		$data = array(
43 43
 			'start'	=> 0,
44 44
 			'stop'	=> 0,
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.