aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/groupposition/legend.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/groupposition/legend.php')
-rw-r--r--phpBB/phpbb/groupposition/legend.php36
1 files changed, 17 insertions, 19 deletions
diff --git a/phpBB/phpbb/groupposition/legend.php b/phpBB/phpbb/groupposition/legend.php
index 47ba06c006..efea3389d4 100644
--- a/phpBB/phpbb/groupposition/legend.php
+++ b/phpBB/phpbb/groupposition/legend.php
@@ -1,9 +1,13 @@
<?php
/**
*
-* @package phpBB3
-* @copyright (c) 2012 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
*
*/
@@ -14,8 +18,6 @@ namespace phpbb\groupposition;
*
* group_legend is an ascending list 1, 2, ..., n for groups which are displayed. 1 is the first group, n the last.
* If the value is 0 (self::GROUP_DISABLED) the group is not displayed.
-*
-* @package phpBB3
*/
class legend implements \phpbb\groupposition\groupposition_interface
{
@@ -26,7 +28,7 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Database object
- * @var \phpbb\db\driver\driver
+ * @var \phpbb\db\driver\driver_interface
*/
protected $db;
@@ -39,10 +41,10 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Constructor
*
- * @param \phpbb\db\driver\driver $db Database object
+ * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object
*/
- public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user)
+ public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $user)
{
$this->db = $db;
$this->user = $user;
@@ -51,7 +53,9 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Returns the group_legend for a given group, if the group exists.
*
- * {@inheritDoc}
+ * @param int $group_id group_id of the group to be selected
+ * @return int position of the group
+ * @throws \phpbb\groupposition\exception
*/
public function get_group_value($group_id)
{
@@ -74,7 +78,7 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Get number of groups, displayed on the legend
*
- * {@inheritDoc}
+ * @return int value of the last item displayed
*/
public function get_group_count()
{
@@ -89,8 +93,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Adds a group by group_id
- *
* {@inheritDoc}
*/
public function add_group($group_id)
@@ -116,7 +118,9 @@ class legend implements \phpbb\groupposition\groupposition_interface
/**
* Deletes a group by setting the field to self::GROUP_DISABLED and closing the gap in the list.
*
- * {@inheritDoc}
+ * @param int $group_id group_id of the group to be deleted
+ * @param bool $skip_group Skip setting the value for this group, to save the query, when you need to update it anyway.
+ * @return bool True if the group was deleted successfully
*/
public function delete_group($group_id, $skip_group = false)
{
@@ -148,8 +152,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group up by group_id
- *
* {@inheritDoc}
*/
public function move_up($group_id)
@@ -158,8 +160,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group down by group_id
- *
* {@inheritDoc}
*/
public function move_down($group_id)
@@ -168,8 +168,6 @@ class legend implements \phpbb\groupposition\groupposition_interface
}
/**
- * Moves a group up/down
- *
* {@inheritDoc}
*/
public function move($group_id, $delta)