Completed
Push — develop ( 613db1...73b4e9 )
by Daniel
05:02
created
services/feed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	 * @param \phpbb\template\template		$template				Template object
42 42
 	 * @param \phpbb\user					$user					User object
43 43
 	 * @param string						$php_ext				php file extension
44
-	*/
44
+	 */
45 45
 	public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\symfony_request $symfony_request, \phpbb\template\template $template, \phpbb\user $user, $php_ext)
46 46
 	{
47 47
 		$this->config = $config;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$this->template->assign_vars(array(
64 64
 			'BOARD_URL'				=> $this->board_url,
65 65
 			'SELF_LINK'				=> $this->controller_helper->route($this->symfony_request->attributes->get('_route'), $this->symfony_request->attributes->get('_route_params'), true, '', UrlGeneratorInterface::ABSOLUTE_URL),
66
-			'FEED_LINK'				=> $this->board_url . $this->user->page['script_path'] . 'index.' . $this->php_ext,
66
+			'FEED_LINK'				=> $this->board_url.$this->user->page['script_path'].'index.'.$this->php_ext,
67 67
 			'FEED_TITLE'			=> $this->config['sitename'],
68 68
 			'FEED_SUBTITLE'			=> $this->config['site_desc'],
69 69
 			'FEED_UPDATED'			=> $max_update_time,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$response = new Response($this->prepare_content($content));
89 89
 		$response->headers->set('Content-Type', 'application/atom+xml');
90 90
 		$response->setCharset('UTF-8');
91
-		$response->setLastModified(new \DateTime('@' . $max_update_time));
91
+		$response->setLastModified(new \DateTime('@'.$max_update_time));
92 92
 
93 93
 		if (!empty($this->user->data['is_bot']))
94 94
 		{
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 	{
108 108
 		// convert relative urls to absolute urls
109 109
 		$script_path = trim($this->user->page['script_path'], '/');
110
-		$full_path = $this->board_url . '/' . $script_path;
111
-		$content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:' . $script_path . '\/)?)(.*?)("|\')/i', '$1=$2' . $full_path . '/$4$5', $content);
110
+		$full_path = $this->board_url.'/'.$script_path;
111
+		$content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:'.$script_path.'\/)?)(.*?)("|\')/i', '$1=$2'.$full_path.'/$4$5', $content);
112 112
 
113 113
 		// remove hidden field labels
114 114
 		$content = preg_replace('#<div class="field-label label-hidden">(.*?)</div>#', '', $content);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		$content = preg_replace('/((?:\?|&)sid=[a-z0-9]+)/', '', $content);
118 118
 
119 119
 		// Remove Comments from inline attachments [ia]
120
-		$content = preg_replace('#<dd>(.*?)</dd>#','',$content);
120
+		$content = preg_replace('#<dd>(.*?)</dd>#', '', $content);
121 121
 
122 122
 		// Replace some entities with their unicode counterpart
123 123
 		$entities = array(
Please login to merge, or discard this patch.
event/feed.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 	 * @param \phpbb\db\driver\driver_interface		$db					Database connection
33 33
 	 * @param \phpbb\template\template				$template			Template object
34 34
 	 * @param \blitze\content\services\types		$content_types		Content types object
35
-	*/
35
+	 */
36 36
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \blitze\content\services\types $content_types)
37 37
 	{
38 38
 		$this->config = $config;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 		$sql_ary = $event['sql_ary'];
64 64
 
65 65
 		$forum_ids = array_keys($this->content_types->get_forum_types());
66
-		$sql_ary['WHERE'] .= ' AND ' . $this->db->sql_in_set('f.forum_id', array_map('intval', $forum_ids), true);
66
+		$sql_ary['WHERE'] .= ' AND '.$this->db->sql_in_set('f.forum_id', array_map('intval', $forum_ids), true);
67 67
 
68 68
 		$event['sql_ary'] = $sql_ary;
69 69
 	}
Please login to merge, or discard this patch.
services/form/field/color.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	public function get_field_value(array $data)
57 57
 	{
58 58
 		$default = is_array($data['field_value']) ? $data['field_value'] : explode("\n", $data['field_value']);
59
-		$value =  $this->request->variable($data['field_name'], array(0 => ''));
59
+		$value = $this->request->variable($data['field_name'], array(0 => ''));
60 60
 		return $value ?: $default;
61 61
 	}
62 62
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	protected function make_box($color)
103 103
 	{
104
-		$style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: ' . $color;
105
-		return ($color) ? '<div style="' . $style . '" title="' . $color . '"></div>' : '';
104
+		$style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: '.$color;
105
+		return ($color) ? '<div style="'.$style.'" title="'.$color.'"></div>' : '';
106 106
 	}
107 107
 }
Please login to merge, or discard this patch.
services/form/builder.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		foreach ($fields_data as $field => $value)
148 148
 		{
149 149
 			$value = is_array($value) ? join("\n", $value) : $value;
150
-			$message .= '[smcf=' . $field . ']' . $value . '[/smcf]';
150
+			$message .= '[smcf='.$field.']'.$value.'[/smcf]';
151 151
 		}
152 152
 
153 153
 		return $message;
@@ -200,13 +200,13 @@  discard block
 block discarded – undo
200 200
 		$text = '';
201 201
 		if ($entity = $this->types->get_type($content_type))
202 202
 		{
203
-			$fields_accessor = 'get_' . $view . '_fields';
204
-			$template_accessor = 'get_' . $view . '_tpl';
203
+			$fields_accessor = 'get_'.$view.'_fields';
204
+			$template_accessor = 'get_'.$view.'_tpl';
205 205
 
206 206
 			$this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$fields_accessor(), $entity->$template_accessor(), $view);
207 207
 			$content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER));
208 208
 
209
-			$text =  $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']);
209
+			$text = $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']);
210 210
 		}
211 211
 		return $text;
212 212
 	}
@@ -402,8 +402,8 @@  discard block
 block discarded – undo
402 402
 		}
403 403
 		else
404 404
 		{
405
-			$options[ITEM_UNAPPROVED]	= 'CONTENT_STATUS_DISAPPROVE';
406
-			$options[ITEM_APPROVED]		= 'CONTENT_STATUS_APPROVE';
405
+			$options[ITEM_UNAPPROVED] = 'CONTENT_STATUS_DISAPPROVE';
406
+			$options[ITEM_APPROVED] = 'CONTENT_STATUS_APPROVE';
407 407
 		}
408 408
 
409 409
 		return $options;
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -286,8 +286,7 @@  discard block
 block discarded – undo
286 286
 		if (!$field_data['field_mod_only'] || $this->mode === 'mcp')
287 287
 		{
288 288
 			$this->form->add($field, $field_data['field_type'], $field_data, $topic_id);
289
-		}
290
-		else if (!empty($field_data['field_value']))
289
+		} else if (!empty($field_data['field_value']))
291 290
 		{
292 291
 			$this->form->add($field, 'hidden', $field_data, $topic_id);
293 292
 		}
@@ -334,8 +333,7 @@  discard block
 block discarded – undo
334 333
 			{
335 334
 				$data['force_visibility'] = $visibility;
336 335
 			}
337
-		}
338
-		else if ($this->force_state())
336
+		} else if ($this->force_state())
339 337
 		{
340 338
 			$data['force_visibility'] = ($mode == 'edit_first_post') ? ITEM_REAPPROVE : ITEM_UNAPPROVED;
341 339
 		}
@@ -399,8 +397,7 @@  discard block
 block discarded – undo
399 397
 		if ($visibility == ITEM_APPROVED)
400 398
 		{
401 399
 			$options[ITEM_REAPPROVE] = 'CONTENT_STATUS_REAPPROVE';
402
-		}
403
-		else
400
+		} else
404 401
 		{
405 402
 			$options[ITEM_UNAPPROVED]	= 'CONTENT_STATUS_DISAPPROVE';
406 403
 			$options[ITEM_APPROVED]		= 'CONTENT_STATUS_APPROVE';
Please login to merge, or discard this patch.
services/actions/type/delete.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 	 * @param \blitze\sitemaker\model\mapper_factory	$sitemaker_mapper_factory	Sitemaker Mapper factory object
62 62
 	 * @param bool										$auto_refresh				Used during testing
63 63
 	 * @param bool										$trigger_error				Used during testing
64
-	*/
64
+	 */
65 65
 	public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\language\language $language, \phpbb\log\log_interface $logger, \phpbb\request\request_interface $request, \phpbb\user $user, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $content_mapper_factory, \blitze\sitemaker\model\mapper_factory $sitemaker_mapper_factory, $auto_refresh = true, $trigger_error = true)
66 66
 	{
67 67
 		$this->cache = $cache;
Please login to merge, or discard this patch.
services/actions/type/save.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,8 +137,7 @@  discard block
 block discarded – undo
137 137
 			$unsaved_entity->set_content_id($entity->get_content_id());
138 138
 			$this->handle_langname_change($forum_id, $entity->get_content_langname(), $unsaved_entity->get_content_langname());
139 139
 			$this->copy_forum_permissions($forum_id, $forum_perm_from);
140
-		}
141
-		else
140
+		} else
142 141
 		{
143 142
 			$forum_id = $this->create_content_forum($unsaved_entity->get_content_langname(), $forum_perm_from);
144 143
 			$unsaved_entity->set_forum_id($forum_id);
@@ -210,8 +209,7 @@  discard block
 block discarded – undo
210 209
 			$u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $entity->get_forum_id(), true);
211 210
 			$lang_key = 'CONTENT_TYPE_CREATED';
212 211
 			$message = $this->language->lang($lang_key, '<a href="' . $u_set_permission . '">', '</a>');
213
-		}
214
-		else
212
+		} else
215 213
 		{
216 214
 			$this->meta_refresh(3, $u_action);
217 215
 			$lang_key = 'CONTENT_TYPE_UPDATED';
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 	{
208 208
 		if (!$type)
209 209
 		{
210
-			$u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $entity->get_forum_id(), true);
210
+			$u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]='.$entity->get_forum_id(), true);
211 211
 			$lang_key = 'CONTENT_TYPE_CREATED';
212
-			$message = $this->language->lang($lang_key, '<a href="' . $u_set_permission . '">', '</a>');
212
+			$message = $this->language->lang($lang_key, '<a href="'.$u_set_permission.'">', '</a>');
213 213
 		}
214 214
 		else
215 215
 		{
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 		}
227 227
 
228 228
 		$additional_data[] = $entity->get_content_langname();
229
-		$this->logger->add('admin', $this->user->data['user_id'], $this->user->ip, 'ACP_LOG_' . $lang_key, time(), $additional_data);
229
+		$this->logger->add('admin', $this->user->data['user_id'], $this->user->ip, 'ACP_LOG_'.$lang_key, time(), $additional_data);
230 230
 
231 231
 		$this->trigger_error($message, $u_action);
232 232
 	}
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		if ($old_langname !== $new_langname)
270 270
 		{
271 271
 			$forum_name = $this->language->lang($new_langname);
272
-			$sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_name = '" . $this->db->sql_escape($forum_name) . "' WHERE forum_id = " . (int) $forum_id;
272
+			$sql = 'UPDATE '.FORUMS_TABLE." SET forum_name = '".$this->db->sql_escape($forum_name)."' WHERE forum_id = ".(int) $forum_id;
273 273
 			$this->db->sql_query($sql);
274 274
 		}
275 275
 	}
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 	 * @param string									$phpbb_admin_path       Relative admin root path
78 78
 	 * @param string									$php_ext				php file extension
79 79
 	 * @param boolean									$auto_refresh			Used for testing
80
-	*/
80
+	 */
81 81
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\log\log_interface $logger, \phpbb\request\request_interface $request, \phpbb\user $user, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $mapper_factory, $phpbb_admin_path, $php_ext, $auto_refresh = true)
82 82
 	{
83 83
 		$this->auth = $auth;
Please login to merge, or discard this patch.
services/form/field/range.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			return '';
85 85
 		}
86 86
 
87
-		$callable = 'display_field_' . $data['field_props']['display'];
87
+		$callable = 'display_field_'.$data['field_props']['display'];
88 88
 		return $this->$callable($data);
89 89
 	}
90 90
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 			array_walk($range, array($this, 'set_prefix'), $data['field_props']['prefix']);
126 126
 		}
127 127
 
128
-		return join($range, ' - ') . $data['field_props']['postfix'];
128
+		return join($range, ' - ').$data['field_props']['postfix'];
129 129
 	}
130 130
 
131 131
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	protected function set_prefix(&$item, $key, $prefix)
167 167
 	{
168
-		$item = $prefix . $item;
168
+		$item = $prefix.$item;
169 169
 	}
170 170
 
171 171
 	/**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 			),
181 181
 			'css'   => array(
182 182
 				'@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.min.css',
183
-				'@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.' . $theme . '.min.css',
183
+				'@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.'.$theme.'.min.css',
184 184
 			)
185 185
 		));
186 186
 	}
Please login to merge, or discard this patch.
services/views/driver/base_view.php 3 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -283,6 +283,7 @@
 block discarded – undo
283 283
 
284 284
 	/**
285 285
 	 * {@inheritdoc}
286
+	 * @param integer $forum_id
286 287
 	 */
287 288
 	protected function get_filter_sql(array $filters, $forum_id)
288 289
 	{
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	 * @param \blitze\content\services\helper					$helper					Content helper object
51 51
 	 * @param \blitze\content\services\quickmod					$quickmod				Quick moderator tools
52 52
 	 * @param \blitze\content\services\topic\blocks_factory		$topic_blocks_factory	Topic blocks factory object
53
-	*/
53
+	 */
54 54
 	public function __construct(\phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\pagination $pagination, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum, \blitze\content\services\helper $helper, \blitze\content\services\quickmod $quickmod, \blitze\content\services\topic\blocks_factory $topic_blocks_factory)
55 55
 	{
56 56
 		$this->phpbb_dispatcher = $phpbb_dispatcher;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 		foreach ($posts_data as $topic_id => $posts)
141 141
 		{
142
-			$post_data	= array_shift($posts);
142
+			$post_data = array_shift($posts);
143 143
 			$topic_data	= $topics_data[$topic_id];
144 144
 			$topic_data = array_merge(
145 145
 				$this->fields->show($content_type, $topic_data, $post_data, $users_cache, $attachments, $update_count, $topic_tracking_info),
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
 		$this->pagination->generate_template_pagination(
254 254
 			array(
255 255
 				'routes' => array(
256
-					'blitze_content_' . $route_type,
257
-					'blitze_content_' . $route_type . '_page',
256
+					'blitze_content_'.$route_type,
257
+					'blitze_content_'.$route_type.'_page',
258 258
 				),
259 259
 				'params' => $params,
260 260
 			),
Please login to merge, or discard this patch.
services/actions/type/edit.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	 * @param \phpbb\event\dispatcher_interface					$phpbb_dispatcher		Event dispatcher object
36 36
 	 * @param \blitze\content\services\types					$content_types			Content types object
37 37
 	 * @param \blitze\content\model\mapper_factory				$mapper_factory			Mapper factory object
38
-	*/
38
+	 */
39 39
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\services\topic\blocks_factory $topic_blocks_factory, \blitze\content\services\views\views_factory $views_factory, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory)
40 40
 	{
41 41
 		parent::__construct($auth, $controller_helper, $language, $template, $user, $auto_lang, $fields_factory, $topic_blocks_factory, $views_factory);
Please login to merge, or discard this patch.