Completed
Push — 3.2.x ( 0f953a...5a2f7e )
by Erwan
01:52
created
controller/acp/main.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	protected $u_action;
31 31
 
32 32
 	/**
33
-	* Constructor
34
-	*
35
-	* @param \phpbb\db\driver\driver_interface 		$db			Database object
36
-	* @param \phpbb\language\language				$language	Language object
37
-	* @param \phpbb\request\request					$request	Request object
38
-	* @param \phpbb\template\template				$template	Template object
39
-	*/
33
+	 * Constructor
34
+	 *
35
+	 * @param \phpbb\db\driver\driver_interface 		$db			Database object
36
+	 * @param \phpbb\language\language				$language	Language object
37
+	 * @param \phpbb\request\request					$request	Request object
38
+	 * @param \phpbb\template\template				$template	Template object
39
+	 */
40 40
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template)
41 41
 	{
42 42
 		$this->db			= $db;
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	/**
49
-	* Display confirm box
50
-	*
51
-	* @param	string $action Requested action
52
-	* @return	null
53
-	*/
49
+	 * Display confirm box
50
+	 *
51
+	 * @param	string $action Requested action
52
+	 * @return	null
53
+	 */
54 54
 	public function display_confirm($action)
55 55
 	{
56 56
 		switch ($action)
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
 	}
89 89
 
90 90
 	/**
91
-	* Display phpBB Directory statistics
92
-	*
93
-	* @return null
94
-	*/
91
+	 * Display phpBB Directory statistics
92
+	 *
93
+	 * @return null
94
+	 */
95 95
 	public function display_stats()
96 96
 	{
97 97
 		// Count number of categories
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 	}
179 179
 
180 180
 	/**
181
-	* Execute action requested
182
-	*
183
-	* @param	string $action Requested action
184
-	* @return	null
185
-	*/
181
+	 * Execute action requested
182
+	 *
183
+	 * @param	string $action Requested action
184
+	 * @return	null
185
+	 */
186 186
 	public function exec_action($action)
187 187
 	{
188 188
 		switch ($action)
@@ -257,23 +257,23 @@  discard block
 block discarded – undo
257 257
 	}
258 258
 
259 259
 	/**
260
-	* Set page url
261
-	*
262
-	* @param	string $u_action Custom form action
263
-	* @return	null
264
-	* @access	public
265
-	*/
260
+	 * Set page url
261
+	 *
262
+	 * @param	string $u_action Custom form action
263
+	 * @return	null
264
+	 * @access	public
265
+	 */
266 266
 	public function set_page_url($u_action)
267 267
 	{
268 268
 		$this->u_action = $u_action;
269 269
 	}
270 270
 
271 271
 	/**
272
-	* Get orphan banners
273
-	*
274
-	* @param	bool		$delete	True if we want to delete banners, else false
275
-	* @return	null|int	Number of orphan files, else null
276
-	*/
272
+	 * Get orphan banners
273
+	 *
274
+	 * @param	bool		$delete	True if we want to delete banners, else false
275
+	 * @return	null|int	Number of orphan files, else null
276
+	 */
277 277
 	private function _orphan_files($delete = false)
278 278
 	{
279 279
 		$banner_path = $this->get_banner_path();
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 	*/
40 40
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template)
41 41
 	{
42
-		$this->db			= $db;
42
+		$this->db = $db;
43 43
 		$this->language		= $language;
44 44
 		$this->template		= $template;
45
-		$this->request		= $request;
45
+		$this->request = $request;
46 46
 	}
47 47
 
48 48
 	/**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 			{
149 149
 				if ($file[0] != '.' && $file[0] != '..' && strpos($file, 'index.') === false && strpos($file, '.db') === false)
150 150
 				{
151
-					$banners_dir_size += filesize($banners_path . $file);
151
+					$banners_dir_size += filesize($banners_path.$file);
152 152
 				}
153 153
 			}
154 154
 			closedir($banners_dir);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 			'U_ACTION'			=> $this->u_action,
168 168
 
169 169
 			'TOTAL_CATS'		=> $total_cats,
170
-			'TOTAL_LINKS'		=> $total_links-$waiting_links,
170
+			'TOTAL_LINKS'		=> $total_links - $waiting_links,
171 171
 			'WAITING_LINKS'		=> $waiting_links,
172 172
 			'TOTAL_COMMENTS'	=> $total_comments,
173 173
 			'TOTAL_VOTES'		=> $total_votes,
@@ -192,15 +192,15 @@  discard block
 block discarded – undo
192 192
 				{
193 193
 					case 'sqlite':
194 194
 					case 'firebird':
195
-						$this->db->sql_query('DELETE FROM ' . $this->votes_table);
195
+						$this->db->sql_query('DELETE FROM '.$this->votes_table);
196 196
 					break;
197 197
 
198 198
 					default:
199
-						$this->db->sql_query('TRUNCATE TABLE ' . $this->votes_table);
199
+						$this->db->sql_query('TRUNCATE TABLE '.$this->votes_table);
200 200
 					break;
201 201
 				}
202 202
 
203
-				$sql = 'UPDATE ' . $this->links_table . '
203
+				$sql = 'UPDATE '.$this->links_table.'
204 204
 					SET link_vote = 0, link_note = 0';
205 205
 				$this->db->sql_query($sql);
206 206
 
@@ -215,15 +215,15 @@  discard block
 block discarded – undo
215 215
 				{
216 216
 					case 'sqlite':
217 217
 					case 'firebird':
218
-						$this->db->sql_query('DELETE FROM ' . $this->comments_table);
218
+						$this->db->sql_query('DELETE FROM '.$this->comments_table);
219 219
 					break;
220 220
 
221 221
 					default:
222
-						$this->db->sql_query('TRUNCATE TABLE ' . $this->comments_table);
222
+						$this->db->sql_query('TRUNCATE TABLE '.$this->comments_table);
223 223
 					break;
224 224
 				}
225 225
 
226
-				$sql = 'UPDATE ' . $this->links_table . '
226
+				$sql = 'UPDATE '.$this->links_table.'
227 227
 					SET link_comment = 0';
228 228
 				$this->db->sql_query($sql);
229 229
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 				break;
236 236
 
237 237
 			case 'clicks':
238
-				$sql = 'UPDATE ' . $this->links_table . '
238
+				$sql = 'UPDATE '.$this->links_table.'
239 239
 					SET link_view = 0';
240 240
 				$this->db->sql_query($sql);
241 241
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 			{
290 290
 				$physical_files[] = $img;
291 291
 			}
292
-			$sql = 'SELECT link_banner FROM ' . $this->links_table . '
292
+			$sql = 'SELECT link_banner FROM '.$this->links_table.'
293 293
 				WHERE link_banner <> \'\'';
294 294
 			$result = $this->db->sql_query($sql);
295 295
 
Please login to merge, or discard this patch.
core/nestedset_category.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 class nestedset_category extends \phpbb\tree\nestedset
14 14
 {
15 15
 	/**
16
-	* Construct
17
-	*
18
-	* @param \phpbb\db\driver\driver_interface	$db					Database connection
19
-	* @param \phpbb\lock\db						$lock				Lock class used to lock the table when moving forums around
20
-	* @param string								$categorie_table	Categories table
21
-	*/
16
+	 * Construct
17
+	 *
18
+	 * @param \phpbb\db\driver\driver_interface	$db					Database connection
19
+	 * @param \phpbb\lock\db						$lock				Lock class used to lock the table when moving forums around
20
+	 * @param string								$categorie_table	Categories table
21
+	 */
22 22
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock, $categorie_table)
23 23
 	{
24 24
 		parent::__construct(
Please login to merge, or discard this patch.
core/categorie.php 2 patches
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -46,18 +46,18 @@  discard block
 block discarded – undo
46 46
 	public $data = array();
47 47
 
48 48
 	/**
49
-	* Constructor
50
-	*
51
-	* @param \phpbb\db\driver\driver_interface 		$db			Database object
52
-	* @param \phpbb\config\config 					$config		Config object
53
-	* @param \phpbb\language\language				$language	Language object
54
-	* @param \phpbb\template\template 				$template	Template object
55
-	* @param \phpbb\user 							$user		User object
56
-	* @param \phpbb\controller\helper 				$helper		Controller helper object
57
-	* @param \phpbb\request\request 				$request	Request object
58
-	* @param \phpbb\auth\auth 						$auth		Auth object
59
-	* @param \phpbb\cron\manager					$cron		Cron object
60
-	*/
49
+	 * Constructor
50
+	 *
51
+	 * @param \phpbb\db\driver\driver_interface 		$db			Database object
52
+	 * @param \phpbb\config\config 					$config		Config object
53
+	 * @param \phpbb\language\language				$language	Language object
54
+	 * @param \phpbb\template\template 				$template	Template object
55
+	 * @param \phpbb\user 							$user		User object
56
+	 * @param \phpbb\controller\helper 				$helper		Controller helper object
57
+	 * @param \phpbb\request\request 				$request	Request object
58
+	 * @param \phpbb\auth\auth 						$auth		Auth object
59
+	 * @param \phpbb\cron\manager					$cron		Cron object
60
+	 */
61 61
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\cron\manager $cron)
62 62
 	{
63 63
 		$this->db			= $db;
@@ -72,21 +72,21 @@  discard block
 block discarded – undo
72 72
 	}
73 73
 
74 74
 	/**
75
-	* Function for get approval setting
76
-	* used in edit mode for test the setting of new category's link
77
-	*
78
-	* @return bool
79
-	*/
75
+	 * Function for get approval setting
76
+	 * used in edit mode for test the setting of new category's link
77
+	 *
78
+	 * @return bool
79
+	 */
80 80
 	public function need_approval()
81 81
 	{
82 82
 		return (bool) $this->data['cat_validate'];
83 83
 	}
84 84
 
85 85
 	/**
86
-	* Generate Jumpbox
87
-	*
88
-	* @return null
89
-	*/
86
+	 * Generate Jumpbox
87
+	 *
88
+	 * @return null
89
+	 */
90 90
 	public function make_cat_jumpbox()
91 91
 	{
92 92
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
 	}
140 140
 
141 141
 	/**
142
-	* Generate a list of directory's categories
143
-	*
144
-	* @param	int		$select_id		Selected category
145
-	* @param	array	$ignore_id		Array of ignored categories
146
-	* @return	string	$cat_list		html code
147
-	*/
142
+	 * Generate a list of directory's categories
143
+	 *
144
+	 * @param	int		$select_id		Selected category
145
+	 * @param	array	$ignore_id		Array of ignored categories
146
+	 * @return	string	$cat_list		html code
147
+	 */
148 148
 	public function make_cat_select($select_id = 0, $ignore_id = array())
149 149
 	{
150 150
 		$ignore_id = is_array($ignore_id) ? $ignore_id : array($ignore_id);
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
 	}
191 191
 
192 192
 	/**
193
-	* Display cat or subcat
194
-	*
195
-	* @return	null
196
-	*/
193
+	 * Display cat or subcat
194
+	 *
195
+	 * @return	null
196
+	 */
197 197
 	public function display()
198 198
 	{
199 199
 		$cat_rows	= $subcats = array();
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
 	}
323 323
 
324 324
 	/**
325
-	* Get informations about a cat or subcat
326
-	*
327
-	* @param	int	$cat_id		The category ID
328
-	* @return	null|false
329
-	*/
325
+	 * Get informations about a cat or subcat
326
+	 *
327
+	 * @param	int	$cat_id		The category ID
328
+	 * @return	null|false
329
+	 */
330 330
 	public function get($cat_id = 0)
331 331
 	{
332 332
 		if ($cat_id)
@@ -354,11 +354,11 @@  discard block
 block discarded – undo
354 354
 	}
355 355
 
356 356
 	/**
357
-	* Create category navigation links for given category, create parent
358
-	* list if currently null, assign basic category info to template
359
-	*
360
-	* @param	array	$dir_cat_data
361
-	*/
357
+	 * Create category navigation links for given category, create parent
358
+	 * list if currently null, assign basic category info to template
359
+	 *
360
+	 * @param	array	$dir_cat_data
361
+	 */
362 362
 	public function generate_dir_nav(&$dir_cat_data)
363 363
 	{
364 364
 		global $phpbb_container;
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
 	}
396 396
 
397 397
 	/**
398
-	* Return good key language
399
-	*
400
-	* @param	bool	$validate	True if approbation needed before publication
401
-	* @return	string				Information about approval, depends on user auth level
402
-	* @throws	\phpbb\exception\runtime_exception
403
-	*/
398
+	 * Return good key language
399
+	 *
400
+	 * @param	bool	$validate	True if approbation needed before publication
401
+	 * @return	string				Information about approval, depends on user auth level
402
+	 * @throws	\phpbb\exception\runtime_exception
403
+	 */
404 404
 	public function dir_submit_type($validate)
405 405
 	{
406 406
 		if ($validate && !$this->auth->acl_get('a_'))
@@ -424,15 +424,15 @@  discard block
 block discarded – undo
424 424
 	}
425 425
 
426 426
 	/**
427
-	* Category watching common code
428
-	*
429
-	* @param	string		$mode			Watch or unwatch a category
430
-	* @param	array		$s_watching		An empty array, passed by reference
431
-	* @param	int			$user_id		The user ID
432
-	* @param	int			$cat_id			The category ID
433
-	* @param	string		$notify_status	User is watching the category?
434
-	* @return	null|string
435
-	*/
427
+	 * Category watching common code
428
+	 *
429
+	 * @param	string		$mode			Watch or unwatch a category
430
+	 * @param	array		$s_watching		An empty array, passed by reference
431
+	 * @param	int			$user_id		The user ID
432
+	 * @param	int			$cat_id			The category ID
433
+	 * @param	string		$notify_status	User is watching the category?
434
+	 * @return	null|string
435
+	 */
436 436
 	public function watch_categorie($mode, &$s_watching, $user_id, $cat_id, $notify_status)
437 437
 	{
438 438
 		// Is user watching this thread?
@@ -518,11 +518,11 @@  discard block
 block discarded – undo
518 518
 	}
519 519
 
520 520
 	/**
521
-	* Return Category name
522
-	*
523
-	* @param	int		$cat_id		The category ID
524
-	* @return	string				The category name
525
-	*/
521
+	 * Return Category name
522
+	 *
523
+	 * @param	int		$cat_id		The category ID
524
+	 * @return	string				The category name
525
+	 */
526 526
 	static public function getname($cat_id)
527 527
 	{
528 528
 		global $db, $phpbb_container;
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 	*/
61 61
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\cron\manager $cron)
62 62
 	{
63
-		$this->db			= $db;
64
-		$this->config		= $config;
63
+		$this->db = $db;
64
+		$this->config = $config;
65 65
 		$this->language		= $language;
66 66
 		$this->template		= $template;
67 67
 		$this->user			= $user;
68
-		$this->helper		= $helper;
69
-		$this->request		= $request;
68
+		$this->helper = $helper;
69
+		$this->request = $request;
70 70
 		$this->auth			= $auth;
71 71
 		$this->cron 		= $cron;
72 72
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	public function make_cat_jumpbox()
91 91
 	{
92 92
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
93
-			FROM ' . $this->categories_table . '
93
+			FROM ' . $this->categories_table.'
94 94
 			ORDER BY left_id ASC';
95 95
 		$result = $this->db->sql_query($sql, 600);
96 96
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
 		// This query is identical to the jumpbox one
153 153
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
154
-			FROM ' . $this->categories_table . '
154
+			FROM ' . $this->categories_table.'
155 155
 			ORDER BY left_id ASC';
156 156
 		$result = $this->db->sql_query($sql, 600);
157 157
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			}
182 182
 
183 183
 			$selected = (($row['cat_id'] == $select_id) ? ' selected="selected"' : '');
184
-			$cat_list .= '<option value="' . $row['cat_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['cat_name'] . '</option>';
184
+			$cat_list .= '<option value="'.$row['cat_id'].'"'.(($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected).'>'.$padding.$row['cat_name'].'</option>';
185 185
 		}
186 186
 		$this->db->sql_freeresult($result);
187 187
 		unset($padding_store);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	*/
197 197
 	public function display()
198 198
 	{
199
-		$cat_rows	= $subcats = array();
199
+		$cat_rows = $subcats = array();
200 200
 		$parent_id	= $visible_cats = 0;
201 201
 
202 202
 		$sql_array = array(
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		else
215 215
 		{
216 216
 			$root_data = $this->data;
217
-			$sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'];
217
+			$sql_where = 'left_id > '.$root_data['left_id'].' AND left_id < '.$root_data['right_id'];
218 218
 		}
219 219
 
220 220
 		$sql = $this->db->sql_build_query('SELECT', array(
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 			{
262 262
 				foreach ($subcats[$dir_cat_id] as $subcat_id => $subcat_row)
263 263
 				{
264
-					$row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links']+$subcat_row['links']) : $row['cat_links'];
264
+					$row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links'] + $subcat_row['links']) : $row['cat_links'];
265 265
 
266 266
 					if ($subcat_row['display'] && $subcat_row['parent_id'] == $dir_cat_id)
267 267
 					{
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 			if ($task->is_ready())
317 317
 			{
318 318
 				$url = $task->get_url();
319
-				$this->template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="" />');
319
+				$this->template->assign_var('RUN_CRON_TASK', '<img src="'.$url.'" width="1" height="1" alt="" />');
320 320
 			}
321 321
 		}
322 322
 	}
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
 				'LEFT_JOIN'	=> array(
339 339
 						array(
340 340
 							'FROM'	=> array($this->watch_table	=> 'w'),
341
-							'ON'	=> 'c.cat_id = w.cat_id AND w.user_id = ' . (int) $this->user->data['user_id']
341
+							'ON'	=> 'c.cat_id = w.cat_id AND w.user_id = '.(int) $this->user->data['user_id']
342 342
 						),
343 343
 				),
344
-				'WHERE'		=> 'c.cat_id = ' . (int) $cat_id
344
+				'WHERE'		=> 'c.cat_id = '.(int) $cat_id
345 345
 			);
346 346
 			$sql = $this->db->sql_build_query('SELECT', $sql_array);
347 347
 			$result = $this->db->sql_query($sql);
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 				$this->template->assign_block_vars('dir_navlinks', array(
379 379
 					'FORUM_NAME'	=> $parent_data['cat_name'],
380 380
 					'FORUM_ID'		=> $parent_cat_id,
381
-					'MICRODATA'		=> $microdata_attr . '="' . $parent_cat_id . '"',
381
+					'MICRODATA'		=> $microdata_attr.'="'.$parent_cat_id.'"',
382 382
 					'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $parent_cat_id)),
383 383
 				));
384 384
 			}
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 		$this->template->assign_block_vars('dir_navlinks', array(
388 388
 			'FORUM_NAME'	=> $dir_cat_data['cat_name'],
389 389
 			'FORUM_ID'		=> $dir_cat_data['cat_id'],
390
-			'MICRODATA'		=> $microdata_attr . '="' . $dir_cat_data['cat_id'] . '"',
390
+			'MICRODATA'		=> $microdata_attr.'="'.$dir_cat_data['cat_id'].'"',
391 391
 			'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $dir_cat_data['cat_id'])),
392 392
 		));
393 393
 
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
 			{
445 445
 				if ($mode == 'unwatch')
446 446
 				{
447
-					$sql = 'DELETE FROM ' . $this->watch_table . "
447
+					$sql = 'DELETE FROM '.$this->watch_table."
448 448
 						WHERE cat_id = $cat_id
449 449
 							AND user_id = $user_id";
450 450
 					$this->db->sql_query($sql);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
 					if (!$this->request->is_ajax())
456 456
 					{
457
-						$message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>');
457
+						$message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>');
458 458
 					}
459 459
 
460 460
 					meta_refresh(3, $redirect_url);
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 
467 467
 					if ($notify_status != NOTIFY_YES)
468 468
 					{
469
-						$sql = 'UPDATE ' . $this->watch_table . '
470
-							SET notify_status = ' . NOTIFY_YES . "
469
+						$sql = 'UPDATE '.$this->watch_table.'
470
+							SET notify_status = ' . NOTIFY_YES."
471 471
 							WHERE cat_id = $cat_id
472 472
 								AND user_id = $user_id";
473 473
 						$this->db->sql_query($sql);
@@ -478,8 +478,8 @@  discard block
 block discarded – undo
478 478
 			{
479 479
 				if ($mode == 'watch')
480 480
 				{
481
-					$sql = 'INSERT INTO ' . $this->watch_table . " (user_id, cat_id, notify_status)
482
-						VALUES ($user_id, $cat_id, " . NOTIFY_YES . ')';
481
+					$sql = 'INSERT INTO '.$this->watch_table." (user_id, cat_id, notify_status)
482
+						VALUES ($user_id, $cat_id, ".NOTIFY_YES.')';
483 483
 					$this->db->sql_query($sql);
484 484
 
485 485
 					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 
488 488
 					if (!$this->request->is_ajax())
489 489
 					{
490
-						$message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>');
490
+						$message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>');
491 491
 					}
492 492
 
493 493
 					meta_refresh(3, $redirect_url);
@@ -507,10 +507,10 @@  discard block
 block discarded – undo
507 507
 
508 508
 		if ($can_watch)
509 509
 		{
510
-			$s_watching['link'] 		= $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch')));
510
+			$s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch')));
511 511
 			$s_watching['link_toggle'] 	= $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => ((!$is_watching) ? 'unwatch' : 'watch')));
512
-			$s_watching['title'] 		= $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT');
513
-			$s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT');
512
+			$s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT');
513
+			$s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT');
514 514
 			$s_watching['is_watching'] 	= $is_watching;
515 515
 		}
516 516
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 		$categories_table = $phpbb_container->getParameter('tables.dir.categories');
531 531
 
532 532
 		$sql = 'SELECT cat_name
533
-			FROM ' . $categories_table . '
533
+			FROM ' . $categories_table.'
534 534
 			WHERE cat_id = ' . (int) $cat_id;
535 535
 		$result = $db->sql_query($sql);
536 536
 		$row = $db->sql_fetchrow($result);
Please login to merge, or discard this patch.
core/cron.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -39,17 +39,17 @@  discard block
 block discarded – undo
39 39
 	protected $php_ext;
40 40
 
41 41
 	/**
42
-	* Constructor
43
-	*
44
-	* @param \phpbb\db\driver\driver_interface 	$db					Database object
45
-	* @param \phpbb\config\config 				$config				Config object
46
-	* @param \phpbb\log\log						$phpbb_log			Log object
47
-	* @param \phpbb\user 						$user				User object
48
-	* @param \phpbb\notification\manager		$notification		Notification object
49
-	* @param \ernadoo\phpbbdirectory\core\link	$link				PhpBB Directory extension link object
50
-	* @param string         					$root_path			phpBB root path
51
-	* @param string         					$php_ext			phpEx
52
-	*/
42
+	 * Constructor
43
+	 *
44
+	 * @param \phpbb\db\driver\driver_interface 	$db					Database object
45
+	 * @param \phpbb\config\config 				$config				Config object
46
+	 * @param \phpbb\log\log						$phpbb_log			Log object
47
+	 * @param \phpbb\user 						$user				User object
48
+	 * @param \phpbb\notification\manager		$notification		Notification object
49
+	 * @param \ernadoo\phpbbdirectory\core\link	$link				PhpBB Directory extension link object
50
+	 * @param string         					$root_path			phpBB root path
51
+	 * @param string         					$php_ext			phpEx
52
+	 */
53 53
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\log\log $phpbb_log, \phpbb\user $user, \phpbb\notification\manager $notification, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
54 54
 	{
55 55
 		$this->db				= $db;
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 	}
64 64
 
65 65
 	/**
66
-	* Method called by cron task.
67
-	*
68
-	* @param	array	$cat_data	Information about category, from db
69
-	* @return	null
70
-	*/
66
+	 * Method called by cron task.
67
+	 *
68
+	 * @param	array	$cat_data	Information about category, from db
69
+	 * @return	null
70
+	 */
71 71
 	public function auto_check($cat_data)
72 72
 	{
73 73
 		$sql = 'SELECT cat_name
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
 	}
117 117
 
118 118
 	/**
119
-	* Check, for website with backlink specified, if backlink is always here.
120
-	* After $nb_check verification, website is deleted, otherwise, a notification is send to poster
121
-	*
122
-	* @param	int		$cat_id		The category ID
123
-	* @param	int		$nb_check	Number of check before demete a website
124
-	* @param	int		$next_prune	Date of next auto check
125
-	* @return	null
126
-	*/
119
+	 * Check, for website with backlink specified, if backlink is always here.
120
+	 * After $nb_check verification, website is deleted, otherwise, a notification is send to poster
121
+	 *
122
+	 * @param	int		$cat_id		The category ID
123
+	 * @param	int		$nb_check	Number of check before demete a website
124
+	 * @param	int		$next_prune	Date of next auto check
125
+	 * @return	null
126
+	 */
127 127
 	private function _check($cat_id, $nb_check, $next_prune)
128 128
 	{
129 129
 		$del_array = $update_array = array();
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
 	}
172 172
 
173 173
 	/**
174
-	* Update website verification number after a missing backlink, and send notificaton
175
-	*
176
-	* @param	array	$u_array	Information about website
177
-	* @param	int		$next_prune	Date of next auto check
178
-	* @return	null
179
-	*/
174
+	 * Update website verification number after a missing backlink, and send notificaton
175
+	 *
176
+	 * @param	array	$u_array	Information about website
177
+	 * @param	int		$next_prune	Date of next auto check
178
+	 * @return	null
179
+	 */
180 180
 	private function _update_check($u_array, $next_prune)
181 181
 	{
182 182
 		if (!class_exists('messenger'))
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
 	*/
53 53
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\log\log $phpbb_log, \phpbb\user $user, \phpbb\notification\manager $notification, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
54 54
 	{
55
-		$this->db				= $db;
56
-		$this->config			= $config;
57
-		$this->phpbb_log		= $phpbb_log;
55
+		$this->db = $db;
56
+		$this->config = $config;
57
+		$this->phpbb_log = $phpbb_log;
58 58
 		$this->user				= $user;
59
-		$this->notification		= $notification;
59
+		$this->notification = $notification;
60 60
 		$this->link				= $link;
61
-		$this->root_path		= $root_path;
62
-		$this->php_ext			= $php_ext;
61
+		$this->root_path = $root_path;
62
+		$this->php_ext = $php_ext;
63 63
 	}
64 64
 
65 65
 	/**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	public function auto_check($cat_data)
72 72
 	{
73 73
 		$sql = 'SELECT cat_name
74
-			FROM ' . $this->categories_table . '
74
+			FROM ' . $this->categories_table.'
75 75
 			WHERE cat_id = ' . (int) $cat_data['cat_id'];
76 76
 		$result = $this->db->sql_query($sql);
77 77
 		$row = $this->db->sql_fetchrow($result);
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 
84 84
 			$this->_check($cat_data['cat_id'], $cat_data['cat_cron_nb_check'], $next_prune);
85 85
 
86
-			$sql = 'UPDATE ' . $this->categories_table . "
86
+			$sql = 'UPDATE '.$this->categories_table."
87 87
 			SET cat_cron_next = $next_prune
88
-			WHERE cat_id = " . (int) $cat_data['cat_id'];
88
+			WHERE cat_id = ".(int) $cat_data['cat_id'];
89 89
 			$this->db->sql_query($sql);
90 90
 
91 91
 			$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DIR_AUTO_PRUNE', time(), array($row['cat_name']));
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	public function get_cat($cat_id)
104 104
 	{
105 105
 		$sql = 'SELECT cat_id, cat_cron_enable, cat_cron_next, cat_cron_freq, cat_cron_nb_check
106
-				FROM ' . $this->categories_table . '
106
+				FROM ' . $this->categories_table.'
107 107
 					WHERE cat_id = ' . (int) $cat_id;
108 108
 		$result = $this->db->sql_query($sql);
109 109
 		$row = $this->db->sql_fetchrow($result);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 					'ON'	=> 'l.link_user_id = u.user_id'
139 139
 				)
140 140
 			),
141
-			'WHERE'		=> 'l.link_back <> "" AND l.link_active = 1 AND l.link_cat = '  . (int) $cat_id);
141
+			'WHERE'		=> 'l.link_back <> "" AND l.link_active = 1 AND l.link_cat = '.(int) $cat_id);
142 142
 
143 143
 			$sql = $this->db->sql_build_query('SELECT', $sql_array);
144 144
 			$result = $this->db->sql_query($sql);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			{
148 148
 				if ($this->link->validate_link_back($row['link_back'], false, true) !== false)
149 149
 				{
150
-					if (!$nb_check || ($row['link_nb_check']+1) >= $nb_check)
150
+					if (!$nb_check || ($row['link_nb_check'] + 1) >= $nb_check)
151 151
 					{
152 152
 						$del_array[] = $row['link_id'];
153 153
 					}
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	{
182 182
 		if (!class_exists('messenger'))
183 183
 		{
184
-			include($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
184
+			include($this->root_path.'includes/functions_messenger.'.$this->php_ext);
185 185
 		}
186 186
 
187 187
 		$messenger = new \messenger(false);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		// We need to define it, because we use user->format_date below
191 191
 		$this->user->timezone = new \DateTimeZone($this->config['board_timezone']);
192 192
 
193
-		$sql = 'UPDATE ' . $this->links_table . '
193
+		$sql = 'UPDATE '.$this->links_table.'
194 194
 			SET link_nb_check = link_nb_check + 1
195 195
 			WHERE ' . $this->db->sql_in_set('link_id', array_keys($u_array));
196 196
 		$this->db->sql_query($sql);
Please login to merge, or discard this patch.
core/comment.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	*/
29 29
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language)
30 30
 	{
31
-		$this->db		= $db;
32
-		$this->language	= $language;
31
+		$this->db = $db;
32
+		$this->language = $language;
33 33
 	}
34 34
 
35 35
 	/**
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		$this->db->sql_transaction('begin');
44 44
 
45
-		$sql = 'INSERT INTO ' . $this->comments_table . ' ' . $this->db->sql_build_array('INSERT', $data);
45
+		$sql = 'INSERT INTO '.$this->comments_table.' '.$this->db->sql_build_array('INSERT', $data);
46 46
 		$this->db->sql_query($sql);
47 47
 
48
-		$sql = 'UPDATE ' . $this->links_table . '
48
+		$sql = 'UPDATE '.$this->links_table.'
49 49
 			SET link_comment = link_comment + 1
50 50
 			WHERE link_id = ' . (int) $data['comment_link_id'];
51 51
 		$this->db->sql_query($sql);
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	*/
63 63
 	public function edit($data, $comment_id)
64 64
 	{
65
-		$sql = 'UPDATE ' . $this->comments_table . '
66
-			SET ' . $this->db->sql_build_array('UPDATE', $data) . '
65
+		$sql = 'UPDATE '.$this->comments_table.'
66
+			SET ' . $this->db->sql_build_array('UPDATE', $data).'
67 67
 			WHERE comment_id = ' . (int) $comment_id;
68 68
 		$this->db->sql_query($sql);
69 69
 	}
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 
82 82
 		$this->db->sql_transaction('begin');
83 83
 
84
-		$sql = 'DELETE FROM ' . $this->comments_table . ' WHERE comment_id = ' . (int) $comment_id;
84
+		$sql = 'DELETE FROM '.$this->comments_table.' WHERE comment_id = '.(int) $comment_id;
85 85
 		$this->db->sql_query($sql);
86 86
 
87
-		$sql = 'UPDATE ' . $this->links_table . '
87
+		$sql = 'UPDATE '.$this->links_table.'
88 88
 			SET link_comment = link_comment - 1
89 89
 			WHERE link_id = ' . (int) $link_id;
90 90
 		$this->db->sql_query($sql);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		if ($request->is_ajax())
95 95
 		{
96 96
 			$sql = 'SELECT COUNT(comment_id) AS nb_comments
97
-				FROM ' . $this->comments_table . '
97
+				FROM ' . $this->comments_table.'
98 98
 				WHERE comment_link_id = ' . (int) $link_id;
99 99
 			$result = $this->db->sql_query($sql);
100 100
 			$nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 	protected $language;
22 22
 
23 23
 	/**
24
-	* Constructor
25
-	*
26
-	* @param \phpbb\db\driver\driver_interface	$db			Database object
27
-	* @param \phpbb\language\language			$language	Language object
28
-	*/
24
+	 * Constructor
25
+	 *
26
+	 * @param \phpbb\db\driver\driver_interface	$db			Database object
27
+	 * @param \phpbb\language\language			$language	Language object
28
+	 */
29 29
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language)
30 30
 	{
31 31
 		$this->db		= $db;
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	/**
36
-	* Add a comment
37
-	*
38
-	* @param	array	$data	Link's data from db
39
-	* @return	null
40
-	*/
36
+	 * Add a comment
37
+	 *
38
+	 * @param	array	$data	Link's data from db
39
+	 * @return	null
40
+	 */
41 41
 	public function add($data)
42 42
 	{
43 43
 		$this->db->sql_transaction('begin');
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 
56 56
 	/**
57
-	* Edit a comment
58
-	*
59
-	* @param	array	$data		Data to edit
60
-	* @param	int		$comment_id	The comment ID
61
-	* @return	null
62
-	*/
57
+	 * Edit a comment
58
+	 *
59
+	 * @param	array	$data		Data to edit
60
+	 * @param	int		$comment_id	The comment ID
61
+	 * @return	null
62
+	 */
63 63
 	public function edit($data, $comment_id)
64 64
 	{
65 65
 		$sql = 'UPDATE ' . $this->comments_table . '
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	/**
72
-	* Delete a comment
73
-	*
74
-	* @param	string	$link_id	The link ID
75
-	* @param	string	$comment_id	The comment ID
76
-	* @return	null
77
-	*/
72
+	 * Delete a comment
73
+	 *
74
+	 * @param	string	$link_id	The link ID
75
+	 * @param	string	$comment_id	The comment ID
76
+	 * @return	null
77
+	 */
78 78
 	public function del($link_id, $comment_id)
79 79
 	{
80 80
 		global $request;
Please login to merge, or discard this patch.
notification/type/directory_website.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@
 block discarded – undo
122 122
 		$users = array();
123 123
 
124 124
 		$sql = 'SELECT user_id
125
-			FROM ' . $this->watch_table . '
126
-			WHERE cat_id = ' . (int) $data['cat_id'] . '
127
-				AND notify_status = ' . NOTIFY_YES . '
125
+			FROM ' . $this->watch_table.'
126
+			WHERE cat_id = ' . (int) $data['cat_id'].'
127
+				AND notify_status = ' . NOTIFY_YES.'
128 128
 				AND user_id <> ' . (int) $data['user_from'];
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		while ($row = $this->db->sql_fetchrow($result))
Please login to merge, or discard this patch.
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 	protected $watch_table;
25 25
 
26 26
 	/**
27
-	* Set the controller helper
28
-	*
29
-	* @param \phpbb\controller\helper $helper
30
-	* @return null
31
-	*/
27
+	 * Set the controller helper
28
+	 *
29
+	 * @param \phpbb\controller\helper $helper
30
+	 * @return null
31
+	 */
32 32
 	public function set_controller_helper(\phpbb\controller\helper $helper)
33 33
 	{
34 34
 		$this->helper = $helper;
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	/**
49
-	* Get notification type name
50
-	*
51
-	* @return string
52
-	*/
49
+	 * Get notification type name
50
+	 *
51
+	 * @return string
52
+	 */
53 53
 	public function get_type()
54 54
 	{
55 55
 		return 'ernadoo.phpbbdirectory.notification.type.directory_website';
56 56
 	}
57 57
 
58 58
 	/**
59
-	* Notification option data (for outputting to the user)
60
-	*
61
-	* @var bool|array False if the service should use it's default data
62
-	* 					Array of data (including keys 'id', 'lang', and 'group')
63
-	*/
59
+	 * Notification option data (for outputting to the user)
60
+	 *
61
+	 * @var bool|array False if the service should use it's default data
62
+	 * 					Array of data (including keys 'id', 'lang', and 'group')
63
+	 */
64 64
 	public static $notification_option = array(
65 65
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_WEBSITE',
66 66
 		'group'	=> 'NOTIFICATION_DIR_UCP',
@@ -75,31 +75,31 @@  discard block
 block discarded – undo
75 75
 	}
76 76
 
77 77
 	/**
78
-	* Is available
79
-	*
80
-	* @return bool True/False whether or not this is available to the user
81
-	*/
78
+	 * Is available
79
+	 *
80
+	 * @return bool True/False whether or not this is available to the user
81
+	 */
82 82
 	public function is_available()
83 83
 	{
84 84
 		return true;
85 85
 	}
86 86
 
87 87
 	/**
88
-	* Get link id
89
-	*
90
-	* @param array $data The data from the link
91
-	* @return int
92
-	*/
88
+	 * Get link id
89
+	 *
90
+	 * @param array $data The data from the link
91
+	 * @return int
92
+	 */
93 93
 	static public function get_item_id($data)
94 94
 	{
95 95
 		return (int) $data['link_id'];
96 96
 	}
97 97
 
98 98
 	/**
99
-	* Get parent id - it's not used
100
-	*
101
-	* @param array $data The data from the link
102
-	*/
99
+	 * Get parent id - it's not used
100
+	 *
101
+	 * @param array $data The data from the link
102
+	 */
103 103
 	static public function get_item_parent_id($data)
104 104
 	{
105 105
 		// No parent
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
 	}
108 108
 
109 109
 	/**
110
-	* Find the users who want to receive notifications
111
-	*
112
-	* @param	array	$data		Data from submit link
113
-	* @param	array	$options	Options for finding users for notification
114
-	* @return	array
115
-	*/
110
+	 * Find the users who want to receive notifications
111
+	 *
112
+	 * @param	array	$data		Data from submit link
113
+	 * @param	array	$options	Options for finding users for notification
114
+	 * @return	array
115
+	 */
116 116
 	public function find_users_for_notification($data, $options = array())
117 117
 	{
118 118
 		$options = array_merge(array(
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 	}
145 145
 
146 146
 	/**
147
-	* Get the user's avatar
148
-	*/
147
+	 * Get the user's avatar
148
+	 */
149 149
 	public function get_avatar()
150 150
 	{
151 151
 		return $this->user_loader->get_avatar($this->get_data('user_from'), false, true);
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 
154 154
 
155 155
 	/**
156
-	* Get the HTML formatted title of this notification
157
-	*
158
-	* @return string
159
-	*/
156
+	 * Get the HTML formatted title of this notification
157
+	 *
158
+	 * @return string
159
+	 */
160 160
 
161 161
 	public function get_title()
162 162
 	{
@@ -169,20 +169,20 @@  discard block
 block discarded – undo
169 169
 
170 170
 
171 171
 	/**
172
-	* Get email template
173
-	*
174
-	* @return string
175
-	*/
172
+	 * Get email template
173
+	 *
174
+	 * @return string
175
+	 */
176 176
 	public function get_email_template()
177 177
 	{
178 178
 		return '@ernadoo_phpbbdirectory/directory_website';
179 179
 	}
180 180
 
181 181
 	/**
182
-	* Get email template variables
183
-	*
184
-	* @return array
185
-	*/
182
+	 * Get email template variables
183
+	 *
184
+	 * @return array
185
+	 */
186 186
 	public function get_email_template_variables()
187 187
 	{
188 188
 		return array(
@@ -194,33 +194,33 @@  discard block
 block discarded – undo
194 194
 	}
195 195
 
196 196
 	/**
197
-	* Get the url to this item
198
-	*
199
-	* @return string URL
200
-	*/
197
+	 * Get the url to this item
198
+	 *
199
+	 * @return string URL
200
+	 */
201 201
 	public function get_url()
202 202
 	{
203 203
 		return $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $this->get_data('cat_id')));
204 204
 	}
205 205
 
206 206
 	/**
207
-	* Users needed to query before this notification can be displayed
208
-	*
209
-	* @return array Array of user_ids
210
-	*/
207
+	 * Users needed to query before this notification can be displayed
208
+	 *
209
+	 * @return array Array of user_ids
210
+	 */
211 211
 	public function users_to_query()
212 212
 	{
213 213
 		return array($this->get_data('user_from'));
214 214
 	}
215 215
 
216 216
 	/**
217
-	* Function for preparing the data for insertion in an SQL query
218
-	* (The service handles insertion)
219
-	*
220
-	* @param	array	$data				Data from submit link
221
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
222
-	* @return	array						Array of data ready to be inserted into the database
223
-	*/
217
+	 * Function for preparing the data for insertion in an SQL query
218
+	 * (The service handles insertion)
219
+	 *
220
+	 * @param	array	$data				Data from submit link
221
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
222
+	 * @return	array						Array of data ready to be inserted into the database
223
+	 */
224 224
 	public function create_insert_array($data, $pre_create_data = array())
225 225
 	{
226 226
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
textreparser/plugins/cat_description.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 class cat_description extends \phpbb\textreparser\row_based_plugin
14 14
 {
15 15
 	/**
16
-	* {@inheritdoc}
17
-	*/
16
+	 * {@inheritdoc}
17
+	 */
18 18
 	public function get_columns()
19 19
 	{
20 20
 		return array(
Please login to merge, or discard this patch.
textreparser/plugins/link_description.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 class link_description extends \phpbb\textreparser\row_based_plugin
14 14
 {
15 15
 	/**
16
-	* {@inheritdoc}
17
-	*/
16
+	 * {@inheritdoc}
17
+	 */
18 18
 	public function get_columns()
19 19
 	{
20 20
 		return array(
Please login to merge, or discard this patch.
core/helper.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -37,37 +37,37 @@  discard block
 block discarded – undo
37 37
 	private $ext_name = 'ernadoo/phpbbdirectory';
38 38
 
39 39
 	/**
40
-	* Set the extension manager
41
-	*
42
-	* @param \phpbb\extension\manager	$phpbb_extension_manager
43
-	* @return null
44
-	*/
40
+	 * Set the extension manager
41
+	 *
42
+	 * @param \phpbb\extension\manager	$phpbb_extension_manager
43
+	 * @return null
44
+	 */
45 45
 	public function set_extension_manager(\phpbb\extension\manager $phpbb_extension_manager)
46 46
 	{
47 47
 		$this->extension_manager	= $phpbb_extension_manager;
48 48
 	}
49 49
 
50 50
 	/**
51
-	* Set the path helper
52
-	*
53
-	* @param \phpbb\path_helper	$path_helper
54
-	* @return null
55
-	*/
51
+	 * Set the path helper
52
+	 *
53
+	 * @param \phpbb\path_helper	$path_helper
54
+	 * @return null
55
+	 */
56 56
 	public function set_path_helper(\phpbb\path_helper $path_helper)
57 57
 	{
58 58
 		$this->path_helper = $path_helper;
59 59
 	}
60 60
 
61 61
 	/**
62
-	* Set the tables names
63
-	*
64
-	* @param string	$categories_table
65
-	* @param string	$comments_table
66
-	* @param string	$links_table
67
-	* @param string	$votes_table
68
-	* @param string	$watch_table
69
-	* @return null
70
-	*/
62
+	 * Set the tables names
63
+	 *
64
+	 * @param string	$categories_table
65
+	 * @param string	$comments_table
66
+	 * @param string	$links_table
67
+	 * @param string	$votes_table
68
+	 * @param string	$watch_table
69
+	 * @return null
70
+	 */
71 71
 	public function set_tables($categories_table, $comments_table, $links_table, $votes_table, $watch_table)
72 72
 	{
73 73
 		$this->comments_table		= $comments_table;
@@ -77,48 +77,48 @@  discard block
 block discarded – undo
77 77
 		$this->categories_table		= $categories_table;
78 78
 	}
79 79
 	/**
80
-	* Return ext name
81
-	*
82
-	* @param	bool	$web_root_path Whether the path should be relative to web root
83
-	* @return	string					Path to an extension
84
-	*/
80
+	 * Return ext name
81
+	 *
82
+	 * @param	bool	$web_root_path Whether the path should be relative to web root
83
+	 * @return	string					Path to an extension
84
+	 */
85 85
 	public function get_ext_name($web_root_path = false)
86 86
 	{
87 87
 		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name);
88 88
 	}
89 89
 
90 90
 	/**
91
-	* Return path to resource image
92
-	*
93
-	* @param	string $type	is ressource type (flags|icons)
94
-	* @param	string $image	is the resource to display
95
-	* @return	string			The relative path to ressource
96
-	*/
91
+	 * Return path to resource image
92
+	 *
93
+	 * @param	string $type	is ressource type (flags|icons)
94
+	 * @param	string $image	is the resource to display
95
+	 * @return	string			The relative path to ressource
96
+	 */
97 97
 	public function get_img_path($type, $image = '')
98 98
 	{
99 99
 		return $this->get_ext_name(true) . 'images/' . $type . '/' . $image;
100 100
 	}
101 101
 
102 102
 	/**
103
-	* Return path to banner
104
-	*
105
-	* @param	string	$banner	is the physical name
106
-	* @return	string			The relative path to banner
107
-	*/
103
+	 * Return path to banner
104
+	 *
105
+	 * @param	string	$banner	is the physical name
106
+	 * @return	string			The relative path to banner
107
+	 */
108 108
 	public function get_banner_path($banner = '')
109 109
 	{
110 110
 		return 'files/' . $this->get_ext_name() . 'banners/' . $banner;
111 111
 	}
112 112
 
113 113
 	/**
114
-	* Return array entries that match the pattern
115
-	*
116
-	* @link http://php.net/manual/fr/function.preg-grep.php#95787
117
-	*
118
-	* @param 	string	$pattern	The pattern to search for
119
-	* @param	array	$input		The input array
120
-	* @return	array	$vals		Returns an array indexed using the keys from the input array
121
-	*/
114
+	 * Return array entries that match the pattern
115
+	 *
116
+	 * @link http://php.net/manual/fr/function.preg-grep.php#95787
117
+	 *
118
+	 * @param 	string	$pattern	The pattern to search for
119
+	 * @param	array	$input		The input array
120
+	 * @return	array	$vals		Returns an array indexed using the keys from the input array
121
+	 */
122 122
 	public function preg_grep_keys($pattern, $input)
123 123
 	{
124 124
 		$keys = preg_grep($pattern, array_keys($input));
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	*/
45 45
 	public function set_extension_manager(\phpbb\extension\manager $phpbb_extension_manager)
46 46
 	{
47
-		$this->extension_manager	= $phpbb_extension_manager;
47
+		$this->extension_manager = $phpbb_extension_manager;
48 48
 	}
49 49
 
50 50
 	/**
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 	*/
71 71
 	public function set_tables($categories_table, $comments_table, $links_table, $votes_table, $watch_table)
72 72
 	{
73
-		$this->comments_table		= $comments_table;
73
+		$this->comments_table = $comments_table;
74 74
 		$this->links_table			= $links_table;
75 75
 		$this->votes_table			= $votes_table;
76 76
 		$this->watch_table			= $watch_table;
77
-		$this->categories_table		= $categories_table;
77
+		$this->categories_table = $categories_table;
78 78
 	}
79 79
 	/**
80 80
 	* Return ext name
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	public function get_ext_name($web_root_path = false)
86 86
 	{
87
-		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name);
87
+		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '').$this->extension_manager->get_extension_path($this->ext_name);
88 88
 	}
89 89
 
90 90
 	/**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	*/
97 97
 	public function get_img_path($type, $image = '')
98 98
 	{
99
-		return $this->get_ext_name(true) . 'images/' . $type . '/' . $image;
99
+		return $this->get_ext_name(true).'images/'.$type.'/'.$image;
100 100
 	}
101 101
 
102 102
 	/**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	*/
108 108
 	public function get_banner_path($banner = '')
109 109
 	{
110
-		return 'files/' . $this->get_ext_name() . 'banners/' . $banner;
110
+		return 'files/'.$this->get_ext_name().'banners/'.$banner;
111 111
 	}
112 112
 
113 113
 	/**
Please login to merge, or discard this patch.