Fixed Doxygen warnings
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 2 Jun 2008 17:50:59 +0000 (17:50 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 2 Jun 2008 17:50:59 +0000 (17:50 +0000)
includes/SpecialUserrights.php
includes/SpecialWantedpages.php
includes/SpecialWhatlinkshere.php
includes/UserRightsProxy.php
includes/WebRequest.php
includes/ZhClient.php
includes/normal/UtfNormal.php

index 1873b48..bf4d440 100644 (file)
@@ -38,7 +38,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 mixed $par String if any subpage provided, else null
+        * @param $par Mixed: string if any subpage provided, else null
         */
        function execute( $par ) {
                // If the visitor doesn't have permissions to assign or remove
@@ -111,8 +111,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 $username String: username to apply changes to.
+        * @param $reason String: reason for group change
         * @return null
         */
        function saveUserGroups( $username, $reason = '') {
@@ -205,7 +205,7 @@ class UserrightsPage extends SpecialPage {
 
        /**
         * Edit user groups membership
-        * @param string $username Name of the user.
+        * @param $username String: name of the user.
         */
        function editUserGroupsForm( $username ) {
                global $wgOut;
@@ -383,7 +383,7 @@ class UserrightsPage extends SpecialPage {
        /**
         * Format a link to a group description page
         *
-        * @param string $group
+        * @param $group string
         * @return string
         */
        private static function buildGroupLink( $group ) {
@@ -402,11 +402,10 @@ class UserrightsPage extends SpecialPage {
         }
 
        /**
-        * Adds the <select> thingie where you can select what groups to add/remove
+        * Adds a table with checkboxes where you can select what groups to add/remove
         *
-        * @param array  $groups The groups that can be added/removed
-        * @param string $name   'removable' or 'available'
-        * @return string XHTML <select> element
+        * @param $usergroups Array: groups the user belongs to
+        * @return string XHTML table element with checkboxes
         */
        private function groupCheckboxes( $usergroups ) {
                $allgroups = $this->getAllGroups();
@@ -476,7 +475,7 @@ class UserrightsPage extends SpecialPage {
        }
 
        /**
-        * @param  string $group The name of the group to check
+        * @param  $group String: the name of the group to check
         * @return bool Can we remove the group?
         */
        private function canRemove( $group ) {
@@ -487,7 +486,7 @@ class UserrightsPage extends SpecialPage {
        }
 
        /**
-        * @param  string $group The name of the group to check
+        * @param $group string: the name of the group to check
         * @return bool Can we add the group?
         */
        private function canAdd( $group ) {
@@ -538,7 +537,7 @@ class UserrightsPage extends SpecialPage {
        /**
         * Returns an array of the groups that a particular group can add/remove.
         *
-        * @param String $group The group to check for whether it can add/remove
+        * @param $group String: the group to check for whether it can add/remove
         * @return Array array( 'add' => array( addablegroups ), 'remove' => array( removablegroups ) )
         */
        private function changeableByGroup( $group ) {
@@ -567,8 +566,8 @@ class UserrightsPage extends SpecialPage {
        /**
         * Show a rights log fragment for the specified user
         *
-        * @param User $user User to show log for
-        * @param OutputPage $output OutputPage to use
+        * @param $user User to show log for
+        * @param $output OutputPage to use
         */
        protected function showLogFragment( $user, $output ) {
                $output->addHtml( Xml::element( 'h2', null, LogPage::logName( 'rights' ) . "\n" ) );
index c14cce1..650e04f 100644 (file)
@@ -66,8 +66,8 @@ class WantedPagesPage extends QueryPage {
        /**
         * Format an individual result
         *
-        * @param Skin $skin Skin to use for UI elements
-        * @param object $result Result row
+        * @param $skin Skin to use for UI elements
+        * @param $result Result row
         * @return string
         */
        public function formatResult( $skin, $result ) {
@@ -90,9 +90,9 @@ class WantedPagesPage extends QueryPage {
        /**
         * Make a "what links here" link for a specified result if required
         *
-        * @param Title $title Title to make the link for
-        * @param Skin $skin Skin to use
-        * @param object $result Result row
+        * @param $title Title to make the link for
+        * @param $skin Skin to use
+        * @param $result Result row
         * @return string
         */
        private function makeWlhLink( $title, $skin, $result ) {
index 2c52036..a57df5e 100644 (file)
@@ -83,11 +83,11 @@ class WhatLinksHerePage {
        }
 
        /**
-        * @param int       $level      Recursion level
-        * @param Title     $target     Target title
-        * @param int       $limit      Number of entries to display
-        * @param Title     $from       Display from this article ID
-        * @param Title     $back       Display from this article ID at backwards scrolling
+        * @param $level  int     Recursion level
+        * @param $target Title   Target title
+        * @param $limit  int     Number of entries to display
+        * @param $from   Title   Display from this article ID
+        * @param $back   Title   Display from this article ID at backwards scrolling
         * @private
         */
        function showIndirectLinks( $level, $target, $limit, $from = 0, $back = 0 ) {
index f4bce5e..8a65a01 100644 (file)
@@ -62,7 +62,7 @@ class UserRightsProxy {
        /**
         * Open a database connection to work on for the requested user.
         * This may be a new connection to another database for remote users.
-        * @param string $database
+        * @param $database string
         * @return Database or null if invalid selection
         */
        public static function getDB( $database ) {
index 6664d03..3fce584 100644 (file)
@@ -130,10 +130,10 @@ class WebRequest {
         * Internal URL rewriting function; tries to extract page title and,
         * optionally, one other fixed parameter value from a URL path.
         *
-        * @param string $path the URL path given from the client
-        * @param array $bases one or more URLs, optionally with $1 at the end
-        * @param string $key if provided, the matching key in $bases will be
-        *        passed on as the value of this URL parameter
+        * @param $path string: the URL path given from the client
+        * @param $bases array: one or more URLs, optionally with $1 at the end
+        * @param $key string: if provided, the matching key in $bases will be
+        *             passed on as the value of this URL parameter
         * @return array of URL variables to interpolate; empty if no match
         */
        private function extractTitle( $path, $bases, $key=false ) {
@@ -158,7 +158,7 @@ class WebRequest {
        /**
         * Recursively strips slashes from the given array;
         * used for undoing the evil that is magic_quotes_gpc.
-        * @param array &$arr will be modified
+        * @param $arr array: will be modified
         * @return array the original array
         * @private
         */
@@ -193,7 +193,7 @@ class WebRequest {
 
        /**
         * Recursively normalizes UTF-8 strings in the given array.
-        * @param array $data string or array
+        * @param $data string or array
         * @return cleaned-up version of the given
         * @private
         */
@@ -211,9 +211,9 @@ class WebRequest {
        /**
         * Fetch a value from the given array or return $default if it's not set.
         *
-        * @param array $arr
-        * @param string $name
-        * @param mixed $default
+        * @param $arr array
+        * @param $name string
+        * @param $default mixed
         * @return mixed
         * @private
         */
@@ -240,8 +240,8 @@ class WebRequest {
         * non-freeform text inputs (e.g. predefined internal text keys
         * selected by a drop-down menu). For freeform input, see getText().
         *
-        * @param string $name
-        * @param string $default optional default (or NULL)
+        * @param $name string
+        * @param $default string: optional default (or NULL)
         * @return string
         */
        function getVal( $name, $default = NULL ) {
@@ -261,8 +261,8 @@ class WebRequest {
         * If source was scalar, will return an array with a single element.
         * If no source and no default, returns NULL.
         *
-        * @param string $name
-        * @param array $default optional default (or NULL)
+        * @param $name string
+        * @param $default array: optional default (or NULL)
         * @return array
         */
        function getArray( $name, $default = NULL ) {
@@ -280,8 +280,8 @@ class WebRequest {
         * If no source and no default, returns NULL.
         * If an array is returned, contents are guaranteed to be integers.
         *
-        * @param string $name
-        * @param array $default option default (or NULL)
+        * @param $name string
+        * @param $default array: option default (or NULL)
         * @return array of ints
         */
        function getIntArray( $name, $default = NULL ) {
@@ -296,8 +296,8 @@ class WebRequest {
         * Fetch an integer value from the input or return $default if not set.
         * Guaranteed to return an integer; non-numeric input will typically
         * return 0.
-        * @param string $name
-        * @param int $default
+        * @param $name string
+        * @param $default int
         * @return int
         */
        function getInt( $name, $default = 0 ) {
@@ -308,7 +308,7 @@ class WebRequest {
         * Fetch an integer value from the input or return null if empty.
         * Guaranteed to return an integer or null; non-numeric input will
         * typically return null.
-        * @param string $name
+        * @param $name string
         * @return int
         */
        function getIntOrNull( $name ) {
@@ -322,8 +322,8 @@ class WebRequest {
         * Fetch a boolean value from the input or return $default if not set.
         * Guaranteed to return true or false, with normal PHP semantics for
         * boolean interpretation of strings.
-        * @param string $name
-        * @param bool $default
+        * @param $name string
+        * @param $default bool
         * @return bool
         */
        function getBool( $name, $default = false ) {
@@ -334,7 +334,7 @@ class WebRequest {
         * Return true if the named value is set in the input, whatever that
         * value is (even "0"). Return false if the named value is not set.
         * Example use is checking for the presence of check boxes in forms.
-        * @param string $name
+        * @param $name string
         * @return bool
         */
        function getCheck( $name ) {
@@ -352,8 +352,8 @@ class WebRequest {
         * input (for which input transformations may be required - e.g. Esperanto
         * x-coding).
         *
-        * @param string $name
-        * @param string $default optional
+        * @param $name string
+        * @param $default string: optional
         * @return string
         */
        function getText( $name, $default = '' ) {
@@ -497,6 +497,8 @@ class WebRequest {
        /**
         * Appends or replaces value of query variables.
         * @param $array Array of values to replace/add to query
+        * @param $onlyquery Bool: whether to only return the query string and not
+        *                   the complete URL
         * @return string
         */
        function appendQueryArray( $array, $onlyquery = false ) {
@@ -609,7 +611,7 @@ class WebRequest {
 
        /**
         * Get a request header, or false if it isn't set
-        * @param string $name Case-insensitive header name
+        * @param $name String: case-insensitive header name
         */
        function getHeader( $name ) {
                $name = strtoupper( $name );
@@ -644,9 +646,9 @@ class FauxRequest extends WebRequest {
        var $wasPosted = false;
 
        /**
-        * @param array $data Array of *non*-urlencoded key => value pairs, the
+        * @param $data Array of *non*-urlencoded key => value pairs, the
         *   fake GET/POST values
-        * @param bool $wasPosted Whether to treat the data as POST
+        * @param $wasPosted Bool: whether to treat the data as POST
         */
        function FauxRequest( $data, $wasPosted = false ) {
                if( is_array( $data ) ) {
index bf2d393..61faa8d 100644 (file)
@@ -20,8 +20,6 @@ class ZhClient {
 
        /**
         * Check if connection to zhdaemon is successful
-        *
-        * @access public
         */
        function isconnected() {
                return $this->mConnected;
@@ -78,10 +76,9 @@ class ZhClient {
        /**
         * Convert the input to a different language variant
         *
-        * @param string $text input text
-        * @param string $tolang language variant
+        * @param $text string: input text
+        * @param $tolang string: language variant
         * @return string the converted text
-        * @access public
         */
        function convert($text, $tolang) {
                $len = strlen($text);
@@ -95,9 +92,8 @@ class ZhClient {
        /**
         * Convert the input to all possible variants
         *
-        * @param string $text input text
+        * @param $text string: input text
         * @return array langcode => converted_string
-        * @access public
         */
        function convertToAllVariants($text) {
                $len = strlen($text);
@@ -119,9 +115,8 @@ class ZhClient {
        /**
         * Perform word segmentation
         *
-        * @param string $text input text
+        * @param $text string: input text
         * @return string segmented text
-        * @access public
         */
        function segment($text) {
                $len = strlen($text);
@@ -135,8 +130,6 @@ class ZhClient {
 
        /**
         * Close the connection
-        *
-        * @access public
         */
        function close() {
                fclose($this->mFP);
index ed3c254..4f8b129 100644 (file)
@@ -68,9 +68,8 @@ class UtfNormal {
         * Fast return for pure ASCII strings; some lesser optimizations for
         * strings containing only known-good characters. Not as fast as toNFC().
         *
-        * @param string $string a UTF-8 string
+        * @param $string String: a UTF-8 string
         * @return string a clean, shiny, normalized UTF-8 string
-        * @static
         */
        static function cleanUp( $string ) {
                if( NORMALIZE_ICU ) {
@@ -98,9 +97,8 @@ class UtfNormal {
         * Fast return for pure ASCII strings; some lesser optimizations for
         * strings containing only known-good characters.
         *
-        * @param string $string a valid UTF-8 string. Input is not validated.
+        * @param $string String: a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form C
-        * @static
         */
        static function toNFC( $string ) {
                if( NORMALIZE_ICU )
@@ -115,9 +113,8 @@ class UtfNormal {
         * Convert a UTF-8 string to normal form D, canonical decomposition.
         * Fast return for pure ASCII strings.
         *
-        * @param string $string a valid UTF-8 string. Input is not validated.
+        * @param $string String: a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form D
-        * @static
         */
        static function toNFD( $string ) {
                if( NORMALIZE_ICU )
@@ -133,9 +130,8 @@ class UtfNormal {
         * This may cause irreversible information loss, use judiciously.
         * Fast return for pure ASCII strings.
         *
-        * @param string $string a valid UTF-8 string. Input is not validated.
+        * @param $string String: a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form KC
-        * @static
         */
        static function toNFKC( $string ) {
                if( NORMALIZE_ICU )
@@ -151,9 +147,8 @@ class UtfNormal {
         * This may cause irreversible information loss, use judiciously.
         * Fast return for pure ASCII strings.
         *
-        * @param string $string a valid UTF-8 string. Input is not validated.
+        * @param $string String: a valid UTF-8 string. Input is not validated.
         * @return string a UTF-8 string in normal form KD
-        * @static
         */
        static function toNFKD( $string ) {
                if( NORMALIZE_ICU )
@@ -167,7 +162,6 @@ class UtfNormal {
        /**
         * Load the basic composition data if necessary
         * @private
-        * @static
         */
        static function loadData() {
                global $utfCombiningClass;
@@ -179,9 +173,8 @@ class UtfNormal {
        /**
         * Returns true if the string is _definitely_ in NFC.
         * Returns false if not or uncertain.
-        * @param string $string a valid UTF-8 string. Input is not validated.
+        * @param $string String: a valid UTF-8 string. Input is not validated.
         * @return bool
-        * @static
         */
        static function quickIsNFC( $string ) {
                # ASCII is always valid NFC!
@@ -221,8 +214,7 @@ class UtfNormal {
        /**
         * Returns true if the string is _definitely_ in NFC.
         * Returns false if not or uncertain.
-        * @param string $string a UTF-8 string, altered on output to be valid UTF-8 safe for XML.
-        * @static
+        * @param $string String: a UTF-8 string, altered on output to be valid UTF-8 safe for XML.
         */
        static function quickIsNFCVerify( &$string ) {
                # Screen out some characters that eg won't be allowed in XML
@@ -439,20 +431,18 @@ class UtfNormal {
        # checking for validity or any optimization etc. Input must be
        # VALID UTF-8!
        /**
-        * @param string $string
+        * @param $string string
         * @return string
         * @private
-        * @static
         */
        static function NFC( $string ) {
                return UtfNormal::fastCompose( UtfNormal::NFD( $string ) );
        }
 
        /**
-        * @param string $string
+        * @param $string string
         * @return string
         * @private
-        * @static
         */
        static function NFD( $string ) {
                UtfNormal::loadData();
@@ -462,20 +452,18 @@ class UtfNormal {
        }
 
        /**
-        * @param string $string
+        * @param $string string
         * @return string
         * @private
-        * @static
         */
        static function NFKC( $string ) {
                return UtfNormal::fastCompose( UtfNormal::NFKD( $string ) );
        }
 
        /**
-        * @param string $string
+        * @param $string string
         * @return string
         * @private
-        * @static
         */
        static function NFKD( $string ) {
                global $utfCompatibilityDecomp;
@@ -492,10 +480,9 @@ class UtfNormal {
         * (depending on which decomposition map is passed to us).
         * Input is assumed to be *valid* UTF-8. Invalid code will break.
         * @private
-        * @param string $string Valid UTF-8 string
-        * @param array $map hash of expanded decomposition map
+        * @param $string String: valid UTF-8 string
+        * @param $map Array: hash of expanded decomposition map
         * @return string a UTF-8 string decomposed, not yet normalized (needs sorting)
-        * @static
         */
        static function fastDecompose( $string, $map ) {
                UtfNormal::loadData();
@@ -554,9 +541,8 @@ class UtfNormal {
         * Sorts combining characters into canonical order. This is the
         * final step in creating decomposed normal forms D and KD.
         * @private
-        * @param string $string a valid, decomposed UTF-8 string. Input is not validated.
+        * @param $string String: a valid, decomposed UTF-8 string. Input is not validated.
         * @return string a UTF-8 string with combining characters sorted in canonical order
-        * @static
         */
        static function fastCombiningSort( $string ) {
                UtfNormal::loadData();
@@ -608,9 +594,8 @@ class UtfNormal {
         * Produces canonically composed sequences, i.e. normal form C or KC.
         *
         * @private
-        * @param string $string a valid UTF-8 string in sorted normal form D or KD. Input is not validated.
+        * @param $string String: a valid UTF-8 string in sorted normal form D or KD. Input is not validated.
         * @return string a UTF-8 string with canonical precomposed characters used where possible
-        * @static
         */
        static function fastCompose( $string ) {
                UtfNormal::loadData();
@@ -741,9 +726,8 @@ class UtfNormal {
        /**
         * This is just used for the benchmark, comparing how long it takes to
         * interate through a string without really doing anything of substance.
-        * @param string $string
+        * @param $string string
         * @return string
-        * @static
         */
        static function placebo( $string ) {
                $len = strlen( $string );