TimeAdjustTest: Use dataProvider
[lhc/web/wiklou.git] / includes / db / Database.php
index 05a0ca0..65a74ab 100644 (file)
@@ -49,10 +49,10 @@ interface DatabaseType {
        /**
         * Open a connection to the database. Usually aborts on failure
         *
-        * @param $server String: database server host
-        * @param $user String: database user name
-        * @param $password String: database user password
-        * @param $dbName String: database name
+        * @param string $server database server host
+        * @param string $user database user name
+        * @param string $password database user password
+        * @param string $dbName database name
         * @return bool
         * @throws DBConnectionError
         */
@@ -151,8 +151,8 @@ interface DatabaseType {
         * mysql_fetch_field() wrapper
         * Returns false if the field doesn't exist
         *
-        * @param $table string: table name
-        * @param $field string: field name
+        * @param string $table table name
+        * @param string $field field name
         *
         * @return Field
         */
@@ -160,9 +160,9 @@ interface DatabaseType {
 
        /**
         * Get information about an index into an object
-        * @param $table string: Table name
-        * @param $index string: Index name
-        * @param $fname string: Calling function name
+        * @param string $table Table name
+        * @param string $index Index name
+        * @param string $fname Calling function name
         * @return Mixed: Database-specific index description class or false if the index does not exist
         */
        function indexInfo( $table, $index, $fname = 'Database::indexInfo' );
@@ -178,7 +178,7 @@ interface DatabaseType {
        /**
         * Wrapper for addslashes()
         *
-        * @param $s string: to be slashed.
+        * @param string $s to be slashed.
         * @return string: slashed string.
         */
        function strencode( $s );
@@ -282,7 +282,6 @@ abstract class DatabaseBase implements DatabaseType {
         */
        protected $fileHandle = null;
 
-
 # ------------------------------------------------------------------------------
 # Accessors
 # ------------------------------------------------------------------------------
@@ -370,7 +369,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Historically, transactions were allowed to be "nested". This is no
         * longer supported, so this function really only returns a boolean.
         *
-        * @param $level int An integer (0 or 1), or omitted to leave it unchanged.
+        * @param int $level An integer (0 or 1), or omitted to leave it unchanged.
         * @return int The previous value
         */
        public function trxLevel( $level = null ) {
@@ -379,7 +378,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Get/set the number of errors logged. Only useful when errors are ignored
-        * @param $count int The count to set, or omitted to leave it unchanged.
+        * @param int $count The count to set, or omitted to leave it unchanged.
         * @return int The error count
         */
        public function errorCount( $count = null ) {
@@ -388,7 +387,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Get/set the table prefix.
-        * @param $prefix string The table prefix to set, or omitted to leave it unchanged.
+        * @param string $prefix The table prefix to set, or omitted to leave it unchanged.
         * @return string The previous table prefix.
         */
        public function tablePrefix( $prefix = null ) {
@@ -408,7 +407,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Get properties passed down from the server info array of the load
         * balancer.
         *
-        * @param $name string The entry of the info array to get, or null to get the
+        * @param string $name The entry of the info array to get, or null to get the
         *   whole array
         *
         * @return LoadBalancer|null
@@ -491,7 +490,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns true if this database uses timestamps rather than integers
         *
         * @return bool
-       */
+        */
        public function realTimestamps() {
                return false;
        }
@@ -655,12 +654,12 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Constructor.
-        * @param $server String: database server host
-        * @param $user String: database user name
-        * @param $password String: database user password
-        * @param $dbName String: database name
+        * @param string $server database server host
+        * @param string $user database user name
+        * @param string $password database user password
+        * @param string $dbName database name
         * @param $flags
-        * @param $tablePrefix String: database table prefixes. By default use the prefix gave in LocalSettings.php
+        * @param string $tablePrefix database table prefixes. By default use the prefix gave in LocalSettings.php
         */
        function __construct( $server = false, $user = false, $password = false, $dbName = false,
                $flags = 0, $tablePrefix = 'get from global'
@@ -721,14 +720,14 @@ abstract class DatabaseBase implements DatabaseType {
         *
         * @since 1.18
         *
-        * @param $dbType String A possible DB type
-        * @param $p Array An array of options to pass to the constructor.
+        * @param string $dbType A possible DB type
+        * @param array $p An array of options to pass to the constructor.
         *    Valid options are: host, user, password, dbname, flags, tablePrefix
         * @return DatabaseBase subclass or null
         */
        final public static function factory( $dbType, $p = array() ) {
                $canonicalDBTypes = array(
-                       'mysql', 'postgres', 'sqlite', 'oracle', 'mssql', 'ibm_db2'
+                       'mysql', 'postgres', 'sqlite', 'oracle', 'mssql'
                );
                $dbType = strtolower( $dbType );
                $class = 'Database' . ucfirst( $dbType );
@@ -816,7 +815,7 @@ abstract class DatabaseBase implements DatabaseType {
        abstract protected function closeConnection();
 
        /**
-        * @param $error String: fallback error message, used if none is given by DB
+        * @param string $error fallback error message, used if none is given by DB
         * @throws DBConnectionError
         */
        function reportConnectionError( $error = 'Unknown error' ) {
@@ -1050,7 +1049,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Execute a prepared query with the various arguments
-        * @param $prepared String: the prepared sql
+        * @param string $prepared the prepared sql
         * @param $args Mixed: Either an array here, or put scalars as varargs
         *
         * @return ResultWrapper
@@ -1070,8 +1069,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * For faking prepared SQL statements on DBs that don't support it directly.
         *
-        * @param $preparedQuery String: a 'preparable' SQL statement
-        * @param $args Array of arguments to fill it with
+        * @param string $preparedQuery a 'preparable' SQL statement
+        * @param array $args of arguments to fill it with
         * @return string executable SQL
         */
        public function fillPrepared( $preparedQuery, $args ) {
@@ -1128,12 +1127,12 @@ abstract class DatabaseBase implements DatabaseType {
         *
         * If no result rows are returned from the query, false is returned.
         *
-        * @param $table string|array Table name. See DatabaseBase::select() for details.
-        * @param $var string The field name to select. This must be a valid SQL
+        * @param string|array $table Table name. See DatabaseBase::select() for details.
+        * @param string $var The field name to select. This must be a valid SQL
         *   fragment: do not use unvalidated user input.
-        * @param $cond string|array The condition array. See DatabaseBase::select() for details.
-        * @param $fname string The function name of the caller.
-        * @param $options string|array The query options. See DatabaseBase::select() for details.
+        * @param string|array $cond The condition array. See DatabaseBase::select() for details.
+        * @param string $fname The function name of the caller.
+        * @param string|array $options The query options. See DatabaseBase::select() for details.
         *
         * @return bool|mixed The value from the field, or false on failure.
         */
@@ -1165,7 +1164,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns an optional USE INDEX clause to go after the table, and a
         * string to go at the end of the query.
         *
-        * @param $options Array: associative array of options to be turned into
+        * @param array $options associative array of options to be turned into
         *              an SQL query, valid keys are listed in the function.
         * @return Array
         * @see DatabaseBase::select()
@@ -1249,7 +1248,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Returns an optional GROUP BY with an optional HAVING
         *
-        * @param $options Array: associative array of options
+        * @param array $options associative array of options
         * @return string
         * @see DatabaseBase::select()
         * @since 1.21
@@ -1274,7 +1273,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Returns an optional ORDER BY
         *
-        * @param $options Array: associative array of options
+        * @param array $options associative array of options
         * @return string
         * @see DatabaseBase::select()
         * @since 1.21
@@ -1293,11 +1292,11 @@ abstract class DatabaseBase implements DatabaseType {
         * Execute a SELECT query constructed using the various parameters provided.
         * See below for full details of the parameters.
         *
-        * @param $table String|Array Table name
-        * @param $vars String|Array Field names
-        * @param $conds String|Array Conditions
-        * @param $fname String Caller function name
-        * @param $options Array Query options
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param string|array $conds Conditions
+        * @param string $fname Caller function name
+        * @param array $options Query options
         * @param $join_conds Array Join conditions
         *
         * @param $table string|array
@@ -1441,11 +1440,11 @@ abstract class DatabaseBase implements DatabaseType {
         * doing UNION queries, where the SQL text of each query is needed. In general,
         * however, callers outside of Database classes should just use select().
         *
-        * @param $table string|array Table name
-        * @param $vars string|array Field names
-        * @param $conds string|array Conditions
-        * @param $fname string Caller function name
-        * @param $options string|array Query options
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param string|array $conds Conditions
+        * @param string $fname Caller function name
+        * @param string|array $options Query options
         * @param $join_conds string|array Join conditions
         *
         * @return string SQL query string.
@@ -1509,11 +1508,11 @@ abstract class DatabaseBase implements DatabaseType {
         * that a single row object is returned. If the query returns no rows,
         * false is returned.
         *
-        * @param $table string|array Table name
-        * @param $vars string|array Field names
-        * @param $conds array Conditions
-        * @param $fname string Caller function name
-        * @param $options string|array Query options
+        * @param string|array $table Table name
+        * @param string|array $vars Field names
+        * @param array $conds Conditions
+        * @param string $fname Caller function name
+        * @param string|array $options Query options
         * @param $join_conds array|string Join conditions
         *
         * @return object|bool
@@ -1551,11 +1550,11 @@ abstract class DatabaseBase implements DatabaseType {
         *
         * Takes the same arguments as DatabaseBase::select().
         *
-        * @param $table String: table name
-        * @param Array|string $vars : unused
-        * @param Array|string $conds : filters on the table
-        * @param $fname String: function name for profiling
-        * @param $options Array: options for select
+        * @param string $table table name
+        * @param array|string $vars : unused
+        * @param array|string $conds : filters on the table
+        * @param string $fname function name for profiling
+        * @param array $options options for select
         * @return Integer: row count
         */
        public function estimateRowCount( $table, $vars = '*', $conds = '',
@@ -1576,7 +1575,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Removes most variables from an SQL query and replaces them with X or N for numbers.
         * It's only slightly flawed. Don't use for anything important.
         *
-        * @param $sql String A SQL Query
+        * @param string $sql A SQL Query
         *
         * @return string
         */
@@ -1603,9 +1602,9 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Determines whether a field exists in a table
         *
-        * @param $table String: table name
-        * @param $field String: filed to check on that table
-        * @param $fname String: calling function name (optional)
+        * @param string $table table name
+        * @param string $field filed to check on that table
+        * @param string $fname calling function name (optional)
         * @return Boolean: whether $table has filed $field
         */
        public function fieldExists( $table, $field, $fname = 'DatabaseBase::fieldExists' ) {
@@ -1726,7 +1725,7 @@ abstract class DatabaseBase implements DatabaseType {
         *                 DatabaseBase::tableName().
         * @param $a       Array of rows to insert
         * @param $fname   String Calling function name (use __METHOD__) for logs/profiling
-        * @param $options Array of options
+        * @param array $options of options
         *
         * @return bool
         */
@@ -1785,7 +1784,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Make UPDATE options for the DatabaseBase::update function
         *
-        * @param $options Array: The options passed to DatabaseBase::update
+        * @param array $options The options passed to DatabaseBase::update
         * @return string
         */
        protected function makeUpdateOptions( $options ) {
@@ -1812,7 +1811,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $table  String name of the table to UPDATE. This will be passed through
         *                DatabaseBase::tableName().
         *
-        * @param $values Array:  An array of values to SET. For each array element,
+        * @param array $values  An array of values to SET. For each array element,
         *                the key gives the field name, and the value gives the data
         *                to set that field to. The data will be quoted by
         *                DatabaseBase::addQuotes().
@@ -1824,7 +1823,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $fname  String: The function name of the caller (from __METHOD__),
         *                for logging and profiling.
         *
-        * @param $options Array: An array of UPDATE options, can be:
+        * @param array $options An array of UPDATE options, can be:
         *                   - IGNORE: Ignore unique key conflicts
         *                   - LOW_PRIORITY: MySQL-specific, see MySQL manual.
         * @return Boolean
@@ -1843,7 +1842,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Makes an encoded list of strings from an array
-        * @param $a Array containing the data
+        * @param array $a containing the data
         * @param int $mode Constant
         *      - LIST_COMMA:          comma separated, no field names
         *      - LIST_AND:            ANDed WHERE clause (without the WHERE). See
@@ -1914,10 +1913,10 @@ abstract class DatabaseBase implements DatabaseType {
         * Build a partial where clause from a 2-d array such as used for LinkBatch.
         * The keys on each level may be either integers or strings.
         *
-        * @param $data Array: organized as 2-d
+        * @param array $data organized as 2-d
         *              array(baseKeyVal => array(subKeyVal => [ignored], ...), ...)
-        * @param $baseKey String: field name to match the base-level keys to (eg 'pl_namespace')
-        * @param $subKey String: field name to match the sub-level keys to (eg 'pl_title')
+        * @param string $baseKey field name to match the base-level keys to (eg 'pl_namespace')
+        * @param string $subKey field name to match the sub-level keys to (eg 'pl_title')
         * @return Mixed: string SQL fragment, or false if no items in array.
         */
        public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
@@ -1979,7 +1978,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Build a concatenation list to feed into a SQL query
-        * @param $stringList Array: list of raw SQL expressions; caller is responsible for any quoting
+        * @param array $stringList list of raw SQL expressions; caller is responsible for any quoting
         * @return String
         */
        public function buildConcat( $stringList ) {
@@ -2027,8 +2026,8 @@ abstract class DatabaseBase implements DatabaseType {
         * themselves. Pass the canonical name to such functions. This is only needed
         * when calling query() directly.
         *
-        * @param $name String: database table name
-        * @param $format String One of:
+        * @param string $name database table name
+        * @param string $format One of:
         *   quoted - Automatically pass the table name through addIdentifierQuotes()
         *            so that it can be used in a query.
         *   raw - Do not add identifier quotes to the table name
@@ -2070,7 +2069,7 @@ abstract class DatabaseBase implements DatabaseType {
                                && in_array( $table, $wgSharedTables ) # A shared table is selected
                        ) {
                                $database = $wgSharedDB;
-                               $prefix   = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
+                               $prefix = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
                        } else {
                                $database = null;
                                $prefix = $this->mTablePrefix; # Default prefix
@@ -2142,8 +2141,8 @@ abstract class DatabaseBase implements DatabaseType {
         * Get an aliased table name
         * e.g. tableName AS newTableName
         *
-        * @param $name string Table name, see tableName()
-        * @param $alias string|bool Alias (optional)
+        * @param string $name Table name, see tableName()
+        * @param string|bool $alias Alias (optional)
         * @return string SQL name for aliased table. Will not alias a table to its own name
         */
        public function tableNameWithAlias( $name, $alias = false ) {
@@ -2175,8 +2174,8 @@ abstract class DatabaseBase implements DatabaseType {
         * Get an aliased field name
         * e.g. fieldName AS newFieldName
         *
-        * @param $name string Field name
-        * @param $alias string|bool Alias (optional)
+        * @param string $name Field name
+        * @param string|bool $alias Alias (optional)
         * @return string SQL name for aliased field. Will not alias a field to its own name
         */
        public function fieldNameWithAlias( $name, $alias = false ) {
@@ -2208,7 +2207,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Get the aliased table name clause for a FROM clause
         * which might have a JOIN and/or USE INDEX clause
         *
-        * @param $tables array ( [alias] => table )
+        * @param array $tables ( [alias] => table )
         * @param $use_index array Same as for select()
         * @param $join_conds array Same as for select()
         * @return string
@@ -2439,12 +2438,12 @@ abstract class DatabaseBase implements DatabaseType {
         * to collide. However if you do this, you run the risk of encountering
         * errors which wouldn't have occurred in MySQL.
         *
-        * @param $table String: The table to replace the row(s) in.
-        * @param $rows array Can be either a single row to insert, or multiple rows,
+        * @param string $table The table to replace the row(s) in.
+        * @param array $rows Can be either a single row to insert, or multiple rows,
         *    in the same format as for DatabaseBase::insert()
-        * @param $uniqueIndexes array is an array of indexes. Each element may be either
+        * @param array $uniqueIndexes is an array of indexes. Each element may be either
         *    a field name or an array of field names
-        * @param $fname String: Calling function name (use __METHOD__) for logs/profiling
+        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
         */
        public function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseBase::replace' ) {
                $quotedTable = $this->tableName( $table );
@@ -2497,9 +2496,9 @@ abstract class DatabaseBase implements DatabaseType {
         * REPLACE query wrapper for MySQL and SQLite, which have a native REPLACE
         * statement.
         *
-        * @param $table string Table name
-        * @param $rows array Rows to insert
-        * @param $fname string Caller function name
+        * @param string $table Table name
+        * @param array $rows Rows to insert
+        * @param string $fname Caller function name
         *
         * @return ResultWrapper
         */
@@ -2607,10 +2606,10 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * DELETE query wrapper.
         *
-        * @param $table Array Table name
-        * @param $conds String|Array of conditions. See $conds in DatabaseBase::select() for
+        * @param array $table Table name
+        * @param string|array $conds of conditions. See $conds in DatabaseBase::select() for
         *               the format. Use $conds == "*" to delete all rows
-        * @param $fname String name of the calling function
+        * @param string $fname name of the calling function
         *
         * @throws DBUnexpectedError
         * @return bool|ResultWrapper
@@ -2634,24 +2633,24 @@ abstract class DatabaseBase implements DatabaseType {
         * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
         * into another table.
         *
-        * @param $destTable string The table name to insert into
-        * @param $srcTable string|array May be either a table name, or an array of table names
+        * @param string $destTable The table name to insert into
+        * @param string|array $srcTable May be either a table name, or an array of table names
         *    to include in a join.
         *
-        * @param $varMap array must be an associative array of the form
+        * @param array $varMap must be an associative array of the form
         *    array( 'dest1' => 'source1', ...). Source items may be literals
         *    rather than field names, but strings should be quoted with
         *    DatabaseBase::addQuotes()
         *
-        * @param $conds array Condition array. See $conds in DatabaseBase::select() for
+        * @param array $conds Condition array. See $conds in DatabaseBase::select() for
         *    the details of the format of condition arrays. May be "*" to copy the
         *    whole table.
         *
-        * @param $fname string The function name of the caller, from __METHOD__
+        * @param string $fname The function name of the caller, from __METHOD__
         *
-        * @param $insertOptions array Options for the INSERT part of the query, see
+        * @param array $insertOptions Options for the INSERT part of the query, see
         *    DatabaseBase::insert() for details.
-        * @param $selectOptions array Options for the SELECT part of the query, see
+        * @param array $selectOptions Options for the SELECT part of the query, see
         *    DatabaseBase::select() for details.
         *
         * @return ResultWrapper
@@ -2707,7 +2706,7 @@ abstract class DatabaseBase implements DatabaseType {
         * The version provided by default works in MySQL and SQLite.  It will very
         * likely need to be overridden for most other DBMSes.
         *
-        * @param $sql String SQL query we will append the limit too
+        * @param string $sql SQL query we will append the limit too
         * @param $limit Integer the SQL limit
         * @param $offset Integer|bool the SQL offset (default false)
         *
@@ -2736,7 +2735,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Construct a UNION query
         * This is used for providing overload point for other DB abstractions
         * not compatible with the MySQL syntax.
-        * @param $sqls Array: SQL statements to combine
+        * @param array $sqls SQL statements to combine
         * @param $all Boolean: use UNION ALL
         * @return String: SQL fragment
         */
@@ -2749,9 +2748,9 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns an SQL expression for a simple conditional.  This doesn't need
         * to be overridden unless CASE isn't supported in your DBMS.
         *
-        * @param $cond string|array SQL expression which will result in a boolean value
-        * @param $trueVal String: SQL expression to return if true
-        * @param $falseVal String: SQL expression to return if false
+        * @param string|array $cond SQL expression which will result in a boolean value
+        * @param string $trueVal SQL expression to return if true
+        * @param string $falseVal SQL expression to return if false
         * @return String: SQL fragment
         */
        public function conditional( $cond, $trueVal, $falseVal ) {
@@ -2765,9 +2764,9 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns a comand for str_replace function in SQL query.
         * Uses REPLACE() in MySQL
         *
-        * @param $orig String: column to modify
-        * @param $old String: column to seek
-        * @param $new String: column to replace with
+        * @param string $orig column to modify
+        * @param string $old column to seek
+        * @param string $new column to replace with
         *
         * @return string
         */
@@ -3058,7 +3057,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Nesting of transactions is not supported.
         *
         * @param $fname string
-        * @param $flush String Flush flag, set to 'flush' to disable warnings about explicitly committing implicit
+        * @param string $flush Flush flag, set to 'flush' to disable warnings about explicitly committing implicit
         *        transactions, or calling commit when no transaction is in progress.
         *        This will silently break any ongoing explicit transaction. Only set the flush flag if you are sure
         *        that it is safe to ignore these warnings in your context.
@@ -3132,10 +3131,10 @@ abstract class DatabaseBase implements DatabaseType {
         * The table names passed to this function shall not be quoted (this
         * function calls addIdentifierQuotes when needed).
         *
-        * @param $oldName String: name of table whose structure should be copied
-        * @param $newName String: name of table to be created
+        * @param string $oldName name of table whose structure should be copied
+        * @param string $newName name of table to be created
         * @param $temporary Boolean: whether the new table should be temporary
-        * @param $fname String: calling function name
+        * @param string $fname calling function name
         * @throws MWException
         * @return Boolean: true if operation was successful
         */
@@ -3149,8 +3148,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * List all tables on the database
         *
-        * @param $prefix string Only show tables with this prefix, e.g. mw_
-        * @param $fname String: calling function name
+        * @param string $prefix Only show tables with this prefix, e.g. mw_
+        * @param string $fname calling function name
         * @throws MWException
         */
        function listTables( $prefix = null, $fname = 'DatabaseBase::listTables' ) {
@@ -3294,7 +3293,7 @@ abstract class DatabaseBase implements DatabaseType {
         * Returns true on success, error string or exception on failure (depending
         * on object's error ignore settings).
         *
-        * @param $filename String: File name to open
+        * @param string $filename File name to open
         * @param bool|callable $lineCallback Optional function called before reading each line
         * @param bool|callable $resultCallback Optional function called for each MySQL result
         * @param bool|string $fname Calling function name or false if name should be
@@ -3337,7 +3336,7 @@ abstract class DatabaseBase implements DatabaseType {
         * from updaters.inc. Keep in mind this always returns a patch, as
         * it fails back to MySQL if no DB-specific patch can be found
         *
-        * @param $patch String The name of the patch, like patch-something.sql
+        * @param string $patch The name of the patch, like patch-something.sql
         * @return String Full path to patch file
         */
        public function patchPath( $patch ) {
@@ -3356,7 +3355,7 @@ abstract class DatabaseBase implements DatabaseType {
         * ones in $GLOBALS. If an array is set here, $GLOBALS will not be used at
         * all. If it's set to false, $GLOBALS will be used.
         *
-        * @param $vars bool|array mapping variable name to value.
+        * @param bool|array $vars mapping variable name to value.
         */
        public function setSchemaVars( $vars ) {
                $this->mSchemaVars = $vars;
@@ -3371,7 +3370,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @param $fp Resource: File handle
         * @param $lineCallback Callback: Optional function called before reading each query
         * @param $resultCallback Callback: Optional function called for each MySQL result
-        * @param $fname String: Calling function name
+        * @param string $fname Calling function name
         * @param $inputCallback Callback: Optional function called for each complete query sent
         * @return bool|string
         */
@@ -3428,8 +3427,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Called by sourceStream() to check if we've reached a statement end
         *
-        * @param $sql String SQL assembled so far
-        * @param $newLine String New line about to be added to $sql
+        * @param string $sql SQL assembled so far
+        * @param string $newLine New line about to be added to $sql
         * @return Bool Whether $newLine contains end of the statement
         */
        public function streamStatementEnd( &$sql, &$newLine ) {
@@ -3457,7 +3456,7 @@ abstract class DatabaseBase implements DatabaseType {
         * - / *$var* / is just encoded, besides traditional table prefix and
         *   table options its use should be avoided.
         *
-        * @param $ins String: SQL statement to replace variables in
+        * @param string $ins SQL statement to replace variables in
         * @return String The new SQL statement with variables replaced
         */
        protected function replaceSchemaVars( $ins ) {
@@ -3545,8 +3544,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Check to see if a named lock is available. This is non-blocking.
         *
-        * @param $lockName String: name of lock to poll
-        * @param $method String: name of method calling us
+        * @param string $lockName name of lock to poll
+        * @param string $method name of method calling us
         * @return Boolean
         * @since 1.20
         */
@@ -3560,8 +3559,8 @@ abstract class DatabaseBase implements DatabaseType {
         * Abstracted from Filestore::lock() so child classes can implement for
         * their own needs.
         *
-        * @param $lockName String: name of lock to aquire
-        * @param $method String: name of method calling us
+        * @param string $lockName name of lock to aquire
+        * @param string $method name of method calling us
         * @param $timeout Integer: timeout
         * @return Boolean
         */
@@ -3572,8 +3571,8 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Release a lock.
         *
-        * @param $lockName String: Name of lock to release
-        * @param $method String: Name of method calling us
+        * @param string $lockName Name of lock to release
+        * @param string $method Name of method calling us
         *
         * @return int Returns 1 if the lock was released, 0 if the lock was not established
         * by this thread (in which case the lock is not released), and NULL if the named
@@ -3586,10 +3585,10 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Lock specific tables
         *
-        * @param $read Array of tables to lock for read access
-        * @param $write Array of tables to lock for write access
-        * @param $method String name of caller
-        * @param $lowPriority bool Whether to indicate writes to be LOW PRIORITY
+        * @param array $read of tables to lock for read access
+        * @param array $write of tables to lock for write access
+        * @param string $method name of caller
+        * @param bool $lowPriority Whether to indicate writes to be LOW PRIORITY
         *
         * @return bool
         */
@@ -3600,7 +3599,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Unlock specific tables
         *
-        * @param $method String the caller
+        * @param string $method the caller
         *
         * @return bool
         */
@@ -3650,7 +3649,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Encode an expiry time into the DBMS dependent format
         *
-        * @param $expiry String: timestamp for expiry, or the 'infinity' string
+        * @param string $expiry timestamp for expiry, or the 'infinity' string
         * @return String
         */
        public function encodeExpiry( $expiry ) {
@@ -3662,7 +3661,7 @@ abstract class DatabaseBase implements DatabaseType {
        /**
         * Decode an expiry time into a DBMS independent format
         *
-        * @param $expiry String: DB timestamp field value for expiry
+        * @param string $expiry DB timestamp field value for expiry
         * @param $format integer: TS_* constant, defaults to TS_MW
         * @return String
         */