Cleanup some docs (includes/[s-z])
[lhc/web/wiklou.git] / includes / specials / SpecialUserrights.php
index f8e5c84..0ec85ba 100644 (file)
@@ -67,7 +67,7 @@ class UserrightsPage extends SpecialPage {
         * Manage forms to be shown according to posted data.
         * Depending on the submit button used, call a form or a save function.
         *
-        * @param $par Mixed: string if any subpage provided, else null
+        * @param string|null $par String if any subpage provided, else null
         * @throws UserBlockedError|PermissionsError
         */
        public function execute( $par ) {
@@ -190,8 +190,8 @@ class UserrightsPage extends SpecialPage {
         * Save user groups changes in the database.
         * Data comes from the editUserGroupsForm() form function
         *
-        * @param string $username username to apply changes to.
-        * @param string $reason reason for group change
+        * @param string $username Username to apply changes to.
+        * @param string $reason Reason for group change
         * @param User|UserRightsProxy $user Target user object.
         * @return null
         */
@@ -218,11 +218,11 @@ class UserrightsPage extends SpecialPage {
        /**
         * Save user groups changes in the database.
         *
-        * @param $user User object
-        * @param array $add of groups to add
-        * @param array $remove of groups to remove
-        * @param string $reason reason for group change
-        * @return Array: Tuple of added, then removed groups
+        * @param User $user
+        * @param array $add Array of groups to add
+        * @param array $remove Array of groups to remove
+        * @param string $reason Reason for group change
+        * @return array Tuple of added, then removed groups
         */
        function doSaveUserGroups( $user, $add, $remove, $reason = '' ) {
                global $wgAuth;
@@ -278,6 +278,10 @@ class UserrightsPage extends SpecialPage {
 
        /**
         * Add a rights log entry for an action.
+        * @param User $user
+        * @param array $oldGroups
+        * @param array $newGroups
+        * @param array $reason
         */
        function addLogEntry( $user, $oldGroups, $newGroups, $reason ) {
                $logEntry = new ManualLogEntry( 'rights', 'rights' );
@@ -294,7 +298,7 @@ class UserrightsPage extends SpecialPage {
 
        /**
         * Edit user groups membership
-        * @param string $username name of the user.
+        * @param string $username Name of the user.
         */
        function editUserGroupsForm( $username ) {
                $status = $this->fetchUser( $username );
@@ -321,7 +325,7 @@ class UserrightsPage extends SpecialPage {
         *
         * Side effects: error output for invalid access
         * @param string $username
-        * @return Status object
+        * @return Status
         */
        public function fetchUser( $username ) {
                global $wgUserrightsInterwikiDelimiter;
@@ -395,8 +399,8 @@ class UserrightsPage extends SpecialPage {
        /**
         * Make a list of group names to be stored as parameter for log entries
         *
-        * @deprecated in 1.21; use LogFormatter instead.
-        * @param $ids array
+        * @deprecated since 1.21; use LogFormatter instead.
+        * @param array $ids
         * @return string
         */
        function makeGroupNameListForLog( $ids ) {
@@ -445,8 +449,8 @@ class UserrightsPage extends SpecialPage {
         * form will be able to manipulate based on the current user's system
         * permissions.
         *
-        * @param array $groups list of groups the given user is in
-        * @return Array:  Tuple of addable, then removable groups
+        * @param array $groups List of groups the given user is in
+        * @return array Tuple of addable, then removable groups
         */
        protected function splitGroups( $groups ) {
                list( $addable, $removable, $addself, $removeself ) = array_values( $this->changeableGroups() );
@@ -466,8 +470,8 @@ class UserrightsPage extends SpecialPage {
        /**
         * Show the form to edit group memberships.
         *
-        * @param $user      User or UserRightsProxy you're editing
-        * @param $groups    Array:  Array of groups the user is in
+        * @param User|UserRightsProxy $user User or UserRightsProxy you're editing
+        * @param array $groups Array of groups the user is in
         */
        protected function showEditUserGroupsForm( $user, $groups ) {
                $list = array();
@@ -543,7 +547,7 @@ class UserrightsPage extends SpecialPage {
                                ->rawParams( $userToolLinks )->parse() .
                        $this->msg( 'userrights-groups-help', $user->getName() )->parse() .
                        $grouplist .
-                       Xml::tags( 'p', null, $this->groupCheckboxes( $groups, $user ) ) .
+                       $this->groupCheckboxes( $groups, $user ) .
                        Xml::openElement( 'table', array( 'id' => 'mw-userrights-table-outer' ) ) .
                                "<tr>
                                        <td class='mw-label'>" .
@@ -572,7 +576,7 @@ class UserrightsPage extends SpecialPage {
        /**
         * Format a link to a group description page
         *
-        * @param $group string
+        * @param string $group
         * @return string
         */
        private static function buildGroupLink( $group ) {
@@ -582,7 +586,7 @@ class UserrightsPage extends SpecialPage {
        /**
         * Format a link to a group member description page
         *
-        * @param $group string
+        * @param string $group
         * @return string
         */
        private static function buildGroupMemberLink( $group ) {
@@ -601,8 +605,8 @@ class UserrightsPage extends SpecialPage {
         * Adds a table with checkboxes where you can select what groups to add/remove
         *
         * @todo Just pass the username string?
-        * @param array $usergroups groups the user belongs to
-        * @param $user User a user object
+        * @param array $usergroups Groups the user belongs to
+        * @param User $user
         * @return string XHTML table element with checkboxes
         */
        private function groupCheckboxes( $usergroups, $user ) {
@@ -682,7 +686,7 @@ class UserrightsPage extends SpecialPage {
        }
 
        /**
-        * @param $group String: the name of the group to check
+        * @param string $group The name of the group to check
         * @return bool Can we remove the group?
         */
        private function canRemove( $group ) {
@@ -696,7 +700,7 @@ class UserrightsPage extends SpecialPage {
        }
 
        /**
-        * @param string $group the name of the group to check
+        * @param string $group The name of the group to check
         * @return bool Can we add the group?
         */
        private function canAdd( $group ) {
@@ -711,7 +715,7 @@ class UserrightsPage extends SpecialPage {
        /**
         * Returns $this->getUser()->changeableGroups()
         *
-        * @return array array(
+        * @return array Array(
         *   'add' => array( addablegroups ),
         *   'remove' => array( removablegroups ),
         *   'add-self' => array( addablegroups to self ),
@@ -725,8 +729,8 @@ class UserrightsPage extends SpecialPage {
        /**
         * Show a rights log fragment for the specified user
         *
-        * @param $user User to show log for
-        * @param $output OutputPage to use
+        * @param User $user User to show log for
+        * @param OutputPage $output OutputPage to use
         */
        protected function showLogFragment( $user, $output ) {
                $rightsLogPage = new LogPage( 'rights' );