/**
* File handle for SQL output.
*
- * @var Filehandle
+ * @var resource
*/
protected $fileHandle = null;
/**
* Constructor
*
- * @param $db DatabaseBase object to perform updates on
+ * @param DatabaseBase $db To perform updates on
* @param bool $shared Whether to perform updates on shared tables
- * @param $maintenance Maintenance Maintenance object which created us
+ * @param Maintenance $maintenance Maintenance object which created us
*/
protected function __construct( DatabaseBase &$db, $shared, Maintenance $maintenance = null ) {
$this->db = $db;
*
* @since 1.17
*
- * @param array $update the update to run. Format is the following:
+ * @param array $update The update to run. Format is the following:
* first item is the callback function, it also can be a
* simple string with the name of a function in this class,
* following elements are parameters to the function.
/**
* Do all the updates
*
- * @param array $what what updates to perform
+ * @param array $what What updates to perform
*/
public function doUpdates( $what = array( 'core', 'extensions', 'stats' ) ) {
global $wgVersion;
* Helper function for doUpdates()
*
* @param array $updates of updates to run
- * @param $passSelf Boolean: whether to pass this object we calling external
+ * @param bool $passSelf Whether to pass this object we calling external
* functions
*/
private function runUpdates( array $updates, $passSelf ) {
}
/**
- * @param $version
- * @param $updates array
+ * @param string $version
+ * @param array $updates
*/
protected function setAppliedUpdates( $version, $updates = array() ) {
$this->db->clearFlag( DBO_DDLMODE );
* Obviously, only use this for updates that occur after the updatelog table was
* created!
* @param string $key Name of the key to check for
- *
* @return bool
*/
public function updateRowExists( $key ) {
* Obviously, only use this for updates that occur after the updatelog table was
* created!
* @param string $key Name of key to insert
- * @param string $val [optional] value to insert along with the key
+ * @param string $val [optional] Value to insert along with the key
*/
public function insertUpdateRow( $key, $val = null ) {
$this->db->clearFlag( DBO_DDLMODE );
* Updates will be prevented if the table is a shared table and it is not
* specified to run updates on shared tables.
*
- * @param string $name table name
+ * @param string $name Table name
* @return bool
*/
protected function doTable( $name ) {
* 1.13...) with the values being arrays of updates, identical to how
* updaters.inc did it (for now)
*
- * @return Array
+ * @return array
*/
abstract protected function getCoreUpdateList();
*
* This is used as a callback for for sourceLine().
*
- * @param string $line text to append to the file
- * @return Boolean false to skip actually executing the file
+ * @param string $line Text to append to the file
+ * @return bool False to skip actually executing the file
* @throws MWException
*/
public function appendLine( $line ) {
* @param string $path Path to the patch file
* @param $isFullPath Boolean Whether to treat $path as a relative or not
* @param string $msg Description of the patch
- * @return boolean false if patch is skipped.
+ * @return bool False if patch is skipped.
*/
protected function applyPatch( $path, $isFullPath = false, $msg = null ) {
if ( $msg === null ) {
*
* @param string $name Name of the new table
* @param string $patch Path to the patch file
- * @param $fullpath Boolean Whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
protected function addTable( $name, $patch, $fullpath = false ) {
if ( !$this->doTable( $name ) ) {
* @param string $table Name of the table to modify
* @param string $field Name of the new field
* @param string $patch Path to the patch file
- * @param $fullpath Boolean Whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
protected function addField( $table, $field, $patch, $fullpath = false ) {
if ( !$this->doTable( $table ) ) {
* @param string $table Name of the table to modify
* @param string $index Name of the new index
* @param string $patch Path to the patch file
- * @param $fullpath Boolean Whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
protected function addIndex( $table, $index, $patch, $fullpath = false ) {
if ( !$this->doTable( $table ) ) {
* @param string $table Name of the table to modify
* @param string $field Name of the old field
* @param string $patch Path to the patch file
- * @param $fullpath Boolean Whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
protected function dropField( $table, $field, $patch, $fullpath = false ) {
if ( !$this->doTable( $table ) ) {
* @param string $table Name of the table to modify
* @param string $index Name of the index
* @param string $patch Path to the patch file
- * @param $fullpath Boolean: Whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
protected function dropIndex( $table, $index, $patch, $fullpath = false ) {
if ( !$this->doTable( $table ) ) {
* @param $skipBothIndexExistWarning Boolean: Whether to warn if both the
* old and the new indexes exist.
* @param string $patch Path to the patch file
- * @param $fullpath Boolean: Whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
protected function renameIndex( $table, $oldIndex, $newIndex,
$skipBothIndexExistWarning, $patch, $fullpath = false
*
* Public @since 1.20
*
- * @param $table string
- * @param $patch string|false
- * @param $fullpath bool
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param string $table Table to drop.
+ * @param string|bool $patch String of patch file that will drop the table. Default: false.
+ * @param bool $fullpath Whether $patch is a full path. Default: false.
+ * @return bool False if this was skipped because schema changes are skipped
*/
public function dropTable( $table, $patch = false, $fullpath = false ) {
if ( !$this->doTable( $table ) ) {
/**
* Modify an existing field
*
- * @param string $table name of the table to which the field belongs
- * @param string $field name of the field to modify
- * @param string $patch path to the patch file
- * @param $fullpath Boolean: whether to treat $patch path as a relative or not
- * @return Boolean false if this was skipped because schema changes are skipped
+ * @param string $table Name of the table to which the field belongs
+ * @param string $field Name of the field to modify
+ * @param string $patch Path to the patch file
+ * @param bool $fullpath Whether to treat $patch path as a relative or not
+ * @return bool False if this was skipped because schema changes are skipped
*/
public function modifyField( $table, $field, $patch, $fullpath = false ) {
if ( !$this->doTable( $table ) ) {
/**
* Constructor.
*
- * @param $request WebRequest
+ * @param WebRequest $request
*/
public function __construct( WebRequest $request ) {
parent::__construct();
*
* @param array $session initial session array
*
- * @return Array: new session array
+ * @return array New session array
*/
public function execute( array $session ) {
$this->session = $session;
/**
* Temporary error handler for session start debugging.
* @param $errno
- * @param $errstr string
+ * @param string $errstr
*/
public function errorHandler( $errno, $errstr ) {
$this->phpErrors[] = $errstr;
/**
* Get a URL for submission back to the same script.
*
- * @param $query array
+ * @param array $query
* @return string
*/
public function getUrl( $query = array() ) {
/**
* Get a WebInstallerPage by name.
*
- * @param $pageName String
+ * @param string $pageName
* @return WebInstallerPage
*/
public function getPageByName( $pageName ) {
/**
* Get a session variable.
*
- * @param $name String
+ * @param string $name
* @param $default
* @return null
*/
/**
* Set a session variable.
- * @param string $name key for the variable
- * @param $value Mixed
+ * @param string $name Key for the variable
+ * @param mixed $value
*/
public function setSession( $name, $value ) {
$this->session[$name] = $value;
/**
* Called by execute() before page output starts, to show a page list.
*
- * @param $currentPageName string
+ * @param string $currentPageName
*/
private function startPageWrapper( $currentPageName ) {
$s = "<div class=\"config-page-wrapper\">\n";
/**
* Get a list item for the page list.
*
- * @param $pageName string
- * @param $enabled boolean
- * @param $currentPageName string
+ * @param string $pageName
+ * @param bool $enabled
+ * @param string $currentPageName
*
* @return string
*/
/**
* Get HTML for an error box with an icon.
*
- * @param string $text wikitext, get this with wfMessage()->plain()
+ * @param string $text Wikitext, get this with wfMessage()->plain()
*
* @return string
*/
/**
* Get HTML for a warning box with an icon.
*
- * @param string $text wikitext, get this with wfMessage()->plain()
+ * @param string $text Wikitext, get this with wfMessage()->plain()
*
* @return string
*/
/**
* Get HTML for an info box with an icon.
*
- * @param string $text wikitext, get this with wfMessage()->plain()
- * @param string $icon icon name, file in skins/common/images
- * @param string $class additional class name to add to the wrapper div
+ * @param string $text Wikitext, get this with wfMessage()->plain()
+ * @param string|bool $icon Icon name, file in skins/common/images. Default: false
+ * @param string|bool $class Additional class name to add to the wrapper div. Default: false.
*
* @return string
*/
/**
* Output a help box.
- * @param string $msg key for wfMessage()
+ * @param string $msg Key for wfMessage()
*/
public function showHelpBox( $msg /*, ... */ ) {
$args = func_get_args();
* Show a short informational message.
* Output looks like a list.
*
- * @param $msg string
+ * @param string $msg
*/
public function showMessage( $msg /*, ... */ ) {
$args = func_get_args();
}
/**
- * @param $status Status
+ * @param Status $status
*/
public function showStatusMessage( Status $status ) {
$errors = array_merge( $status->getErrorsArray(), $status->getWarningsArray() );
* @param $msg
* @param $forId
* @param $contents
- * @param $helpData string
+ * @param string $helpData
* @return string
*/
public function label( $msg, $forId, $contents, $helpData = "" ) {
/**
* Get a labelled text box to configure a variable.
*
- * @param $params Array
+ * @param array $params
* Parameters are:
* var: The variable to be configured (required)
* label: The message name for the label (required)
/**
* Get a labelled textarea to configure a variable
*
- * @param $params Array
+ * @param array $params
* Parameters are:
* var: The variable to be configured (required)
* label: The message name for the label (required)
* Get a labelled password box to configure a variable.
*
* Implements password hiding
- * @param $params Array
+ * @param array $params
* Parameters are:
* var: The variable to be configured (required)
* label: The message name for the label (required)
/**
* Get a labelled checkbox to configure a boolean variable.
*
- * @param $params Array
+ * @param array $params
* Parameters are:
* var: The variable to be configured (required)
* label: The message name for the label (required)
/**
* Get a set of labelled radio buttons.
*
- * @param $params Array
+ * @param array $params
* Parameters are:
* var: The variable to be configured (required)
* label: The message name for the label (required)
/**
* Output an error or warning box using a Status object.
*
- * @param $status Status
+ * @param Status $status
*/
public function showStatusBox( $status ) {
if ( !$status->isGood() ) {
* Assumes that variables containing "password" in the name are (potentially
* fake) passwords.
*
- * @param $varNames Array
- * @param string $prefix the prefix added to variables to obtain form names
+ * @param array $varNames
+ * @param string $prefix The prefix added to variables to obtain form names
*
* @return array
*/
* @param $text
* @param $attribs
* @param $parser
- * @return String Html for download link
+ * @return string Html for download link
*/
public function downloadLinkHook( $text, $attribs, $parser ) {
$img = Html::element( 'img', array(