Completed
Pull Request — master (#26)
by Daniel
09:34
created
controller/blocks_admin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,7 @@
 block discarded – undo
77 77
 			$return_data = $command->execute($style_id);
78 78
 
79 79
 			$this->action_handler->clear_cache();
80
-		}
81
-		catch (\blitze\sitemaker\exception\base $e)
80
+		} catch (\blitze\sitemaker\exception\base $e)
82 81
 		{
83 82
 			$json_data['message'] = $e->get_message($this->user);
84 83
 		}
Please login to merge, or discard this patch.
controller/menus_admin.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,12 +58,10 @@
 block discarded – undo
58 58
 			$return_data = $command->execute();
59 59
 
60 60
 			$this->action_handler->clear_cache();
61
-		}
62
-		catch (\blitze\sitemaker\exception\base $e)
61
+		} catch (\blitze\sitemaker\exception\base $e)
63 62
 		{
64 63
 			$return_data['message'] = $e->get_message($this->user);
65
-		}
66
-		catch (\Exception $e)
64
+		} catch (\Exception $e)
67 65
 		{
68 66
 			$return_data['message'] = $this->user->lang($e->getMessage());
69 67
 		}
Please login to merge, or discard this patch.
blocks/login.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
 				'title'		=> 'LOGIN',
80 80
 				'content'	=> $this->ptemplate->render_view('blitze/sitemaker', 'blocks/login.html', 'login_block')
81 81
 			);
82
-		}
83
-		else if ($settings['show_member_menu'])
82
+		} else if ($settings['show_member_menu'])
84 83
 		{
85 84
 			$block = $this->phpbb_container->get('blitze.sitemaker.block.member_menu');
86 85
 			$block->set_template($this->ptemplate);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@
 block discarded – undo
71 71
 			$this->ptemplate->assign_vars(array(
72 72
 				'S_SHOW_HIDE_ME'		=> ($settings['show_hide_me']) ? true : false,
73 73
 				'S_AUTOLOGIN_ENABLED'   => ($settings['allow_autologin']) ? true : false,
74
-				'S_LOGIN_ACTION'		=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=login'),
75
-				'U_REGISTER'			=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=register'),
76
-				'U_SEND_PASSWORD'		=> append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=sendpassword'),
74
+				'S_LOGIN_ACTION'		=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=login'),
75
+				'U_REGISTER'			=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=register'),
76
+				'U_SEND_PASSWORD'		=> append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=sendpassword'),
77 77
 				'U_REDIRECT'			=> reapply_sid(ltrim(rtrim(build_url(array('edit_mode')), '?'), './../'))
78 78
 			));
79 79
 
Please login to merge, or discard this patch.
services/tree/display.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -237,8 +237,7 @@
 block discarded – undo
237 237
 			{
238 238
 				$padding .= $pad_with;
239 239
 				$padding_store[$row['parent_id']] = $padding;
240
-			}
241
-			else if ($row['left_id'] > $right + 1)
240
+			} else if ($row['left_id'] > $right + 1)
242 241
 			{
243 242
 				$padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : '';
244 243
 			}
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
 	protected $data = array();
34 34
 
35 35
 	/**
36
-	* Construct
37
-	*
38
-	* @param \phpbb\db\driver\driver_interface		$db             Database connection
39
-	* @param string									$items_table	Table name
40
-	* @param string									$pk				Primary key
41
-	* @param string									$sql_where		Column restriction
42
-	*/
36
+	 * Construct
37
+	 *
38
+	 * @param \phpbb\db\driver\driver_interface		$db             Database connection
39
+	 * @param string									$items_table	Table name
40
+	 * @param string									$pk				Primary key
41
+	 * @param string									$sql_where		Column restriction
42
+	 */
43 43
 	public function __construct(\phpbb\db\driver\driver_interface $db, $items_table, $pk, $sql_where = '')
44 44
 	{
45 45
 		$this->db = $db;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		$sql = "SELECT *
81 81
 			FROM $this->items_table
82
-			WHERE $this->pk = " . (int) $node_id ;
82
+			WHERE $this->pk = ".(int) $node_id;
83 83
 		$result = $this->db->sql_query($sql);
84 84
 		$row = $this->db->sql_fetchrow($result);
85 85
 		$this->db->sql_freeresult($result);
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 					$this->items_table => 'i'
109 109
 				),
110 110
 				'WHERE'		=> array(
111
-					'i.depth ' . (($max_depth) ? " BETWEEN $start AND " . ($start + $max_depth) : ' >= ' . $start),
112
-					(($this->sql_where) ? 'i.' . $this->sql_where : ''),
111
+					'i.depth '.(($max_depth) ? " BETWEEN $start AND ".($start + $max_depth) : ' >= '.$start),
112
+					(($this->sql_where) ? 'i.'.$this->sql_where : ''),
113 113
 				),
114 114
 				'ORDER_BY'	=> 'i.left_id ASC',
115 115
 			),
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 * @param \phpbb\template\twig\twig $template
156 156
 	 * @param string $handle
157 157
 	 */
158
-	public function display_list(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree')
158
+	public function display_list(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree')
159 159
 	{
160 160
 		$prev_depth = 0;
161 161
 		$parental_depth = array(0 => -1);
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
 		for ($i = 0, $size = sizeof($data); $i < $size; $i++)
165 165
 		{
166 166
 			$row 		= $data[$i];
167
-			$this_depth	= $parental_depth[$row['parent_id']] + 1;
168
-			$repeat		= abs($prev_depth - $this_depth);
167
+			$this_depth = $parental_depth[$row['parent_id']] + 1;
168
+			$repeat = abs($prev_depth - $this_depth);
169 169
 
170
-			$tpl_data	= array(
170
+			$tpl_data = array(
171 171
 				'PREV_DEPTH'	=> $prev_depth,
172 172
 				'THIS_DEPTH'	=> $this_depth,
173 173
 				'NUM_KIDS'		=> $this->count_descendants($row),
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
 			for ($j = 0; $j < $repeat; $j++)
179 179
 			{
180
-				$template->assign_block_vars($handle . '.close', array());
180
+				$template->assign_block_vars($handle.'.close', array());
181 181
 			}
182 182
 
183 183
 			$prev_depth = $this_depth;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 		for ($i = 0; $i < $prev_depth; $i++)
188 188
 		{
189
-			$template->assign_block_vars('close_' . $handle, array());
189
+			$template->assign_block_vars('close_'.$handle, array());
190 190
 		}
191 191
 	}
192 192
 
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
 			}
226 226
 
227 227
 			$right = $row['right_id'];
228
-			$title = $padding . '&#x251c;&#x2500; ' . $row[$title_column];
228
+			$title = $padding.'&#x251c;&#x2500; '.$row[$title_column];
229 229
 			$selected = (in_array($row[$this->pk], $selected_ids)) ? ' selected="selected' : '';
230 230
 
231
-			$return_options .= '<option value="' . $row[$this->pk] . '"' . $selected . '>' . $title . '</option>';
231
+			$return_options .= '<option value="'.$row[$this->pk].'"'.$selected.'>'.$title.'</option>';
232 232
 			$return_data[$row[$this->pk]] = $title;
233 233
 		}
234 234
 
Please login to merge, or discard this patch.
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/blocks/display.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -135,8 +135,7 @@  discard block
 block discarded – undo
135 135
 		if ($this->request->is_set('style'))
136 136
 		{
137 137
 			return $this->request->variable('style', 0);
138
-		}
139
-		else
138
+		} else
140 139
 		{
141 140
 			return (!$this->config['override_user_style']) ? $this->user->data['user_style'] : $this->config['default_style'];
142 141
 		}
@@ -172,8 +171,7 @@  discard block
 block discarded – undo
172 171
 				self::SHOW_BLOCK_LANDING	=> true,
173 172
 				self::SHOW_BLOCK_SUBPAGE	=> false,
174 173
 			);
175
-		}
176
-		else
174
+		} else
177 175
 		{
178 176
 			$modes = array(
179 177
 				self::SHOW_BLOCK_BOTH		=> true,
@@ -200,8 +198,7 @@  discard block
 block discarded – undo
200 198
 			}
201 199
 
202 200
 			$u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'style')), '?'), './../'), 'edit_mode=' . (($edit_mode) ? 0 : 1));
203
-		}
204
-		else
201
+		} else
205 202
 		{
206 203
 			$edit_mode = false;
207 204
 		}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	 */
114 114
 	protected function toggle_edit_mode()
115 115
 	{
116
-		$edit_mode = $this->request->variable($this->config['cookie_name'] . '_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE);
116
+		$edit_mode = $this->request->variable($this->config['cookie_name'].'_sm_edit_mode', false, false, \phpbb\request\request_interface::COOKIE);
117 117
 
118 118
 		if ($this->request->is_set('edit_mode'))
119 119
 		{
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 				);
170 170
 			}
171 171
 
172
-			$u_edit_mode = append_sid(generate_board_url() . '/' . ltrim(rtrim(build_url(array('edit_mode', 'sid', 'style')), '?'), './../'), 'edit_mode=' . (int) !$edit_mode);
172
+			$u_edit_mode = append_sid(generate_board_url().'/'.ltrim(rtrim(build_url(array('edit_mode', 'sid', 'style')), '?'), './../'), 'edit_mode='.(int) !$edit_mode);
173 173
 		}
174 174
 		else
175 175
 		{
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 	/**
134 134
 	 * @param bool $is_sub_route
135
-	 * @return array
135
+	 * @return boolean[]
136 136
 	 */
137 137
 	protected function get_display_modes($is_sub_route)
138 138
 	{
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 	/**
160 160
 	 * @param bool  $edit_mode
161
-	 * @param array $modes
161
+	 * @param boolean[] $modes
162 162
 	 * @return string
163 163
 	 */
164 164
 	protected function get_edit_mode_url(&$edit_mode, array &$modes)
@@ -198,7 +198,6 @@  discard block
 block discarded – undo
198 198
 	}
199 199
 
200 200
 	/**
201
-	 * @param int $style_id
202 201
 	 * @param bool  $edit_mode
203 202
 	 * @param array $route_info
204 203
 	 */
Please login to merge, or discard this patch.
services/url_checker.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 		if (is_array($message))
42 42
 		{
43 43
 			$this->message = (string) $message[0];
44
-		}
45
-		else
44
+		} else
46 45
 		{
47 46
 			$this->message = $message;
48 47
 		}
Please login to merge, or discard this patch.
services/forum/data.php 2 patches
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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -232,8 +232,7 @@
 block discarded – undo
232 232
 		if (sizeof($post_ids))
233 233
 		{
234 234
 			$sql_where[] = $this->db->sql_in_set('p.post_id', $post_ids);
235
-		}
236
-		else if (sizeof($this->store['topic']))
235
+		} else if (sizeof($this->store['topic']))
237 236
 		{
238 237
 			$this->_limit_posts_by_topic($sql_where, $topic_first_or_last_post);
239 238
 		}
Please login to merge, or discard this patch.
model/blocks/entity/block.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -164,8 +164,7 @@
 block discarded – undo
164 164
 		if (!is_array($settings))
165 165
 		{
166 166
 			$this->settings = $settings;
167
-		}
168
-		else if (sizeof($settings))
167
+		} else if (sizeof($settings))
169 168
 		{
170 169
 			$this->settings = serialize($settings);
171 170
 			$this->hash = md5($this->settings);
Please login to merge, or discard this 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.