@@ -25,8 +25,8 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -43,8 +43,8 @@ |
||
43 | 43 | */ |
44 | 44 | public function create($type, $mapper) |
45 | 45 | { |
46 | - $mapper_class = 'blitze\\sitemaker\\model\\' . $type . '\\mapper\\' . $mapper; |
|
47 | - $collection = 'blitze\\sitemaker\\model\\' . $type . '\\collections\\' . $mapper; |
|
46 | + $mapper_class = 'blitze\\sitemaker\\model\\'.$type.'\\mapper\\'.$mapper; |
|
47 | + $collection = 'blitze\\sitemaker\\model\\'.$type.'\\collections\\'.$mapper; |
|
48 | 48 | |
49 | 49 | return new $mapper_class($this->db, new $collection, $this, $this->mapper_tables[$mapper], $this->config); |
50 | 50 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | */ |
136 | 136 | public function set_item_icon($icon) |
137 | 137 | { |
138 | - $this->item_icon = ($icon) ? trim($icon) . ' ' : ''; |
|
138 | + $this->item_icon = ($icon) ? trim($icon).' ' : ''; |
|
139 | 139 | return $this; |
140 | 140 | } |
141 | 141 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | if ($this->item_url && empty($parts['host']) && strpos($parts['path'], '.') === false) |
152 | 152 | { |
153 | - $this->item_url = 'app.php/' . $this->item_url; |
|
153 | + $this->item_url = 'app.php/'.$this->item_url; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | return $this; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | if ($item_url && empty($host)) |
168 | 168 | { |
169 | - $item_url = $this->board_url . '/' . $item_url; |
|
169 | + $item_url = $this->board_url.'/'.$item_url; |
|
170 | 170 | |
171 | 171 | if ($this->mod_rewrite_enabled === true) |
172 | 172 | { |
@@ -62,7 +62,7 @@ discard block |
||
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 |
||
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']}&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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 = '&date=' . $range['date']; |
|
250 | + $this->explain_range = '&date='.$range['date']; |
|
251 | 251 | |
252 | 252 | $sql_ary['WHERE'] .= " AND {$this->sql_date_field} BETWEEN {$range['start']} AND {$range['stop']}"; |
253 | 253 | } |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function build_select($option_ary, $selected_item, $key) |
36 | 36 | { |
37 | - $html = '<select id="' . $key . '" name="config[' . $key . ']">'; |
|
37 | + $html = '<select id="'.$key.'" name="config['.$key.']">'; |
|
38 | 38 | foreach ($option_ary as $value => $title) |
39 | 39 | { |
40 | 40 | $selected = ($value == $selected_item) ? ' selected="selected"' : ''; |
41 | - $html .= '<option value="' . $value . '"' . $selected . '>' . $this->translator->lang($title) . '</option>'; |
|
41 | + $html .= '<option value="'.$value.'"'.$selected.'>'.$this->translator->lang($title).'</option>'; |
|
42 | 42 | } |
43 | 43 | $html .= '</select>'; |
44 | 44 | |
@@ -57,11 +57,11 @@ discard block |
||
57 | 57 | { |
58 | 58 | $selected_items = $this->ensure_array($selected_items); |
59 | 59 | |
60 | - $html = '<select id="' . $field . '" name="config[' . $field . '][]" multiple="multiple">'; |
|
60 | + $html = '<select id="'.$field.'" name="config['.$field.'][]" multiple="multiple">'; |
|
61 | 61 | foreach ($option_ary as $value => $title) |
62 | 62 | { |
63 | 63 | $selected = $this->get_selected_option($value, $selected_items); |
64 | - $html .= '<option value="' . $value . '"' . $selected . '>' . $this->translator->lang($title) . '</option>'; |
|
64 | + $html .= '<option value="'.$value.'"'.$selected.'>'.$this->translator->lang($title).'</option>'; |
|
65 | 65 | } |
66 | 66 | $html .= '</select>'; |
67 | 67 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | foreach ($option_ary as $value => $title) |
120 | 120 | { |
121 | 121 | $selected = $this->get_selected_option($value, $selected_item, 'checked'); |
122 | - $html .= '<label><input type="radio" name="config[' . $key . ']" value="' . $value . '"' . $selected . ' class="radio" /> ' . $this->translator->lang($title) . '</label><br />'; |
|
122 | + $html .= '<label><input type="radio" name="config['.$key.']" value="'.$value.'"'.$selected.' class="radio" /> '.$this->translator->lang($title).'</label><br />'; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | return $html; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | */ |
135 | 135 | public function build_hidden($value, $field) |
136 | 136 | { |
137 | - return '<input type="hidden" name="config[' . $field . ']" value="' . $value . '" />'; |
|
137 | + return '<input type="hidden" name="config['.$field.']" value="'.$value.'" />'; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | */ |
175 | 175 | protected function get_selected_option($needle, array $haystack, $type = 'selected') |
176 | 176 | { |
177 | - return (in_array($needle, $haystack)) ? ' ' . $type . '="' . $type . '"' : ''; |
|
177 | + return (in_array($needle, $haystack)) ? ' '.$type.'="'.$type.'"' : ''; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
@@ -187,12 +187,12 @@ discard block |
||
187 | 187 | */ |
188 | 188 | protected function get_checkbox_column(array $row, array $selected_items, $field, $column_count, $column_class) |
189 | 189 | { |
190 | - $column = '<div class="' . $column_class . $field . '-checkbox" id="' . $field . '-col-' . $column_count . '">'; |
|
190 | + $column = '<div class="'.$column_class.$field.'-checkbox" id="'.$field.'-col-'.$column_count.'">'; |
|
191 | 191 | foreach ($row as $value => $title) |
192 | 192 | { |
193 | 193 | $title = $this->translator->lang($title); |
194 | 194 | $selected = $this->get_selected_option($value, $selected_items, 'checked'); |
195 | - $column .= '<label><input type="checkbox" name="config[' . $field . '][]" value="' . $value . '"' . $selected . ' accesskey="' . $field . '" class="checkbox" /> ' . $title . '</label><br />'; |
|
195 | + $column .= '<label><input type="checkbox" name="config['.$field.'][]" value="'.$value.'"'.$selected.' accesskey="'.$field.'" class="checkbox" /> '.$title.'</label><br />'; |
|
196 | 196 | } |
197 | 197 | $column .= '</div>'; |
198 | 198 |
@@ -96,13 +96,13 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -59,6 +59,6 @@ |
||
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 | } |
@@ -63,7 +63,7 @@ |
||
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 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | if (!function_exists('build_cfg_template')) |
64 | 64 | { |
65 | - include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext); // @codeCoverageIgnore |
|
65 | + include($this->phpbb_root_path.'includes/functions_acp.'.$this->php_ext); // @codeCoverageIgnore |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | // We fake this class as it is needed by the build_cfg_template function |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | // @codeCoverageIgnoreStart |
84 | 84 | if (!function_exists('validate_config_vars')) |
85 | 85 | { |
86 | - include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext); |
|
86 | + include($this->phpbb_root_path.'includes/functions_acp.'.$this->php_ext); |
|
87 | 87 | } |
88 | 88 | // @codeCoverageIgnoreEnd |
89 | 89 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $vars['append'] = $this->append_field($vars); |
172 | 172 | |
173 | 173 | $type = explode(':', $vars['type']); |
174 | - $method = 'prep_' . $type[0] . '_field_for_display'; |
|
174 | + $method = 'prep_'.$type[0].'_field_for_display'; |
|
175 | 175 | |
176 | 176 | if (is_callable(array($this, $method))) |
177 | 177 | { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $l_explain = ''; |
216 | 216 | if (!empty($vars['explain'])) |
217 | 217 | { |
218 | - $l_explain = (isset($vars['lang_explain'])) ? $this->translator->lang($vars['lang_explain']) : $this->translator->lang($vars['lang'] . '_EXPLAIN'); |
|
218 | + $l_explain = (isset($vars['lang_explain'])) ? $this->translator->lang($vars['lang_explain']) : $this->translator->lang($vars['lang'].'_EXPLAIN'); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | return $l_explain; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | { |
316 | 316 | $this->prep_checkbox_field_for_display($vars, $type, $field); |
317 | 317 | |
318 | - $vars['method'] ='build_multi_select'; |
|
318 | + $vars['method'] = 'build_multi_select'; |
|
319 | 319 | } |
320 | 320 | |
321 | 321 | /** |