Completed
Branch develop (3861a6)
by Daniel
04:23
created
controller/main_controller.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,6 @@
 block discarded – undo
93 93
 	 * @param string $type
94 94
 	 * @param string $slug
95 95
 	 * @param int $topic_id
96
-	 * @param int $page
97 96
 	 * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
98 97
 	 */
99 98
 	public function show($type, $slug, $topic_id)
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 * @param \blitze\content\services\comments				$comments			Comments object
47 47
 	 * @param \blitze\content\services\types				$content_types		Content types object
48 48
 	 * @param \blitze\content\services\views\views_factory	$views_factory		Views handlers
49
-	*/
49
+	 */
50 50
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\comments $comments, \blitze\content\services\types $content_types, \blitze\content\services\views\views_factory $views_factory)
51 51
 	{
52 52
 		$this->db = $db;
Please login to merge, or discard this patch.
services/actions/topic/moderate.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
 	}
156 156
 
157 157
 	/**
158
-	 * @param $action
158
+	 * @param string $action
159 159
 	 * @param array $topic_ids
160 160
 	 */
161 161
 	protected function change_topic_type($action, array $topic_ids)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 		}
74 74
 		else
75 75
 		{
76
-			$message =  $this->language->lang('INVALID_REQUEST', $action);
76
+			$message = $this->language->lang('INVALID_REQUEST', $action);
77 77
 			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $u_action . '">', '</a>'));
78 78
 		}
79 79
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@  discard block
 block discarded – undo
70 70
 		{
71 71
 			$forum_ids = $this->get_selected_forum_ids($topic_ids);
72 72
 			$this->{$action}($topic_ids, $forum_ids);
73
-		}
74
-		else
73
+		} else
75 74
 		{
76 75
 			$message =  $this->language->lang('INVALID_REQUEST', $action);
77 76
 			trigger_error($message . '<br /><br />' . $this->language->lang('RETURN_PAGE', '<a href="' . $u_action . '">', '</a>'));
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
 		{
114 113
 			$this->approve($topic_ids, $forum_ids, false);
115 114
 			\mcp_queue::disapprove_posts($post_id_list, '-blitze-content-mcp-content_module', 'content');
116
-		}
117
-		else
115
+		} else
118 116
 		{
119 117
 			trigger_error('NO_POST_SELECTED');
120 118
 		}
Please login to merge, or discard this patch.
services/builder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 	 * @param int $forum_id
89 89
 	 * @param string $mode
90 90
 	 * @param bool $save_draft
91
-	 * @return string|false
91
+	 * @return string|boolean
92 92
 	 */
93 93
 	public function init($forum_id, $mode, $save_draft)
94 94
 	{
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -223,8 +223,7 @@  discard block
 block discarded – undo
223 223
 		if (!$field_data['field_mod_only'] || $this->mode === 'mcp')
224 224
 		{
225 225
 			$this->form->add($field, $field_data['field_type'], $field_data, $topic_id);
226
-		}
227
-		else if (!empty($field_data['field_value']))
226
+		} else if (!empty($field_data['field_value']))
228 227
 		{
229 228
 			$this->form->add($field, 'hidden', $field_data, $topic_id);
230 229
 		}
@@ -271,8 +270,7 @@  discard block
 block discarded – undo
271 270
 			{
272 271
 				$data['force_approved_state'] = $force_status;
273 272
 			}
274
-		}
275
-		else
273
+		} else
276 274
 		{
277 275
 			if ($this->force_state())
278 276
 			{
Please login to merge, or discard this patch.
services/comments.php 3 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,6 @@  discard block
 block discarded – undo
64 64
 	 * @param \phpbb\user								$user				User object
65 65
 	 * @param \blitze\content\services\form\form		$form				Form object
66 66
 	 * @param \blitze\sitemaker\services\forum\data		$forum				Forum Data object
67
-	 * @param \blitze\content\services\topic			$topic				Content topic object
68 67
 	 * @param string									$root_path			Path to the phpbb includes directory.
69 68
 	 * @param string									$php_ext			php file extension
70 69
 	*/
@@ -217,6 +216,11 @@  discard block
 block discarded – undo
217 216
 		$this->template->assign_var('POST_FORM', $this->form->get_form());
218 217
 	}
219 218
 
219
+	/**
220
+	 * @param integer $topic_id
221
+	 * @param integer $total_comments
222
+	 * @param string $base_url
223
+	 */
220 224
 	protected function build_pagination(&$start, $forum_id, $topic_id, $post_id, $total_comments, $action, $base_url)
221 225
 	{
222 226
 		if ($post_id && !$action)
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	 * @param \blitze\content\services\topic			$topic				Content topic object
68 68
 	 * @param string									$root_path			Path to the phpbb includes directory.
69 69
 	 * @param string									$php_ext			php file extension
70
-	*/
70
+	 */
71 71
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\config\db $config, \phpbb\content_visibility $content_visibility, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\pagination $pagination, \phpbb\request\request_interface $request, \phpbb\template\template $template, \phpbb\user $user, \blitze\content\services\form\form $form, \blitze\sitemaker\services\forum\data $forum, $root_path, $php_ext)
72 72
 	{
73 73
 		$this->auth = $auth;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
 
183 183
 				$poll = array();
184 184
 				$uid = $bitfield = $options = '';
185
-				$allow_bbcode	= ($this->config['allow_bbcode']) ? true : false;
186
-				$allow_smilies	= ($this->config['allow_smilies']) ? true : false;
187
-				$allow_urls		= ($this->config['allow_post_links']) ? true : false;
185
+				$allow_bbcode = ($this->config['allow_bbcode']) ? true : false;
186
+				$allow_smilies = ($this->config['allow_smilies']) ? true : false;
187
+				$allow_urls = ($this->config['allow_post_links']) ? true : false;
188 188
 
189 189
 				generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
190 190
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 				submit_post($action, $topic_data['topic_title'], $this->user->data['username'], POST_NORMAL, $poll, $post_data);
207 207
 
208 208
 				$post_id = $post_data['post_id'];
209
-				$redirect_url = $current_page . ((strpos($current_page, '?') === false) ? '?' : '&amp;')  . "p=$post_id#p$post_id";
209
+				$redirect_url = $current_page . ((strpos($current_page, '?') === false) ? '?' : '&amp;') . "p=$post_id#p$post_id";
210 210
 				$message = $this->user->lang['COMMENT_POSTED'] . '<br /><br />' . sprintf($this->user->lang['RETURN_PAGE'], '<a href="' . $redirect_url . '">', '</a>');
211 211
 
212 212
 				meta_refresh(3, $redirect_url);
Please login to merge, or discard this patch.
services/form/field/textarea.php 2 patches
Doc Comments   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,10 +75,8 @@  discard block
 block discarded – undo
75 75
 	/**
76 76
 	 * Display content field
77 77
 	 *
78
-	 * @param string $field_value
79 78
 	 * @param string $view_mode
80 79
 	 * @param array $topic_data
81
-	 * @param array $field_data
82 80
 	 * @return mixed
83 81
 	 */
84 82
 	public function display_field($value, $view_mode = 'detail', array $topic_data = array(), array $field = array())
@@ -182,7 +180,7 @@  discard block
 block discarded – undo
182 180
 	 * @param string $value
183 181
 	 * @param string $topic_url
184 182
 	 * @param string $view_mode
185
-	 * @return void
183
+	 * @return string
186 184
 	 */
187 185
 	protected function generate_field_pages($field_name, $value, $topic_url, $view_mode)
188 186
 	{
@@ -212,8 +210,8 @@  discard block
 block discarded – undo
212 210
 	/**
213 211
 	 * Generate pagination for topic subpages
214 212
 	 *
215
-	 * @param array $pages
216
-	 * @param array $page_titles
213
+	 * @param string[] $pages
214
+	 * @param string[] $page_titles
217 215
 	 * @param int $start
218 216
 	 * @param string $topic_url
219 217
 	 * @param string $view_mode
@@ -235,6 +233,7 @@  discard block
 block discarded – undo
235 233
 	 *
236 234
 	 * @param int $start
237 235
 	 * @param $page_titles
236
+	 * @param string $topic_url
238 237
 	 * @return void
239 238
 	 */
240 239
 	protected function generate_toc($start, $page_titles, $topic_url)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@
 block discarded – undo
160 160
 
161 161
 		display_custom_bbcodes();
162 162
 
163
-		$bbcode_status	= ($this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id)) ? true : false;
163
+		$bbcode_status = ($this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id)) ? true : false;
164 164
 
165 165
 		$dataref = $this->template_context->get_data_ref();
166 166
 		$this->ptemplate->assign_block_vars_array('custom_tags', (isset($dataref['custom_tags'])) ? $dataref['custom_tags'] : array());
Please login to merge, or discard this patch.
services/types.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,7 @@
 block discarded – undo
84 84
 			if ($trigger_error)
85 85
 			{
86 86
 				throw new \blitze\sitemaker\exception\out_of_bounds($type);
87
-			}
88
-			else
87
+			} else
89 88
 			{
90 89
 				return false;
91 90
 			}
Please login to merge, or discard this patch.
services/form/form.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -206,14 +206,12 @@
 block discarded – undo
206 206
 		if (!empty($field_value))
207 207
 		{
208 208
 			$this->errors[] = $obj->validate_field($row);
209
-		}
210
-		else if ($row['field_required'])
209
+		} else if ($row['field_required'])
211 210
 		{
212 211
 			if (!$row['field_mod_only'] || $cp_class === 'mcp')
213 212
 			{
214 213
 				$this->errors[] = $this->language->lang_array('FIELD_REQUIRED', array($row['field_label']));
215
-			}
216
-			else
214
+			} else
217 215
 			{
218 216
 				$req_mod_input = true;
219 217
 			}
Please login to merge, or discard this patch.
services/form/field/checkbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 	public function get_field_value($name, $default)
18 18
 	{
19 19
 		$default = is_array($default) ? $default : explode("\n", $default);
20
-		$value =  $this->request->variable($name, $default, true);
20
+		$value = $this->request->variable($name, $default, true);
21 21
 
22 22
 		if (empty($value) && $this->request->server('REQUEST_METHOD') !== 'POST')
23 23
 		{
Please login to merge, or discard this patch.
services/form/field/choice.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 		foreach ($data['field_settings']['field_options'] as $value => $label)
71 71
 		{
72 72
 			$this->ptemplate->assign_block_vars('option', array(
73
-				'ID'		=> 'field-'. $name . '-' . $count,
73
+				'ID'		=> 'field-' . $name . '-' . $count,
74 74
 				'LABEL'		=> $this->language->lang($label),
75 75
 				'SELECTED'	=> (in_array($value, $selected, true)) ? true : false,
76 76
 				'VALUE'		=> $value
Please login to merge, or discard this patch.