Fix some doxygen warnings
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 22 May 2008 19:48:26 +0000 (19:48 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 22 May 2008 19:48:26 +0000 (19:48 +0000)
includes/BagOStuff.php
includes/Export.php
includes/SpecialImport.php
includes/WatchedItem.php
includes/WatchlistEditor.php
includes/WikiError.php

index 15b8838..b4fefc9 100644 (file)
@@ -226,7 +226,7 @@ abstract class SqlBagOStuff extends BagOStuff {
        /**
         * Constructor
         *
-        * @param string $tablename name of the table to use
+        * @param $tablename String: name of the table to use
         */
        function __construct($tablename = 'objectcache') {
                $this->table = $tablename;
@@ -386,7 +386,7 @@ abstract class SqlBagOStuff extends BagOStuff {
         * On typical message and page data, this can provide a 3X decrease
         * in storage requirements.
         *
-        * @param mixed $data
+        * @param $data mixed
         * @return string
         */
        function _serialize( &$data ) {
@@ -400,7 +400,7 @@ abstract class SqlBagOStuff extends BagOStuff {
 
        /**
         * Unserialize and, if necessary, decompress an object.
-        * @param string $serial
+        * @param $serial string
         * @return mixed
         */
        function _unserialize( $serial ) {
@@ -600,7 +600,7 @@ class XCacheBagOStuff extends BagOStuff {
        /**
         * Get a value from the XCache object cache
         *
-        * @param string $key Cache key
+        * @param $key String: cache key
         * @return mixed
         */
        public function get( $key ) {
@@ -613,9 +613,9 @@ class XCacheBagOStuff extends BagOStuff {
        /**
         * Store a value in the XCache object cache
         *
-        * @param string $key Cache key
-        * @param mixed $value Object to store
-        * @param int $expire Expiration time
+        * @param $key String: cache key
+        * @param $value Mixed: object to store
+        * @param $expire Int: expiration time
         * @return bool
         */
        public function set( $key, $value, $expire = 0 ) {
@@ -626,8 +626,8 @@ class XCacheBagOStuff extends BagOStuff {
        /**
         * Remove a value from the XCache object cache
         *
-        * @param string $key Cache key
-        * @param int $time Not used in this implementation
+        * @param $key String: cache key
+        * @param $time Int: not used in this implementation
         * @return bool
         */
        public function delete( $key, $time = 0 ) {
index 262ad7e..7d0a824 100644 (file)
@@ -46,13 +46,13 @@ class WikiExporter {
         * make additional queries to pull source data while the
         * main query is still running.
         *
-        * @param Database $db
-        * @param mixed $history one of WikiExporter::FULL or WikiExporter::CURRENT, or an
-        *                       associative array:
-        *                         offset: non-inclusive offset at which to start the query
-        *                         limit: maximum number of rows to return
-        *                         dir: "asc" or "desc" timestamp order
-        * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM
+        * @param $db Database
+        * @param $history Mixed: one of WikiExporter::FULL or WikiExporter::CURRENT,
+        *                 or an associative array:
+        *                   offset: non-inclusive offset at which to start the query
+        *                   limit: maximum number of rows to return
+        *                   dir: "asc" or "desc" timestamp order
+        * @param $buffer Int: one of WikiExporter::BUFFER or WikiExporter::STREAM
         */
        function __construct( &$db, $history = WikiExporter::CURRENT,
                        $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
@@ -69,7 +69,7 @@ class WikiExporter {
         * various row objects and XML output for filtering. Filters
         * can be chained or used as callbacks.
         *
-        * @param mixed $callback
+        * @param $sink mixed
         */
        function setOutputSink( &$sink ) {
                $this->sink =& $sink;
@@ -97,8 +97,8 @@ class WikiExporter {
        /**
         * Dumps a series of page and revision records for those pages
         * in the database falling within the page_id range given.
-        * @param int $start Inclusive lower limit (this id is included)
-        * @param int $end   Exclusive upper limit (this id is not included)
+        * @param $start Int: inclusive lower limit (this id is included)
+        * @param $end   Int: Exclusive upper limit (this id is not included)
         *                   If 0, no upper limit.
         */
        function pagesByRange( $start, $end ) {
@@ -110,7 +110,7 @@ class WikiExporter {
        }
 
        /**
-        * @param Title $title
+        * @param $title Title
         */
        function pageByTitle( $title ) {
                return $this->dumpFrom(
@@ -257,7 +257,7 @@ class WikiExporter {
         * separate database connection not managed by LoadBalancer; some
         * blob storage types will make queries to pull source data.
         *
-        * @param ResultWrapper $resultset
+        * @param $resultset ResultWrapper
         * @access private
         */
        function outputStream( $resultset ) {
@@ -388,7 +388,7 @@ class XmlDumpWriter {
         * Opens a <page> section on the output stream, with data
         * from the given database row.
         *
-        * @param object $row
+        * @param $row object
         * @return string
         * @access private
         */
@@ -417,7 +417,7 @@ class XmlDumpWriter {
         * Dumps a <revision> section on the output stream, with
         * data filled in from the given database row.
         *
-        * @param object $row
+        * @param $row object
         * @return string
         * @access private
         */
index 862b3e1..9e104fa 100644 (file)
@@ -593,8 +593,8 @@ class WikiImporter {
 
        /**
         * Sets the action to perform as each new page in the stream is reached.
-        * @param callable $callback
-        * @return callable
+        * @param $callback callback
+        * @return callback
         */
        function setPageCallback( $callback ) {
                $previous = $this->mPageCallback;
@@ -608,8 +608,8 @@ class WikiImporter {
         * with the original title form (in case it's been overridden into a
         * local namespace), and a count of revisions.
         *
-        * @param callable $callback
-        * @return callable
+        * @param $callback callback
+        * @return callback
         */
        function setPageOutCallback( $callback ) {
                $previous = $this->mPageOutCallback;
@@ -619,8 +619,8 @@ class WikiImporter {
 
        /**
         * Sets the action to perform as each page revision is reached.
-        * @param callable $callback
-        * @return callable
+        * @param $callback callback
+        * @return callback
         */
        function setRevisionCallback( $callback ) {
                $previous = $this->mRevisionCallback;
@@ -630,8 +630,8 @@ class WikiImporter {
 
        /**
         * Sets the action to perform as each file upload version is reached.
-        * @param callable callback
-        * @return callable
+        * @param $callback callback
+        * @return callback
         */
        function setUploadCallback( $callback ) {
                $previous = $this->mUploadCallback;
@@ -656,7 +656,7 @@ class WikiImporter {
 
        /**
         * Default per-revision callback, performs the import.
-        * @param WikiRevision $revision
+        * @param $revision WikiRevision
         * @private
         */
        function importRevision( $revision ) {
@@ -675,7 +675,7 @@ class WikiImporter {
 
        /**
         * Alternate per-revision callback, for debugging.
-        * @param WikiRevision $revision
+        * @param $revision WikiRevision
         * @private
         */
        function debugRevisionHandler( &$revision ) {
@@ -693,7 +693,7 @@ class WikiImporter {
 
        /**
         * Notify the callback function when a new <page> is reached.
-        * @param Title $title
+        * @param $title Title
         * @private
         */
        function pageCallback( $title ) {
@@ -704,10 +704,10 @@ class WikiImporter {
 
        /**
         * Notify the callback function when a </page> is closed.
-        * @param Title $title
-        * @param Title $origTitle
-        * @param int $revisionCount
-        * @param int $successCount number of revisions for which callback returned true
+        * @param $title Title
+        * @param $origTitle Title
+        * @param $revisionCount int
+        * @param $successCount Int: number of revisions for which callback returned true
         * @private
         */
        function pageOutCallback( $title, $origTitle, $revisionCount, $successCount ) {
index ace50a5..23fc6a7 100644 (file)
@@ -115,8 +115,8 @@ class WatchedItem {
         * Check if the given title already is watched by the user, and if so
         * add watches on a new title. To be used for page renames and such.
         *
-        * @param Title $ot Page title to duplicate entries from, if present
-        * @param Title $nt Page title to add watches on
+        * @param $ot Title: page title to duplicate entries from, if present
+        * @param $nt Title: page title to add watches on
         */
        static function duplicateEntries( $ot, $nt ) {
                WatchedItem::doDuplicateEntries( $ot->getSubjectPage(), $nt->getSubjectPage() );
index 4f64b78..fcfdb78 100644 (file)
@@ -19,10 +19,10 @@ class WatchlistEditor {
        /**
         * Main execution point
         *
-        * @param User $user
-        * @param OutputPage $output
-        * @param WebRequest $request
-        * @param int $mode
+        * @param $user User
+        * @param $output OutputPage
+        * @param $request WebRequest
+        * @param $mode int
         */
        public function execute( $user, $output, $request, $mode ) {
                global $wgUser;
@@ -81,8 +81,8 @@ class WatchlistEditor {
        /**
         * Check the edit token from a form submission
         *
-        * @param WebRequest $request
-        * @param User $user
+        * @param $request WebRequest
+        * @param $user User
         * @return bool
         */
        private function checkToken( $request, $user ) {
@@ -93,7 +93,7 @@ class WatchlistEditor {
         * Extract a list of titles from a blob of text, returning
         * (prefixed) strings; unwatchable titles are ignored
         *
-        * @param mixed $list
+        * @param $list mixed
         * @return array
         */
        private function extractTitles( $list ) {
@@ -120,9 +120,9 @@ class WatchlistEditor {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param array $titles An array of strings, or Title objects
-        * @param OutputPage $output
-        * @param Skin $skin
+        * @param $titles An array of strings, or Title objects
+        * @param $output OutputPage
+        * @param $skin Skin
         */
        private function showTitles( $titles, $output, $skin ) {
                $talk = wfMsgHtml( 'talkpagelinktext' );
@@ -153,7 +153,7 @@ class WatchlistEditor {
        /**
         * Count the number of titles on a user's watchlist, excluding talk pages
         *
-        * @param User $user
+        * @param $user User
         * @return int
         */
        private function countWatchlist( $user ) {
@@ -167,7 +167,7 @@ class WatchlistEditor {
         * Prepare a list of titles on a user's watchlist (excluding talk pages)
         * and return an array of (prefixed) strings
         *
-        * @param User $user
+        * @param $user User
         * @return array
         */
        private function getWatchlist( $user ) {
@@ -197,7 +197,7 @@ class WatchlistEditor {
         * and return as a two-dimensional array with namespace, title and
         * redirect status
         *
-        * @param User $user
+        * @param $user User
         * @return array
         */
        private function getWatchlistInfo( $user ) {
@@ -233,8 +233,8 @@ class WatchlistEditor {
         * Show a message indicating the number of items on the user's watchlist,
         * and return this count for additional checking
         *
-        * @param OutputPage $output
-        * @param User $user
+        * @param $output OutputPage
+        * @param $user User
         * @return int
         */
        private function showItemCount( $output, $user ) {
@@ -250,7 +250,7 @@ class WatchlistEditor {
        /**
         * Remove all titles from a user's watchlist
         *
-        * @param User $user
+        * @param $user User
         */
        private function clearWatchlist( $user ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -263,8 +263,8 @@ class WatchlistEditor {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param array $titles An array of strings, or Title objects
-        * @param User $user
+        * @param $titles An array of strings, or Title objects
+        * @param $user User
         */
        private function watchTitles( $titles, $user ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -296,8 +296,8 @@ class WatchlistEditor {
         * $titles can be an array of strings or Title objects; the former
         * is preferred, since Titles are very memory-heavy
         *
-        * @param array $titles An array of strings, or Title objects
-        * @param User $user
+        * @param $titles An array of strings, or Title objects
+        * @param $user User
         */
        private function unwatchTitles( $titles, $user ) {
                $dbw = wfGetDB( DB_MASTER );
@@ -330,8 +330,8 @@ class WatchlistEditor {
        /**
         * Show the standard watchlist editing form
         *
-        * @param OutputPage $output
-        * @param User $user
+        * @param $output OutputPage
+        * @param $user User
         */
        private function showNormalForm( $output, $user ) {
                global $wgUser;
@@ -360,7 +360,7 @@ class WatchlistEditor {
        /**
         * Get the correct "heading" for a namespace
         *
-        * @param int $namespace
+        * @param $namespace int
         * @return string
         */
        private function getNamespaceHeading( $namespace ) {
@@ -373,9 +373,9 @@ class WatchlistEditor {
         * Build a single list item containing a check box selecting a title
         * and a link to that title, with various additional bits
         *
-        * @param Title $title
-        * @param bool $redirect
-        * @param Skin $skin
+        * @param $title Title
+        * @param $redirect bool
+        * @param $skin Skin
         * @return string
         */
        private function buildRemoveLine( $title, $redirect, $skin ) {
@@ -397,8 +397,8 @@ class WatchlistEditor {
        /**
         * Show a form for editing the watchlist in "raw" mode
         *
-        * @param OutputPage $output
-        * @param User $user
+        * @param $output OutputPage
+        * @param $user User
         */
        public function showRawForm( $output, $user ) {
                global $wgUser;
@@ -426,8 +426,8 @@ class WatchlistEditor {
         * Determine whether we are editing the watchlist, and if so, what
         * kind of editing operation
         *
-        * @param WebRequest $request
-        * @param mixed $par
+        * @param $request WebRequest
+        * @param $par mixed
         * @return int
         */
        public static function getMode( $request, $par ) {
@@ -448,7 +448,7 @@ class WatchlistEditor {
         * Build a set of links for convenient navigation
         * between watchlist viewing and editing modes
         *
-        * @param Skin $skin Skin to use
+        * @param $skin Skin to use
         * @return string
         */
        public static function buildTools( $skin ) {
index 61511c6..c508200 100644 (file)
@@ -28,7 +28,7 @@
  */
 class WikiError {
        /**
-        * @param string $message
+        * @param $message string
         */
        function __construct( $message ) {
                $this->mMessage = $message;
@@ -54,9 +54,8 @@ class WikiError {
         * Returns true if the given object is a WikiError-descended
         * error object, false otherwise.
         *
-        * @param mixed $object
+        * @param $object mixed
         * @return bool
-        * @static
         */
        public static function isError( $object ) {
                return $object instanceof WikiError;
@@ -69,7 +68,7 @@ class WikiError {
  */
 class WikiErrorMsg extends WikiError {
        /**
-        * @param string $message Wiki message name
+        * @param $message String: wiki message name
         * @param ... parameters to pass to wfMsg()
         */
        function WikiErrorMsg( $message/*, ... */ ) {
@@ -85,8 +84,10 @@ class WikiErrorMsg extends WikiError {
  */
 class WikiXmlError extends WikiError {
        /**
-        * @param resource $parser
-        * @param string $message
+        * @param $parser resource
+        * @param $message string
+        * @param $context
+        * @param $offset Int
         */
        function WikiXmlError( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
                $this->mXmlError = xml_get_error_code( $parser );