Completed
Push — master ( aa719f...d47ae3 )
by Khoa
05:06
created
ext/vinabb/web/controllers/portal/article.php 1 patch
Indentation   +91 added lines, -91 removed lines patch added patch discarded remove patch
@@ -89,24 +89,24 @@  discard block
 block discarded – undo
89 89
 	protected $errors;
90 90
 
91 91
 	/**
92
-	* Constructor
93
-	*
94
-	* @param \phpbb\auth\auth									$auth			Authentication object
95
-	* @param \vinabb\web\controllers\cache\service_interface	$cache			Cache service
96
-	* @param \phpbb\config\config								$config			Config object
97
-	* @param ContainerInterface									$container		Container object
98
-	* @param \phpbb\language\language							$language		Language object
99
-	* @param \phpbb\log\log										$log			Log object
100
-	* @param \phpbb\notification\manager						$notification	Notification manager
101
-	* @param \vinabb\web\controllers\pagination					$pagination		Pagination object
102
-	* @param \phpbb\request\request								$request		Request object
103
-	* @param \phpbb\template\template							$template		Template object
104
-	* @param \phpbb\user										$user			User object
105
-	* @param \phpbb\controller\helper							$helper			Controller helper
106
-	* @param \vinabb\web\controllers\helper\helper_interface	$ext_helper		Extension helper
107
-	* @param string												$root_path		phpBB root path
108
-	* @param string												$php_ext		PHP file extension
109
-	*/
92
+	 * Constructor
93
+	 *
94
+	 * @param \phpbb\auth\auth									$auth			Authentication object
95
+	 * @param \vinabb\web\controllers\cache\service_interface	$cache			Cache service
96
+	 * @param \phpbb\config\config								$config			Config object
97
+	 * @param ContainerInterface									$container		Container object
98
+	 * @param \phpbb\language\language							$language		Language object
99
+	 * @param \phpbb\log\log										$log			Log object
100
+	 * @param \phpbb\notification\manager						$notification	Notification manager
101
+	 * @param \vinabb\web\controllers\pagination					$pagination		Pagination object
102
+	 * @param \phpbb\request\request								$request		Request object
103
+	 * @param \phpbb\template\template							$template		Template object
104
+	 * @param \phpbb\user										$user			User object
105
+	 * @param \phpbb\controller\helper							$helper			Controller helper
106
+	 * @param \vinabb\web\controllers\helper\helper_interface	$ext_helper		Extension helper
107
+	 * @param string												$root_path		phpBB root path
108
+	 * @param string												$php_ext		PHP file extension
109
+	 */
110 110
 	public function __construct(
111 111
 		\phpbb\auth\auth $auth,
112 112
 		\vinabb\web\controllers\cache\service_interface $cache,
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
 	}
146 146
 
147 147
 	/**
148
-	* View an article
149
-	*
150
-	* @param int	$article_id		Article ID
151
-	* @param string	$page			The page number
152
-	* @param string	$tpl_filename	Template filename
153
-	*
154
-	* @return \Symfony\Component\HttpFoundation\Response
155
-	* @throws \phpbb\exception\http_exception
156
-	*/
148
+	 * View an article
149
+	 *
150
+	 * @param int	$article_id		Article ID
151
+	 * @param string	$page			The page number
152
+	 * @param string	$tpl_filename	Template filename
153
+	 *
154
+	 * @return \Symfony\Component\HttpFoundation\Response
155
+	 * @throws \phpbb\exception\http_exception
156
+	 */
157 157
 	public function article($article_id, $page, $tpl_filename = 'portal_article.html')
158 158
 	{
159 159
 		// Pagination for comments
@@ -217,21 +217,21 @@  discard block
 block discarded – undo
217 217
 	}
218 218
 
219 219
 	/**
220
-	* Print the article
221
-	*
222
-	* @param int $article_id Article ID
223
-	* @return \Symfony\Component\HttpFoundation\Response
224
-	*/
220
+	 * Print the article
221
+	 *
222
+	 * @param int $article_id Article ID
223
+	 * @return \Symfony\Component\HttpFoundation\Response
224
+	 */
225 225
 	public function print_page($article_id)
226 226
 	{
227 227
 		return $this->article($article_id, '', 'portal_article_print.html');
228 228
 	}
229 229
 
230 230
 	/**
231
-	* Update the view counter
232
-	*
233
-	* @param int $article_id Article ID
234
-	*/
231
+	 * Update the view counter
232
+	 *
233
+	 * @param int $article_id Article ID
234
+	 */
235 235
 	protected function update_view_counter($article_id)
236 236
 	{
237 237
 		$session_page = ($this->config['enable_mod_rewrite']) ? str_replace("app.{$this->php_ext}/", '', $this->user->data['session_page']) : $this->user->data['session_page'];
@@ -243,10 +243,10 @@  discard block
 block discarded – undo
243 243
 	}
244 244
 
245 245
 	/**
246
-	* Generate template variables for the article author
247
-	*
248
-	* @param int $user_id User ID
249
-	*/
246
+	 * Generate template variables for the article author
247
+	 *
248
+	 * @param int $user_id User ID
249
+	 */
250 250
 	public function get_author_info($user_id)
251 251
 	{
252 252
 		/** @var \vinabb\web\entities\user_interface $entity */
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
 	}
270 270
 
271 271
 	/**
272
-	* Display comments from the article
273
-	*
274
-	* @param int $start The position of the first item in range
275
-	*/
272
+	 * Display comments from the article
273
+	 *
274
+	 * @param int $start The position of the first item in range
275
+	 */
276 276
 	public function display_comments($start)
277 277
 	{
278 278
 		$comments = [];
@@ -317,16 +317,16 @@  discard block
 block discarded – undo
317 317
 	}
318 318
 
319 319
 	/**
320
-	* List comments with pagination
321
-	*
322
-	* @param int	$article_id		Article ID
323
-	* @param array	$comments		Array of comments
324
-	* @param int	$comment_count	Number of comments
325
-	* @param int	$limit			Items per page
326
-	* @param int	$offset			Position of the start
327
-	*
328
-	* @return int Position of the start
329
-	*/
320
+	 * List comments with pagination
321
+	 *
322
+	 * @param int	$article_id		Article ID
323
+	 * @param array	$comments		Array of comments
324
+	 * @param int	$comment_count	Number of comments
325
+	 * @param int	$limit			Items per page
326
+	 * @param int	$offset			Position of the start
327
+	 *
328
+	 * @return int Position of the start
329
+	 */
330 330
 	public function list_comments($article_id, &$comments, &$comment_count, $limit = 0, $offset = 0)
331 331
 	{
332 332
 		$operators = $this->container->get('vinabb.web.operators.portal_comment');
@@ -366,11 +366,11 @@  discard block
 block discarded – undo
366 366
 	}
367 367
 
368 368
 	/**
369
-	* Get user data from their IDs
370
-	*
371
-	* @param array	$user_data	Array of users
372
-	* @param array	$comments	Array of comments
373
-	*/
369
+	 * Get user data from their IDs
370
+	 *
371
+	 * @param array	$user_data	Array of users
372
+	 * @param array	$comments	Array of comments
373
+	 */
374 374
 	protected function get_commenter_data($user_data, &$comments)
375 375
 	{
376 376
 		if (!empty($user_data))
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
 	}
405 405
 
406 406
 	/**
407
-	* Write a comment
408
-	*/
407
+	 * Write a comment
408
+	 */
409 409
 	public function add_comment()
410 410
 	{
411 411
 		// Initiate an entity
@@ -422,10 +422,10 @@  discard block
 block discarded – undo
422 422
 	}
423 423
 
424 424
 	/**
425
-	* Edit a comment
426
-	*
427
-	* @param int $comment_id Comment ID
428
-	*/
425
+	 * Edit a comment
426
+	 *
427
+	 * @param int $comment_id Comment ID
428
+	 */
429 429
 	public function edit_comment($comment_id)
430 430
 	{
431 431
 		// Initiate and load the entity
@@ -442,10 +442,10 @@  discard block
 block discarded – undo
442 442
 	}
443 443
 
444 444
 	/**
445
-	* Process data to be added or edited
446
-	*
447
-	* @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
448
-	*/
445
+	 * Process data to be added or edited
446
+	 *
447
+	 * @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
448
+	 */
449 449
 	public function add_edit_comment(\vinabb\web\entities\portal_comment_interface $entity)
450 450
 	{
451 451
 		$submit = $this->request->is_set_post('submit');
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
 	}
494 494
 
495 495
 	/**
496
-	* Request data from the form
497
-	*/
496
+	 * Request data from the form
497
+	 */
498 498
 	protected function request_data()
499 499
 	{
500 500
 		$this->data = [
@@ -510,10 +510,10 @@  discard block
 block discarded – undo
510 510
 	}
511 511
 
512 512
 	/**
513
-	* Grab the form data's parsing options and set them to the entity
514
-	*
515
-	* @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
516
-	*/
513
+	 * Grab the form data's parsing options and set them to the entity
514
+	 *
515
+	 * @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
516
+	 */
517 517
 	protected function set_bbcode_options(\vinabb\web\entities\portal_comment_interface $entity)
518 518
 	{
519 519
 		$entity->text_enable_bbcode(true);
@@ -522,10 +522,10 @@  discard block
 block discarded – undo
522 522
 	}
523 523
 
524 524
 	/**
525
-	* Map the form data fields to setters and set them to the entity
526
-	*
527
-	* @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
528
-	*/
525
+	 * Map the form data fields to setters and set them to the entity
526
+	 *
527
+	 * @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
528
+	 */
529 529
 	protected function map_set_data(\vinabb\web\entities\portal_comment_interface $entity)
530 530
 	{
531 531
 		$map_fields = [
@@ -554,10 +554,10 @@  discard block
 block discarded – undo
554 554
 	}
555 555
 
556 556
 	/**
557
-	* Insert or update data, then log actions and clear cache if needed
558
-	*
559
-	* @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
560
-	*/
557
+	 * Insert or update data, then log actions and clear cache if needed
558
+	 *
559
+	 * @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
560
+	 */
561 561
 	protected function save_comment(\vinabb\web\entities\portal_comment_interface $entity)
562 562
 	{
563 563
 		if ($entity->get_id())
@@ -580,10 +580,10 @@  discard block
 block discarded – undo
580 580
 	}
581 581
 
582 582
 	/**
583
-	* Output entity data to template variables
584
-	*
585
-	* @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
586
-	*/
583
+	 * Output entity data to template variables
584
+	 *
585
+	 * @param \vinabb\web\entities\portal_comment_interface $entity Comment entity
586
+	 */
587 587
 	protected function data_to_tpl(\vinabb\web\entities\portal_comment_interface $entity)
588 588
 	{
589 589
 		$this->template->assign_vars([
@@ -602,10 +602,10 @@  discard block
 block discarded – undo
602 602
 	}
603 603
 
604 604
 	/**
605
-	* Delete a comment
606
-	*
607
-	* @param int $comment_id Comment ID
608
-	*/
605
+	 * Delete a comment
606
+	 *
607
+	 * @param int $comment_id Comment ID
608
+	 */
609 609
 	public function delete_comment($comment_id)
610 610
 	{
611 611
 		try
Please login to merge, or discard this patch.