From f5f1e38b9a1ba8685221eaaac604bf05d9436cf5 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 19 Apr 2014 13:55:27 +0200 Subject: [PATCH] Fixed some @params documentation (includes/[db|installer]) Swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Also added some missing @param. Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa --- includes/db/Database.php | 30 ++++---- includes/db/DatabaseError.php | 2 +- includes/db/DatabaseMssql.php | 2 +- includes/db/DatabaseMysqlBase.php | 22 +++--- includes/db/DatabaseOracle.php | 4 +- includes/db/DatabasePostgres.php | 4 +- includes/db/DatabaseSqlite.php | 8 +-- includes/db/IORMRow.php | 30 ++++---- includes/db/IORMTable.php | 30 ++++---- includes/db/LBFactory.php | 2 +- includes/db/LBFactorySingle.php | 4 +- includes/db/LoadBalancer.php | 40 +++++------ includes/db/ORMResult.php | 12 ++-- includes/db/ORMRow.php | 40 +++++------ includes/db/ORMTable.php | 42 +++++------ includes/installer/CliInstaller.php | 8 +-- includes/installer/DatabaseInstaller.php | 45 ++++++------ includes/installer/DatabaseUpdater.php | 40 +++++------ includes/installer/Installer.php | 70 +++++++++---------- includes/installer/LocalSettingsGenerator.php | 12 ++-- includes/installer/MssqlInstaller.php | 12 ++-- includes/installer/MysqlInstaller.php | 8 +-- includes/installer/OracleUpdater.php | 2 +- includes/installer/PostgresInstaller.php | 5 +- includes/installer/SqliteInstaller.php | 10 +-- includes/installer/WebInstaller.php | 12 ++-- includes/installer/WebInstallerOutput.php | 6 +- 27 files changed, 251 insertions(+), 251 deletions(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index 9254bb48aa..b502bb9874 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -43,10 +43,10 @@ interface DatabaseType { /** * Open a connection to the database. Usually aborts on failure * - * @param string $server database server host - * @param string $user database user name - * @param string $password database user password - * @param string $dbName 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 */ @@ -336,7 +336,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { } /** - * @return string command delimiter used by this database engine + * @return string Command delimiter used by this database engine */ public function getDelimiter() { return $this->delimiter; @@ -349,7 +349,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * - false to disable debugging * - omitted or null to do nothing * - * @return bool|null previous value of the flag + * @return bool|null Previous value of the flag */ public function debug( $debug = null ) { return wfSetBit( $this->mFlags, DBO_DEBUG, $debug ); @@ -475,7 +475,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * parameters, the member with the given name is set to the given value. * * @param string $name - * @param $value + * @param array $value */ public function setLBInfo( $name, $value = null ) { if ( is_null( $value ) ) { @@ -908,7 +908,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { } /** - * @param $errno + * @param int $errno * @param string $errstr */ public function connectionErrorHandler( $errno, $errstr ) { @@ -1190,7 +1190,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { /** * Execute a prepared query with the various arguments - * @param string $prepared the prepared sql + * @param string $prepared The prepared sql * @param mixed $args Either an array here, or put scalars as varargs * * @return ResultWrapper @@ -1211,7 +1211,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * For faking prepared SQL statements on DBs that don't support it directly. * * @param string $preparedQuery A 'preparable' SQL statement - * @param array $args of Arguments to fill it with + * @param array $args Array of Arguments to fill it with * @return string Executable SQL */ public function fillPrepared( $preparedQuery, $args ) { @@ -2063,7 +2063,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * array(baseKeyVal => array(subKeyVal => [ignored], ...), ...) * @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. + * @return string|bool string SQL fragment, or false if no items in array. */ public function makeWhereFrom2d( $data, $baseKey, $subKey ) { $conds = array(); @@ -2087,7 +2087,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { /** * Return aggregated value alias * - * @param $valuedata + * @param array $valuedata * @param string $valuename * * @return string @@ -2161,7 +2161,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { * * @todo Explain what exactly will fail if this is not overridden. * - * @param $db + * @param string $db * * @return bool Success or failure */ @@ -2176,6 +2176,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { /** * Get the current DB name + * @return string */ public function getDBname() { return $this->mDBname; @@ -2183,6 +2184,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { /** * Get the server hostname or IP address + * @return string */ public function getServer() { return $this->mServer; @@ -3008,7 +3010,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType { /** * Returns true if current database backend supports ORDER BY or LIMIT for separate subqueries * within the UNION construct. - * @return Boolean + * @return bool */ public function unionSupportsOrderAndLimit() { return true; // True for almost every DB supported diff --git a/includes/db/DatabaseError.php b/includes/db/DatabaseError.php index 377aca15c3..3bcf638e8b 100644 --- a/includes/db/DatabaseError.php +++ b/includes/db/DatabaseError.php @@ -147,7 +147,7 @@ class DBConnectionError extends DBExpectedError { } /** - * @return boolean + * @return bool */ function isLoggable() { // Don't send to the exception log, already in dberror log diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index faed99654f..0da47d36ad 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -1222,7 +1222,7 @@ class DatabaseMssql extends DatabaseBase { * @param string $field Field name * @param string|array $conds Conditions * @param string|array $join_conds Join conditions - * @return String SQL text + * @return string SQL text * @since 1.23 */ public function buildGroupConcatField( $delim, $table, $field, $conds = '', diff --git a/includes/db/DatabaseMysqlBase.php b/includes/db/DatabaseMysqlBase.php index d437c4c823..df4be40724 100644 --- a/includes/db/DatabaseMysqlBase.php +++ b/includes/db/DatabaseMysqlBase.php @@ -321,7 +321,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase { /** * @param ResultWrapper|resource $res - * @param $n int + * @param int $n * @return string */ function fieldName( $res, $n ) { @@ -336,7 +336,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase { * Get the name of the specified field in a result * * @param ResultWrapper|resource $res - * @param $n int + * @param int $n * @return string */ abstract protected function mysqlFieldName( $res, $n ); @@ -344,7 +344,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase { /** * mysql_field_type() wrapper * @param ResultWrapper|resource $res - * @param $n int + * @param int $n * @return string */ public function fieldType( $res, $n ) { @@ -961,12 +961,12 @@ abstract class DatabaseMysqlBase extends DatabaseBase { /** * DELETE where the condition is a join. MySql uses multi-table deletes. - * @param $delTable string - * @param $joinTable string - * @param $delVar string - * @param $joinVar string - * @param $conds array|string - * @param bool|string $fname bool + * @param string $delTable + * @param string $joinTable + * @param string $delVar + * @param string $joinVar + * @param array|string $conds + * @param bool|string $fname * @throws DBUnexpectedError * @return bool|ResultWrapper */ @@ -1109,8 +1109,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase { } /** - * @param $tableName - * @param $fName string + * @param string $tableName + * @param string $fName * @return bool|ResultWrapper */ public function dropTable( $tableName, $fName = __METHOD__ ) { diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 0d13433f99..396de4f6f3 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -621,7 +621,7 @@ class DatabaseOracle extends DatabaseBase { /** * @param string $table - * @param $row + * @param array $row * @param string $fname * @return bool * @throws DBUnexpectedError @@ -977,7 +977,7 @@ class DatabaseOracle extends DatabaseBase { /** * Return aggregated value function call * - * @param $valuedata + * @param array $valuedata * @param string $valuename * @return mixed */ diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index 6aee528074..3433199864 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -223,7 +223,7 @@ class SavepointPostgres { /** * @param DatabaseBase $dbw - * @param $id + * @param int $id */ public function __construct( $dbw, $id ) { $this->dbw = $dbw; @@ -1263,7 +1263,7 @@ __INDEXATTR__; * Values may contain magic keywords like "$user" * @since 1.19 * - * @param $search_path array list of schemas to be searched by default + * @param array $search_path List of schemas to be searched by default */ function setSearchPath( $search_path ) { $this->query( "SET search_path = " . implode( ", ", $search_path ) ); diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 3313d25841..468ed6d686 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -240,7 +240,7 @@ class DatabaseSqlite extends DatabaseBase { /** * @see DatabaseBase::isWriteQuery() * - * @param $sql string + * @param string $sql * @return bool */ function isWriteQuery( $sql ) { @@ -348,7 +348,7 @@ class DatabaseSqlite extends DatabaseBase { /** * @param ResultWrapper $res - * @param $n + * @param int $n * @return bool */ function fieldName( $res, $n ) { @@ -747,7 +747,7 @@ class DatabaseSqlite extends DatabaseBase { } /** - * @param $b + * @param string $b * @return Blob */ function encodeBlob( $b ) { @@ -755,7 +755,7 @@ class DatabaseSqlite extends DatabaseBase { } /** - * @param $b Blob|string + * @param Blob|string $b * @return string */ function decodeBlob( $b ) { diff --git a/includes/db/IORMRow.php b/includes/db/IORMRow.php index 21ae808eff..c66cddfd5d 100644 --- a/includes/db/IORMRow.php +++ b/includes/db/IORMRow.php @@ -39,8 +39,8 @@ interface IORMRow { * @deprecated since 1.22 * * @param array|null $fields - * @param boolean $override - * @param boolean $skipLoaded + * @param bool $override + * @param bool $skipLoaded * * @return bool Success indicator */ @@ -85,7 +85,7 @@ interface IORMRow { * * @since 1.20 * - * @return integer|null + * @return int|null */ public function getId(); @@ -94,7 +94,7 @@ interface IORMRow { * * @since 1.20 * - * @param integer|null $id + * @param int|null $id */ public function setId( $id ); @@ -105,7 +105,7 @@ interface IORMRow { * * @param string $name * - * @return boolean + * @return bool */ public function hasField( $name ); @@ -114,7 +114,7 @@ interface IORMRow { * * @since 1.20 * - * @return boolean + * @return bool */ public function hasIdField(); @@ -124,7 +124,7 @@ interface IORMRow { * @since 1.20 * * @param array $fields The fields to set - * @param boolean $override Override already set fields with the provided values? + * @param bool $override Override already set fields with the provided values? */ public function setFields( array $fields, $override = true ); @@ -135,7 +135,7 @@ interface IORMRow { * @since 1.20 * * @param null|array $fields - * @param boolean $incNullId + * @param bool $incNullId * * @return array */ @@ -147,7 +147,7 @@ interface IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param boolean $override + * @param bool $override */ public function loadDefaults( $override = true ); @@ -160,7 +160,7 @@ interface IORMRow { * @param string|null $functionName * @deprecated since 1.22 * - * @return boolean Success indicator + * @return bool Success indicator */ public function save( $functionName = null ); @@ -170,7 +170,7 @@ interface IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @return boolean Success indicator + * @return bool Success indicator */ public function remove(); @@ -213,9 +213,9 @@ interface IORMRow { * @deprecated since 1.22 * * @param string $field - * @param integer $amount + * @param int $amount * - * @return boolean Success indicator + * @return bool Success indicator */ public function addToField( $field, $amount ); @@ -244,7 +244,7 @@ interface IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param boolean $update + * @param bool $update */ public function setUpdateSummaries( $update ); @@ -254,7 +254,7 @@ interface IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param boolean $summaryMode + * @param bool $summaryMode */ public function setSummaryMode( $summaryMode ); diff --git a/includes/db/IORMTable.php b/includes/db/IORMTable.php index 9e9c526c17..ab1ab79f55 100644 --- a/includes/db/IORMTable.php +++ b/includes/db/IORMTable.php @@ -161,7 +161,7 @@ interface IORMTable { * @param array|string|null $fields * @param array $conditions * @param array $options - * @param boolean $collapse Set to false to always return each result row as associative array. + * @param bool $collapse Set to false to always return each result row as associative array. * @param string|null $functionName * * @return array of array @@ -213,7 +213,7 @@ interface IORMTable { * @param array|string|null $fields * @param array $conditions * @param array $options - * @param boolean $collapse Set to false to always return each result row as associative array. + * @param bool $collapse Set to false to always return each result row as associative array. * @param string|null $functionName * * @return mixed|array|bool False on failure @@ -229,7 +229,7 @@ interface IORMTable { * * @param array $conditions * - * @return boolean + * @return bool */ public function has( array $conditions = array() ); @@ -238,7 +238,7 @@ interface IORMTable { * * @since 1.21 * - * @return boolean + * @return bool */ public function exists(); @@ -254,7 +254,7 @@ interface IORMTable { * @param array $conditions * @param array $options * - * @return integer + * @return int */ public function count( array $conditions = array(), array $options = array() ); @@ -266,7 +266,7 @@ interface IORMTable { * @param array $conditions * @param string|null $functionName * - * @return boolean Success indicator + * @return bool Success indicator */ public function delete( array $conditions, $functionName = null ); @@ -275,8 +275,8 @@ interface IORMTable { * * @since 1.20 * - * @param boolean $requireParams - * @param boolean $setDefaults + * @param bool $requireParams + * @param bool $setDefaults * * @return array */ @@ -298,14 +298,14 @@ interface IORMTable { * * @since 1.20 * - * @return integer DB_ enum + * @return int DB_ enum */ public function getReadDb(); /** * Set the database type to use for read operations. * - * @param integer $db + * @param int $db * * @since 1.20 */ @@ -316,7 +316,7 @@ interface IORMTable { * * @since 1.20 * - * @return String|bool The target wiki, in a form that LBFactory + * @return string|bool The target wiki, in a form that LBFactory * understands (or false if the local wiki is used) */ public function getTargetWiki(); @@ -372,7 +372,7 @@ interface IORMTable { * * @see LoadBalancer::reuseConnection * - * @param DatabaseBase $db the database + * @param DatabaseBase $db The database * * @since 1.20 */ @@ -388,7 +388,7 @@ interface IORMTable { * @param array $values * @param array $conditions * - * @return boolean Success indicator + * @return bool Success indicator */ public function update( array $values, array $conditions = array() ); @@ -490,7 +490,7 @@ interface IORMTable { * @since 1.20 * * @param array $data - * @param boolean $loadDefaults + * @param bool $loadDefaults * * @return IORMRow */ @@ -512,7 +512,7 @@ interface IORMTable { * * @param string $name * - * @return boolean + * @return bool */ public function canHaveField( $name ); } diff --git a/includes/db/LBFactory.php b/includes/db/LBFactory.php index eca9564903..bea195beca 100644 --- a/includes/db/LBFactory.php +++ b/includes/db/LBFactory.php @@ -179,7 +179,7 @@ abstract class LBFactory { * Private helper for forEachLBCallMethod * @param LoadBalancer $loadBalancer * @param string $methodName - * @param $args + * @param array $args */ function callMethod( $loadBalancer, $methodName, $args ) { call_user_func_array( array( $loadBalancer, $methodName ), $args ); diff --git a/includes/db/LBFactorySingle.php b/includes/db/LBFactorySingle.php index 66e9d12758..62195736d0 100644 --- a/includes/db/LBFactorySingle.php +++ b/includes/db/LBFactorySingle.php @@ -62,7 +62,7 @@ class LBFactorySingle extends LBFactory { } /** - * @param string $cluster external storage cluster, or false for core + * @param string $cluster External storage cluster, or false for core * @param bool|string $wiki Wiki ID, or false for the current wiki * @return LoadBalancerSingle */ @@ -87,7 +87,7 @@ class LoadBalancerSingle extends LoadBalancer { protected $db; /** - * @param $params array + * @param array $params */ function __construct( $params ) { $this->db = $params['connection']; diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index aab04864bb..38c3d2d9f1 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -113,7 +113,7 @@ class LoadBalancer { /** * Get or set arbitrary data used by the parent object, usually an LBFactory - * @param $x + * @param mixed $x * @return mixed */ function parentInfo( $x = null ) { @@ -369,8 +369,8 @@ class LoadBalancer { /** * Wait for a given slave to catch up to the master pos stored in $this - * @param $index - * @param $open bool + * @param int $index + * @param bool $open * @return bool */ protected function doWait( $index, $open = false ) { @@ -410,8 +410,8 @@ class LoadBalancer { * Get a connection by index * This is the main entry point for this class. * - * @param $i Integer: server index - * @param array $groups query groups + * @param int $i Server index + * @param array $groups Query groups * @param bool|string $wiki Wiki ID * * @throws MWException @@ -538,7 +538,7 @@ class LoadBalancer { * * @see LoadBalancer::getConnection() for parameter information * - * @param integer $db + * @param int $db * @param mixed $groups * @param bool|string $wiki * @return DBConnRef @@ -554,7 +554,7 @@ class LoadBalancer { * * @see LoadBalancer::getConnection() for parameter information * - * @param integer $db + * @param int $db * @param mixed $groups * @param bool|string $wiki * @return DBConnRef @@ -571,8 +571,8 @@ class LoadBalancer { * On error, returns false, and the connection which caused the * error will be available via $this->mErrorConnection. * - * @param $i Integer server index - * @param bool|string $wiki wiki ID to open + * @param int $i Server index + * @param bool|string $wiki Wiki ID to open * @return DatabaseBase * * @access private @@ -619,8 +619,8 @@ class LoadBalancer { * On error, returns false, and the connection which caused the * error will be available via $this->mErrorConnection. * - * @param $i Integer: server index - * @param string $wiki wiki ID to open + * @param int $i Server index + * @param string $wiki Wiki ID to open * @return DatabaseBase */ function openForeignConnection( $i, $wiki ) { @@ -683,7 +683,7 @@ class LoadBalancer { /** * Test if the specified index represents an open connection * - * @param $index Integer: server index + * @param int $index Server index * @access private * @return bool */ @@ -700,8 +700,8 @@ class LoadBalancer { * Returns a Database object whether or not the connection was successful. * @access private * - * @param $server - * @param $dbNameOverride bool + * @param array $server + * @param bool $dbNameOverride * @throws MWException * @return DatabaseBase */ @@ -811,8 +811,8 @@ class LoadBalancer { /** * Return the server info structure for a given index, or false if the index is invalid. - * @param $i - * @return bool + * @param int $i + * @return array|bool */ function getServerInfo( $i ) { if ( isset( $this->mServers[$i] ) ) { @@ -825,8 +825,8 @@ class LoadBalancer { /** * Sets the server info structure for the given index. Entry at index $i * is created if it doesn't exist - * @param $i - * @param $serverInfo + * @param int $i + * @param array $serverInfo */ function setServerInfo( $i, $serverInfo ) { $this->mServers[$i] = $serverInfo; @@ -993,8 +993,8 @@ class LoadBalancer { } /** - * @param $value null - * @return Mixed + * @param mixed $value + * @return mixed */ function waitTimeout( $value = null ) { return wfSetVar( $this->mWaitTimeout, $value ); diff --git a/includes/db/ORMResult.php b/includes/db/ORMResult.php index e4efc016a4..327d20d9e4 100644 --- a/includes/db/ORMResult.php +++ b/includes/db/ORMResult.php @@ -36,7 +36,7 @@ class ORMResult implements ORMIterator { protected $res; /** - * @var integer + * @var int */ protected $key; @@ -62,7 +62,7 @@ class ORMResult implements ORMIterator { } /** - * @param $row + * @param bool|object $row */ protected function setCurrent( $row ) { if ( $row === false ) { @@ -73,14 +73,14 @@ class ORMResult implements ORMIterator { } /** - * @return integer + * @return int */ public function count() { return $this->res->numRows(); } /** - * @return boolean + * @return bool */ public function isEmpty() { return $this->res->numRows() === 0; @@ -94,7 +94,7 @@ class ORMResult implements ORMIterator { } /** - * @return integer + * @return int */ public function key() { return $this->key; @@ -113,7 +113,7 @@ class ORMResult implements ORMIterator { } /** - * @return boolean + * @return bool */ public function valid() { return $this->current !== false; diff --git a/includes/db/ORMRow.php b/includes/db/ORMRow.php index 1d1120293a..b0bade3328 100644 --- a/includes/db/ORMRow.php +++ b/includes/db/ORMRow.php @@ -78,7 +78,7 @@ class ORMRow implements IORMRow { * * @param IORMTable|null $table Deprecated since 1.22 * @param array|null $fields - * @param boolean $loadDefaults Deprecated since 1.22 + * @param bool $loadDefaults Deprecated since 1.22 */ public function __construct( IORMTable $table = null, $fields = null, $loadDefaults = false ) { $this->table = $table; @@ -101,8 +101,8 @@ class ORMRow implements IORMRow { * @deprecated since 1.22 * * @param array|null $fields - * @param boolean $override - * @param boolean $skipLoaded + * @param bool $override + * @param bool $skipLoaded * * @return bool Success indicator */ @@ -145,7 +145,7 @@ class ORMRow implements IORMRow { * @since 1.20 * * @param string $name Field name - * @param $default mixed: Default value to return when none is found + * @param mixed $default Default value to return when none is found * (default: null) * * @throws MWException @@ -167,7 +167,7 @@ class ORMRow implements IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param $name string + * @param string $name * * @return mixed */ @@ -195,7 +195,7 @@ class ORMRow implements IORMRow { * * @since 1.20 * - * @return integer|null + * @return int|null */ public function getId() { return $this->getField( 'id' ); @@ -206,7 +206,7 @@ class ORMRow implements IORMRow { * * @since 1.20 * - * @param integer|null $id + * @param int|null $id */ public function setId( $id ) { $this->setField( 'id', $id ); @@ -219,7 +219,7 @@ class ORMRow implements IORMRow { * * @param string $name * - * @return boolean + * @return bool */ public function hasField( $name ) { return array_key_exists( $name, $this->fields ); @@ -230,7 +230,7 @@ class ORMRow implements IORMRow { * * @since 1.20 * - * @return boolean + * @return bool */ public function hasIdField() { return $this->hasField( 'id' ) && !is_null( $this->getField( 'id' ) ); @@ -278,7 +278,7 @@ class ORMRow implements IORMRow { * @since 1.20 * * @param array $fields The fields to set - * @param boolean $override Override already set fields with the provided values? + * @param bool $override Override already set fields with the provided values? */ public function setFields( array $fields, $override = true ) { foreach ( $fields as $name => $value ) { @@ -295,7 +295,7 @@ class ORMRow implements IORMRow { * @since 1.20 * * @param null|array $fields - * @param boolean $incNullId + * @param bool $incNullId * * @return array */ @@ -328,7 +328,7 @@ class ORMRow implements IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param boolean $override + * @param bool $override */ public function loadDefaults( $override = true ) { $this->setFields( $this->table->getDefaults(), $override ); @@ -343,7 +343,7 @@ class ORMRow implements IORMRow { * * @param string|null $functionName * - * @return boolean Success indicator + * @return bool Success indicator */ public function save( $functionName = null ) { if ( $this->hasIdField() ) { @@ -361,7 +361,7 @@ class ORMRow implements IORMRow { * * @param string|null $functionName * - * @return boolean Success indicator + * @return bool Success indicator */ protected function saveExisting( $functionName = null ) { $dbw = $this->table->getWriteDbConnection(); @@ -400,7 +400,7 @@ class ORMRow implements IORMRow { * @param string|null $functionName * @param array|null $options * - * @return boolean Success indicator + * @return bool Success indicator */ protected function insert( $functionName = null, array $options = null ) { $dbw = $this->table->getWriteDbConnection(); @@ -430,7 +430,7 @@ class ORMRow implements IORMRow { * @since 1.20 * @deprecated since 1.22, use IORMTable->removeRow * - * @return boolean Success indicator + * @return bool Success indicator */ public function remove() { $this->beforeRemove(); @@ -524,9 +524,9 @@ class ORMRow implements IORMRow { * @deprecated since 1.22, use IORMTable->addToField * * @param string $field - * @param integer $amount + * @param int $amount * - * @return boolean Success indicator + * @return bool Success indicator */ public function addToField( $field, $amount ) { return $this->table->addToField( $this->getUpdateConditions(), $field, $amount ); @@ -561,7 +561,7 @@ class ORMRow implements IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param boolean $update + * @param bool $update */ public function setUpdateSummaries( $update ) { $this->updateSummaries = $update; @@ -573,7 +573,7 @@ class ORMRow implements IORMRow { * @since 1.20 * @deprecated since 1.22 * - * @param boolean $summaryMode + * @param bool $summaryMode */ public function setSummaryMode( $summaryMode ) { $this->inSummaryMode = $summaryMode; diff --git a/includes/db/ORMTable.php b/includes/db/ORMTable.php index 3f91e0a33b..a06c12cf87 100644 --- a/includes/db/ORMTable.php +++ b/includes/db/ORMTable.php @@ -80,7 +80,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @since 1.20 * - * @var integer DB_ enum + * @var int DB_ enum */ protected $readDb = DB_SLAVE; @@ -311,7 +311,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param array|string|null $fields * @param array $conditions * @param array $options - * @param boolean $collapse Set to false to always return each result row as associative array. + * @param bool $collapse Set to false to always return each result row as associative array. * @param string|null $functionName * * @return array of array @@ -410,7 +410,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param array|string|null $fields * @param array $conditions * @param array $options - * @param boolean $collapse Set to false to always return each result row as associative array. + * @param bool $collapse Set to false to always return each result row as associative array. * @param string|null $functionName * * @return mixed|array|bool False on failure @@ -433,7 +433,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @param array $conditions * - * @return boolean + * @return bool */ public function has( array $conditions = array() ) { return $this->selectRow( array( 'id' ), $conditions ) !== false; @@ -444,7 +444,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @since 1.21 * - * @return boolean + * @return bool */ public function exists() { $dbr = $this->getReadDbConnection(); @@ -466,7 +466,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param array $conditions * @param array $options * - * @return integer + * @return int */ public function count( array $conditions = array(), array $options = array() ) { $res = $this->rawSelectRow( @@ -487,7 +487,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param array $conditions * @param string|null $functionName * - * @return boolean Success indicator + * @return bool Success indicator */ public function delete( array $conditions, $functionName = null ) { $dbw = $this->getWriteDbConnection(); @@ -508,8 +508,8 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @since 1.20 * - * @param boolean $requireParams - * @param boolean $setDefaults + * @param bool $requireParams + * @param bool $setDefaults * * @return array */ @@ -572,7 +572,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @since 1.20 * - * @return integer DB_ enum + * @return int DB_ enum */ public function getReadDb() { return $this->readDb; @@ -582,7 +582,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * Set the database ID to use for read operations, use DB_XXX constants or * an index to the load balancer setup. * - * @param integer $db + * @param int $db * * @since 1.20 */ @@ -595,7 +595,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @since 1.20 * - * @return String|bool The target wiki, in a form that LBFactory understands + * @return string|bool The target wiki, in a form that LBFactory understands * (or false if the local wiki is used) */ public function getTargetWiki() { @@ -668,7 +668,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param array $values * @param array $conditions * - * @return boolean Success indicator + * @return bool Success indicator */ public function update( array $values, array $conditions = array() ) { $dbw = $this->getWriteDbConnection(); @@ -919,7 +919,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @since 1.20 * * @param array $data - * @param boolean $loadDefaults + * @param bool $loadDefaults * * @return IORMRow */ @@ -933,7 +933,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @since 1.20 * * @param array $fields - * @param boolean $loadDefaults + * @param bool $loadDefaults * * @return IORMRow */ @@ -961,7 +961,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @param string $name * - * @return boolean + * @return bool */ public function canHaveField( $name ) { return array_key_exists( $name, $this->getFields() ); @@ -975,7 +975,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param IORMRow $row The row to save * @param string|null $functionName * - * @return boolean Success indicator + * @return bool Success indicator */ public function updateRow( IORMRow $row, $functionName = null ) { $dbw = $this->getWriteDbConnection(); @@ -1002,7 +1002,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param string|null $functionName * @param array|null $options * - * @return boolean Success indicator + * @return bool Success indicator */ public function insertRow( IORMRow $row, $functionName = null, array $options = null ) { $dbw = $this->getWriteDbConnection(); @@ -1068,7 +1068,7 @@ class ORMTable extends DBAccessBase implements IORMTable { * @param IORMRow $row * @param string|null $functionName * - * @return boolean Success indicator + * @return bool Success indicator */ public function removeRow( IORMRow $row, $functionName = null ) { $success = $this->delete( @@ -1087,9 +1087,9 @@ class ORMTable extends DBAccessBase implements IORMTable { * * @param array $conditions * @param string $field - * @param integer $amount + * @param int $amount * - * @return boolean Success indicator + * @return bool Success indicator * @throws MWException */ public function addToField( array $conditions, $field, $amount ) { diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 2eaf1fb0dc..1c7762b836 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -49,9 +49,9 @@ class CliInstaller extends Installer { /** * Constructor. * - * @param $siteName - * @param $admin - * @param $option Array + * @param string $siteName + * @param string $admin + * @param array $option */ function __construct( $siteName, $admin = null, array $option = array() ) { global $wgContLang; @@ -159,7 +159,7 @@ class CliInstaller extends Installer { } /** - * @param $params array + * @param array $params * * @return string */ diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 321884bd55..8a01b32b28 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -219,7 +219,7 @@ abstract class DatabaseInstaller { /** * Get the DBMS-specific options for LocalSettings.php generation. * - * @return String + * @return string */ abstract public function getLocalSettings(); @@ -267,7 +267,7 @@ abstract class DatabaseInstaller { /** * Perform database upgrades * - * @return Boolean + * @return bool */ public function doUpgrade() { $this->setupSchemaVars(); @@ -314,7 +314,7 @@ abstract class DatabaseInstaller { /** * Construct and initialise parent. * This is typically only called from Installer::getDBInstaller() - * @param $parent + * @param WebInstaller $parent */ public function __construct( $parent ) { $this->parent = $parent; @@ -324,7 +324,7 @@ abstract class DatabaseInstaller { * Convenience function. * Check if a named extension is present. * - * @param $name + * @param string $name * @return bool */ protected static function checkExtension( $name ) { @@ -333,7 +333,7 @@ abstract class DatabaseInstaller { /** * Get the internationalised name for this DBMS. - * @return String + * @return string */ public function getReadableName() { // Messages: config-type-mysql, config-type-postgres, config-type-sqlite, @@ -360,8 +360,8 @@ abstract class DatabaseInstaller { /** * Get a variable, taking local defaults into account. - * @param $var string - * @param $default null + * @param string $var + * @param mixed|null $default * @return mixed */ public function getVar( $var, $default = null ) { @@ -378,8 +378,8 @@ abstract class DatabaseInstaller { /** * Convenience alias for $this->parent->setVar() - * @param $name string - * @param $value mixed + * @param string $name + * @param mixed $value */ public function setVar( $name, $value ) { $this->parent->setVar( $name, $value ); @@ -388,10 +388,10 @@ abstract class DatabaseInstaller { /** * Get a labelled text box to configure a local variable. * - * @param $var string - * @param $label string - * @param $attribs array - * @param $helpData string + * @param string $var + * @param string $label + * @param array $attribs + * @param string $helpData * @return string */ public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) { @@ -415,10 +415,10 @@ abstract class DatabaseInstaller { * Get a labelled password box to configure a local variable. * Implements password hiding. * - * @param $var string - * @param $label string - * @param $attribs array - * @param $helpData string + * @param string $var + * @param string $label + * @param array $attribs + * @param string $helpData * @return string */ public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) { @@ -464,8 +464,7 @@ abstract class DatabaseInstaller { /** * Get a set of labelled radio buttons. * - * @param $params Array: - * Parameters are: + * @param array $params Parameters are: * var: The variable to be configured (required) * label: The message name for the label (required) * itemLabelPrefix: The message name prefix for the item labels (required) @@ -485,7 +484,7 @@ abstract class DatabaseInstaller { * Convenience function to set variables based on form data. * Assumes that variables containing "password" in the name are (potentially * fake) passwords. - * @param $varNames Array + * @param array $varNames * @return array */ public function setVarsFromRequest( $varNames ) { @@ -500,7 +499,7 @@ abstract class DatabaseInstaller { * Traditionally, this is done by testing for the existence of either * the revision table or the cur table. * - * @return Boolean + * @return bool */ public function needsUpgrade() { $status = $this->getConnection(); @@ -519,7 +518,7 @@ abstract class DatabaseInstaller { /** * Get a standard install-user fieldset. * - * @return String + * @return string */ public function getInstallUserBox() { return Html::openElement( 'fieldset' ) . @@ -554,7 +553,7 @@ abstract class DatabaseInstaller { * @param string|bool $noCreateMsg Message to display instead of the creation checkbox. * Set this to false to show a creation checkbox (default). * - * @return String + * @return string */ public function getWebUserBox( $noCreateMsg = false ) { $wrapperStyle = $this->getVar( '_SameAccount' ) ? 'display: none' : ''; diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index b7a718f2bf..82a358e0bf 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -232,9 +232,9 @@ abstract class DatabaseUpdater { /** * @since 1.19 * - * @param $tableName string - * @param $indexName string - * @param $sqlPath string + * @param string $tableName + * @param string $indexName + * @param string $sqlPath */ public function addExtensionIndex( $tableName, $indexName, $sqlPath ) { $this->extensionUpdates[] = array( 'addIndex', $tableName, $indexName, $sqlPath, true ); @@ -244,9 +244,9 @@ abstract class DatabaseUpdater { * * @since 1.19 * - * @param $tableName string - * @param $columnName string - * @param $sqlPath string + * @param string $tableName + * @param string $columnName + * @param string $sqlPath */ public function addExtensionField( $tableName, $columnName, $sqlPath ) { $this->extensionUpdates[] = array( 'addField', $tableName, $columnName, $sqlPath, true ); @@ -256,9 +256,9 @@ abstract class DatabaseUpdater { * * @since 1.20 * - * @param $tableName string - * @param $columnName string - * @param $sqlPath string + * @param string $tableName + * @param string $columnName + * @param string $sqlPath */ public function dropExtensionField( $tableName, $columnName, $sqlPath ) { $this->extensionUpdates[] = array( 'dropField', $tableName, $columnName, $sqlPath, true ); @@ -281,8 +281,8 @@ abstract class DatabaseUpdater { * * @since 1.20 * - * @param $tableName string - * @param $sqlPath string + * @param string $tableName + * @param string $sqlPath */ public function dropExtensionTable( $tableName, $sqlPath ) { $this->extensionUpdates[] = array( 'dropTable', $tableName, $sqlPath, true ); @@ -296,7 +296,7 @@ abstract class DatabaseUpdater { * @param string $tableName The table name * @param string $oldIndexName The old index name * @param string $newIndexName The new index name - * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the old + * @param bool $skipBothIndexExistWarning Whether to warn if both the old * and the new indexes exist. [facultative; by default, false] * @param string $sqlPath The path to the SQL change path */ @@ -329,7 +329,7 @@ abstract class DatabaseUpdater { * * @since 1.20 * - * @param $tableName string + * @param string $tableName * @return bool */ public function tableExists( $tableName ) { @@ -352,7 +352,7 @@ abstract class DatabaseUpdater { /** * Get the list of extension-defined updates * - * @return Array + * @return array */ protected function getExtensionUpdates() { return $this->extensionUpdates; @@ -371,6 +371,7 @@ abstract class DatabaseUpdater { * @since 1.21 * * Writes the schema updates desired to a file for the DB Admin to run. + * @param array $schemaUpdate */ private function writeSchemaUpdateFile( $schemaUpdate = array() ) { $updates = $this->updatesSkipped; @@ -423,9 +424,8 @@ abstract class DatabaseUpdater { /** * Helper function for doUpdates() * - * @param array $updates of updates to run - * @param bool $passSelf Whether to pass this object we calling external - * functions + * @param array $updates Array of updates to run + * @param bool $passSelf Whether to pass this object we calling external functions */ private function runUpdates( array $updates, $passSelf ) { $updatesDone = array(); @@ -507,7 +507,7 @@ abstract class DatabaseUpdater { * class does). Pre-1.17 wikis won't have this column, and really old wikis * might not even have updatelog at all * - * @return boolean + * @return bool */ protected function canUseNewUpdatelog() { return $this->db->tableExists( 'updatelog', __METHOD__ ) && @@ -627,7 +627,7 @@ abstract class DatabaseUpdater { * Applies a SQL patch * * @param string $path Path to the patch file - * @param $isFullPath Boolean Whether to treat $path as a relative or not + * @param bool $isFullPath Whether to treat $path as a relative or not * @param string $msg Description of the patch * @return bool False if patch is skipped. */ @@ -780,7 +780,7 @@ abstract class DatabaseUpdater { * @param string $table Name of the table to modify * @param string $oldIndex Old name of the index * @param string $newIndex New name of the index - * @param $skipBothIndexExistWarning Boolean: Whether to warn if both the + * @param bool $skipBothIndexExistWarning Whether to warn if both the * old and the new indexes exist. * @param string $patch Path to the patch file * @param bool $fullpath Whether to treat $patch path as a relative or not diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 48f850f8ac..372091a6c3 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -71,7 +71,7 @@ abstract class Installer { /** * Minimum memory size in MB. * - * @var integer + * @var int */ protected $minMemorySize = 50; @@ -326,19 +326,19 @@ abstract class Installer { * The parameters are like parameters to wfMessage(). * The messages will be in wikitext format, which will be converted to an * output format such as HTML or text before being sent to the user. - * @param $msg + * @param string $msg */ abstract public function showMessage( $msg /*, ... */ ); /** * Same as showMessage(), but for displaying errors - * @param $msg + * @param string $msg */ abstract public function showError( $msg /*, ... */ ); /** * Show a message to the installing user by using a Status object - * @param $status Status + * @param Status $status */ abstract public function showStatusMessage( Status $status ); @@ -448,8 +448,8 @@ abstract class Installer { /** * Set a MW configuration variable, or internal installer configuration variable. * - * @param $name String - * @param $value Mixed + * @param string $name + * @param mixed $value */ public function setVar( $name, $value ) { $this->settings[$name] = $value; @@ -460,8 +460,8 @@ abstract class Installer { * The defaults come from $GLOBALS (ultimately DefaultSettings.php). * Installer variables are typically prefixed by an underscore. * - * @param $name String - * @param $default Mixed + * @param string $name + * @param mixed $default * * @return mixed */ @@ -485,7 +485,7 @@ abstract class Installer { /** * Get an instance of DatabaseInstaller for the specified DB type. * - * @param $type Mixed: DB installer for which is needed, false to use default. + * @param mixed $type DB installer for which is needed, false to use default. * * @return DatabaseInstaller */ @@ -507,7 +507,7 @@ abstract class Installer { /** * Determine if LocalSettings.php exists. If it does, return its variables. * - * @return Array + * @return array */ public static function getExistingLocalSettings() { global $IP; @@ -532,7 +532,7 @@ abstract class Installer { * This is a security mechanism to avoid compromise of the password in the * event of session ID compromise. * - * @param $realPassword String + * @param string $realPassword * * @return string */ @@ -544,8 +544,8 @@ abstract class Installer { * Set a variable which stores a password, except if the new value is a * fake password in which case leave it as it is. * - * @param $name String - * @param $value Mixed + * @param string $name + * @param mixed $value */ public function setPassword( $name, $value ) { if ( !preg_match( '/^\*+$/', $value ) ) { @@ -591,9 +591,9 @@ abstract class Installer { * whatever, this function is guarded to catch the attempted DB access and to present * some fallback text. * - * @param $text String - * @param $lineStart Boolean - * @return String + * @param string $text + * @param bool $lineStart + * @return string */ public function parse( $text, $lineStart = false ) { global $wgParser; @@ -632,7 +632,7 @@ abstract class Installer { * Install step which adds a row to the site_stats table with appropriate * initial values. * - * @param $installer DatabaseInstaller + * @param DatabaseInstaller $installer * * @return Status */ @@ -969,7 +969,7 @@ abstract class Installer { /** * Helper function to be called from envCheckServer() - * @return String + * @return string */ abstract protected function envGetDefaultServer(); @@ -1120,7 +1120,7 @@ abstract class Installer { /** * Convert a hex string representing a Unicode code point to that code point. - * @param $c String + * @param string $c * @return string */ protected function unicodeChar( $c ) { @@ -1223,7 +1223,7 @@ abstract class Installer { * of known Unix-like defaults, as well as the PATH environment variable * (which should maybe make it work for Windows?) * - * @return Array + * @return array */ protected static function getPossibleBinPaths() { return array_merge( @@ -1242,9 +1242,9 @@ abstract class Installer { * * @param string $path path to search * @param array $names of executable names - * @param $versionInfo Boolean false or array with two members: - * 0 => Command to run for version check, with $1 for the full executable name - * 1 => String to compare the output with + * @param array|bool $versionInfo False or array with two members: + * 0 => Command to run for version check, with $1 for the full executable name + * 1 => String to compare the output with * * If $versionInfo is not false, only executables with a version * matching $versionInfo[1] will be returned. @@ -1282,8 +1282,8 @@ abstract class Installer { * @see locateExecutable() * @param array $names Array of possible names. * @param array|bool $versionInfo Default: false or array with two members: - * 0 => Command to run for version check, with $1 for the full executable name - * 1 => String to compare the output with + * 0 => Command to run for version check, with $1 for the full executable name + * 1 => String to compare the output with * * If $versionInfo is not false, only executables with a version * matching $versionInfo[1] will be returned. @@ -1304,8 +1304,8 @@ abstract class Installer { * Checks if scripts located in the given directory can be executed via the given URL. * * Used only by environment checks. - * @param $dir string - * @param $url string + * @param string $dir + * @param string $url * @return bool|int|string */ public function dirIsExecutable( $dir, $url ) { @@ -1370,7 +1370,7 @@ abstract class Installer { /** * ParserOptions are constructed before we determined the language, so fix it * - * @param $lang Language + * @param Language $lang */ public function setParserLanguage( $lang ) { $this->parserOptions->setTargetLanguage( $lang ); @@ -1379,7 +1379,7 @@ abstract class Installer { /** * Overridden by WebInstaller to provide lastPage parameters. - * @param $page string + * @param string $page * @return string */ protected function getDocUrl( $page ) { @@ -1464,7 +1464,7 @@ abstract class Installer { * There must be a config-install-$name message defined per step, which will * be shown on install. * - * @param $installer DatabaseInstaller so we can make callbacks + * @param DatabaseInstaller $installer DatabaseInstaller so we can make callbacks * @return array */ protected function getInstallSteps( DatabaseInstaller $installer ) { @@ -1518,7 +1518,7 @@ abstract class Installer { * @param array $startCB A callback array for the beginning of each step * @param array $endCB A callback array for the end of each step * - * @return Array of Status objects + * @return array Array of Status objects */ public function performInstallation( $startCB, $endCB ) { $installResults = array(); @@ -1567,7 +1567,7 @@ abstract class Installer { * Generate a secret value for variables using our CryptRand generator. * Produce a warning if the random source was insecure. * - * @param $keys Array + * @param array $keys * @return Status */ protected function doGenerateKeys( $keys ) { @@ -1637,7 +1637,7 @@ abstract class Installer { } /** - * @param $s Status + * @param Status $s */ private function subscribeToMediaWikiAnnounce( Status $s ) { $params = array( @@ -1668,7 +1668,7 @@ abstract class Installer { /** * Insert Main Page with default content. * - * @param $installer DatabaseInstaller + * @param DatabaseInstaller $installer * @return Status */ protected function createMainpage( DatabaseInstaller $installer ) { @@ -1733,7 +1733,7 @@ abstract class Installer { * * @param array $callback A valid installation callback array, in this form: * array( 'name' => 'some-unique-name', 'callback' => array( $obj, 'function' ) ); - * @param string $findStep the step to find. Omit to put the step at the beginning + * @param string $findStep The step to find. Omit to put the step at the beginning */ public function addInstallStep( $callback, $findStep = 'BEGINNING' ) { $this->extraInstallSteps[$findStep][] = $callback; diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index fe036adba9..4416aff863 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -43,7 +43,7 @@ class LocalSettingsGenerator { /** * Constructor. * - * @param $installer Installer subclass + * @param Installer $installer */ public function __construct( Installer $installer ) { $this->installer = $installer; @@ -105,9 +105,9 @@ class LocalSettingsGenerator { /** * Returns the escaped version of a string of php code. * - * @param $string String + * @param string $string * - * @return String + * @return string */ public static function escapePhpString( $string ) { if ( is_array( $string ) || is_object( $string ) ) { @@ -131,7 +131,7 @@ class LocalSettingsGenerator { * Return the full text of the generated LocalSettings.php file, * including the extensions * - * @return String + * @return string */ public function getText() { $localSettings = $this->getDefaultText(); @@ -164,7 +164,7 @@ class LocalSettingsGenerator { } /** - * @return String + * @return string */ protected function buildMemcachedServerList() { $servers = $this->values['_MemCachedServers']; @@ -185,7 +185,7 @@ class LocalSettingsGenerator { } /** - * @return String + * @return string */ protected function getDefaultText() { if ( !$this->values['wgImageMagickConvertCommand'] ) { diff --git a/includes/installer/MssqlInstaller.php b/includes/installer/MssqlInstaller.php index d6c84ebd37..248a6e41ad 100644 --- a/includes/installer/MssqlInstaller.php +++ b/includes/installer/MssqlInstaller.php @@ -66,7 +66,7 @@ class MssqlInstaller extends DatabaseInstaller { } /** - * @return Bool + * @return bool */ public function isCompiled() { return self::checkExtension( 'sqlsrv' ); @@ -615,7 +615,7 @@ class MssqlInstaller extends DatabaseInstaller { /** * Try to see if the login exists * @param string $user Username to check - * @return boolean + * @return bool */ private function loginExists( $user ) { $res = $this->db->selectField( 'sys.sql_logins', 1, array( 'name' => $user ) ); @@ -626,7 +626,7 @@ class MssqlInstaller extends DatabaseInstaller { * Try to see if the user account exists * We assume we already have the appropriate database selected * @param string $user Username to check - * @return boolean + * @return bool */ private function userExists( $user ) { $res = $this->db->selectField( 'sys.sysusers', 1, array( 'name' => $user ) ); @@ -636,7 +636,7 @@ class MssqlInstaller extends DatabaseInstaller { /** * Try to see if a given database exists * @param string $dbName Database name to check - * @return boolean + * @return bool */ private function databaseExists( $dbName ) { $res = $this->db->selectField( 'sys.databases', 1, array( 'name' => $dbName ) ); @@ -647,7 +647,7 @@ class MssqlInstaller extends DatabaseInstaller { * Try to see if a given schema exists * We assume we already have the appropriate database selected * @param string $schemaName Schema name to check - * @return boolean + * @return bool */ private function schemaExists( $schemaName ) { $res = $this->db->selectField( 'sys.schemas', 1, array( 'name' => $schemaName ) ); @@ -658,7 +658,7 @@ class MssqlInstaller extends DatabaseInstaller { * Try to see if a given fulltext catalog exists * We assume we already have the appropriate database selected * @param string $schemaName Catalog name to check - * @return boolean + * @return bool */ private function catalogExists( $catalogName ) { $res = $this->db->selectField( 'sys.fulltext_catalogs', 1, array( 'name' => $catalogName ) ); diff --git a/includes/installer/MysqlInstaller.php b/includes/installer/MysqlInstaller.php index 4c725286e2..10f66925fa 100644 --- a/includes/installer/MysqlInstaller.php +++ b/includes/installer/MysqlInstaller.php @@ -65,7 +65,7 @@ class MysqlInstaller extends DatabaseInstaller { } /** - * @return Bool + * @return bool */ public function isCompiled() { return self::checkExtension( 'mysql' ) || self::checkExtension( 'mysqli' ); @@ -603,7 +603,7 @@ class MysqlInstaller extends DatabaseInstaller { * Return a formal 'User'@'Host' username for use in queries * @param string $name Username, quotes will be added * @param string $host Hostname, quotes will be added - * @return String + * @return string */ private function buildFullUserName( $name, $host ) { return $this->db->addQuotes( $name ) . '@' . $this->db->addQuotes( $host ); @@ -614,7 +614,7 @@ class MysqlInstaller extends DatabaseInstaller { * access to mysql.user, so false means "no" or "maybe" * @param string $host Hostname to check * @param string $user Username to check - * @return boolean + * @return bool */ private function userDefinitelyExists( $host, $user ) { try { @@ -631,7 +631,7 @@ class MysqlInstaller extends DatabaseInstaller { * Return any table options to be applied to all tables that don't * override them. * - * @return String + * @return string */ protected function getTableOptions() { $options = array(); diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index 02116eada2..5e10af151c 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -259,7 +259,7 @@ class OracleUpdater extends DatabaseUpdater { /** * Overload: after this action field info table has to be rebuilt * - * @param $what array + * @param array $what */ public function doUpdates( $what = array( 'core', 'extensions', 'purge', 'stats' ) ) { parent::doUpdates( $what ); diff --git a/includes/installer/PostgresInstaller.php b/includes/installer/PostgresInstaller.php index 780431a4bf..9e25f47e8e 100644 --- a/includes/installer/PostgresInstaller.php +++ b/includes/installer/PostgresInstaller.php @@ -218,8 +218,7 @@ class PostgresInstaller extends DatabaseInstaller { * - create-tables: A connection with a role suitable for creating tables. * * @throws MWException - * @return Status object. On success, a connection object will be in the - * value member. + * @return Status On success, a connection object will be in the value member. */ protected function openPgConnection( $type ) { switch ( $type ) { @@ -414,7 +413,7 @@ class PostgresInstaller extends DatabaseInstaller { /** * Recursive helper for canCreateObjectsForWebUser(). - * @param $conn DatabaseBase object + * @param DatabaseBase $conn * @param int $targetMember Role ID of the member to look for * @param int $group Role ID of the group to look for * @param int $maxDepth Maximum recursive search depth diff --git a/includes/installer/SqliteInstaller.php b/includes/installer/SqliteInstaller.php index 19218c60a6..351b022329 100644 --- a/includes/installer/SqliteInstaller.php +++ b/includes/installer/SqliteInstaller.php @@ -50,7 +50,7 @@ class SqliteInstaller extends DatabaseInstaller { /** * - * @return Status: + * @return Status */ public function checkPrerequisites() { $result = Status::newGood(); @@ -98,7 +98,7 @@ class SqliteInstaller extends DatabaseInstaller { /** * Safe wrapper for PHP's realpath() that fails gracefully if it's unable to canonicalize the path. * - * @param $path string + * @param string $path * * @return string */ @@ -132,8 +132,8 @@ class SqliteInstaller extends DatabaseInstaller { } /** - * @param $dir - * @param $create bool + * @param string $dir + * @param bool $create * @return Status */ private static function dataDirOKmaybeCreate( $dir, $create = false ) { @@ -255,7 +255,7 @@ class SqliteInstaller extends DatabaseInstaller { } /** - * @param $status Status + * @param Status $status * @return Status */ public function setupSearchIndex( &$status ) { diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 42672ca353..d8975073c7 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -392,7 +392,7 @@ class WebInstaller extends Installer { /** * Show an error message in a box. Parameters are like wfMessage(). - * @param $msg + * @param string $msg */ public function showError( $msg /*...*/ ) { $args = func_get_args(); @@ -691,7 +691,7 @@ class WebInstaller extends Installer { * Get small text indented help for a preceding form field. * Parameters like wfMessage(). * - * @param $msg + * @param string $msg * @return string */ public function getHelpBox( $msg /*, ... */ ) { @@ -747,9 +747,9 @@ class WebInstaller extends Installer { * Label a control by wrapping a config-input div around it and putting a * label before it. * - * @param $msg - * @param $forId - * @param $contents + * @param string $msg + * @param string $forId + * @param string $contents * @param string $helpData * @return string */ @@ -1155,7 +1155,7 @@ class WebInstaller extends Installer { } /** - * @return String + * @return string */ protected function envGetDefaultServer() { return WebRequest::detectServer(); diff --git a/includes/installer/WebInstallerOutput.php b/includes/installer/WebInstallerOutput.php index e8b5b3bc46..cbfa34f241 100644 --- a/includes/installer/WebInstallerOutput.php +++ b/includes/installer/WebInstallerOutput.php @@ -43,7 +43,7 @@ class WebInstallerOutput { /** * Buffered contents that haven't been output yet - * @var String + * @var string */ private $contents = ''; @@ -127,7 +127,7 @@ class WebInstallerOutput { * * @param string $dir 'ltr' or 'rtl' * - * @return String + * @return string */ public function getCSS( $dir ) { // All CSS files these modules reference will be concatenated in sequence @@ -210,7 +210,7 @@ class WebInstallerOutput { /** * "" to index.php?css=foobar for the "" * - * @return String + * @return string */ private function getCssUrl() { return Html::linkedStyle( $_SERVER['PHP_SELF'] . '?css=' . $this->getDir() ); -- 2.20.1