/**
* @todo FIXME: Don't know what the best format to have for this constructor
* is, but fourteen optional parameters certainly isn't it.
+ * @param string $address
+ * @param int $user
+ * @param int $by
+ * @param string $reason
+ * @param mixed $timestamp
+ * @param int $auto
+ * @param string $expiry
+ * @param int $anonOnly
+ * @param int $createAccount
+ * @param int $enableAutoblock
+ * @param int $hideName
+ * @param int $blockEmail
+ * @param int $allowUsertalk
+ * @param string $byText
*/
function __construct( $address = '', $user = 0, $by = 0, $reason = '',
$timestamp = 0, $auto = 0, $expiry = '', $anonOnly = 0, $createAccount = 0, $enableAutoblock = 0,
if ( !function_exists( 'gzdecode' ) ) {
/**
* @codeCoverageIgnore
+ * @param string $data
* @return string
*/
function gzdecode( $data ) {
/**
* Expand a document tree node, caching the result on its parent with the given key
+ * @param string|int $key
+ * @param string|PPNode $root
+ * @param int $flags
+ * @return string
*/
public function cachedExpand( $key, $root, $flags = 0 );
/**
* Expand a document tree node
+ * @param string|PPNode $root
+ * @param int $flags
+ * @return string
*/
public function expand( $root, $flags = 0 );
/**
* Implode with flags for expand()
+ * @param string $sep
+ * @param int $flags
+ * @param string|PPNode $args,...
+ * @return string
*/
public function implodeWithFlags( $sep, $flags /*, ... */ );
/**
* Implode with no flags specified
+ * @param string $sep
+ * @param string|PPNode $args,...
+ * @return string
*/
public function implode( $sep /*, ... */ );
/**
* Makes an object that, when expand()ed, will be the same as one obtained
* with implode()
+ * @param string $sep
+ * @param string|PPNode $args,...
+ * @return PPNode
*/
public function virtualImplode( $sep /*, ... */ );
/**
* Virtual implode with brackets
+ * @param string $start
+ * @param string $sep
+ * @param string $end
+ * @param string|PPNode $args,...
+ * @return PPNode
*/
public function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
/**
* Returns all arguments of this frame
+ * @return array
*/
public function getArguments();
/**
* Returns all numbered arguments of this frame
+ * @return array
*/
public function getNumberedArguments();
/**
* Returns all named arguments of this frame
+ * @return array
*/
public function getNamedArguments();
/**
* Get an argument to this frame by name
+ * @param string $name
+ * @return bool
*/
public function getArgument( $name );
/**
* Return true if the frame is a template frame
+ * @return bool
*/
public function isTemplate();
/**
* Get an array-type node containing the children of this node.
* Returns false if this is not a tree node.
+ * @return PPNode
*/
public function getChildren();
/**
* Get the next sibling of any node. False if there isn't one
+ * @return PPNode
*/
public function getNextSibling();
/**
* Get all children of this tree node which have a given name.
* Returns an array-type node, or false if this is not a tree node.
+ * @param string $type
+ * @return bool|PPNode
*/
public function getChildrenOfType( $type );
/**
* Returns an item of an array-type node
+ * @param int $i
+ * @return bool|PPNode
*/
public function item( $i );
* #nodelist An array-type node
*
* The subclass may define various other names for tree and leaf nodes.
+ * @return string
*/
public function getName();
* name PPNode name
* index String index
* value PPNode value
+ * @return array
*/
public function splitArg();
/**
* Split an "<ext>" node into an associative array containing name, attr, inner and close
* All values in the resulting array are PPNodes. Inner and close are optional.
+ * @return array
*/
public function splitExt();
/**
* Split an "<h>" node
+ * @return array
*/
public function splitHeading();
}
/**
* @param string $sep
* @param int $flags
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return string
*/
public function implodeWithFlags( $sep, $flags /*, ... */ ) {
* This previously called implodeWithFlags but has now been inlined to reduce stack depth
*
* @param string $sep
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return string
*/
public function implode( $sep /*, ... */ ) {
* with implode()
*
* @param string $sep
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return array
*/
public function virtualImplode( $sep /*, ... */ ) {
* @param string $start
* @param string $sep
* @param string $end
+ * @param string|PPNode_DOM|DOMDocument $args,...
* @return array
*/
public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
/**
* @param string $sep
* @param int $flags
+ * @param string|PPNode $args,...
* @return string
*/
public function implodeWithFlags( $sep, $flags /*, ... */ ) {
* Implode with no flags specified
* This previously called implodeWithFlags but has now been inlined to reduce stack depth
* @param string $sep
+ * @param string|PPNode $args,...
* @return string
*/
public function implode( $sep /*, ... */ ) {
* with implode()
*
* @param string $sep
+ * @param string|PPNode $args,...
* @return PPNode_Hash_Array
*/
public function virtualImplode( $sep /*, ... */ ) {
* @param string $start
* @param string $sep
* @param string $end
+ * @param string|PPNode $args,...
* @return PPNode_Hash_Array
*/
public function virtualBracketedImplode( $start, $sep, $end /*, ... */ ) {
/**
- * @param string $hash Name of hashing algorithm
+ * @param string $secretKeyMaterial
+ * @param string $algorithm Name of hashing algorithm
* @param BagOStuff $cache
* @param string|array $context Context to mix into HKDF context
*/
/**
* Private constructor
+ * @param string $fileName
+ * @param callable $callback
+ * @param array $options
*/
protected function __construct( $fileName, $callback, $options ) {
$this->fileName = $fileName;
/**
* Read the central directory at the given location
+ * @param int $offset
+ * @param int $size
*/
function readCentralDirectory( $offset, $size ) {
$block = $this->getBlock( $offset, $size );
/**
* Interpret ZIP64 "extra field" data and return an associative array.
+ * @param string $extraField
* @return array|bool
*/
function unpackZip64Extra( $extraField ) {
/**
* Get the size of a structure in bytes. See unpack() for the format of $struct.
+ * @param array $struct
* @return int
*/
function getStructSize( $struct ) {
/**
* Pass through result from $dateTimeObj->format()
+ * @param DateTime &$dateTimeObj
+ * @param string $ts
+ * @param DateTimeZone $zone
+ * @param string $code
+ * @return string
*/
private static function dateTimeObjFormat( &$dateTimeObj, $ts, $zone, $code ) {
if ( !$dateTimeObj ) {
/**
* Copy all rows from $srcTable to $dstTable
+ * @param string $srcTable
+ * @param string $dstTable
*/
function sync( $srcTable, $dstTable ) {
$batchSize = 1000;
/**
* @throws MWException Failure to parse XML input
+ * @param string $input
* @return bool
*/
function readDump( $input ) {
/**
* No help, it would just be misleading since it misses custom options
+ * @param bool $force
*/
protected function maybeHelp( $force = false ) {
if ( !$force ) {
/**
* @param string|bool $langCode See --lang-code option.
+ * @param array &$messageInfo
*/
protected function fetchMessageInfo( $langCode, array &$messageInfo ) {
global $wgContLang;
/**
* Get the hook documentation, either locally or from MediaWiki.org
+ * @param string $doc
* @return Array of documented hooks
*/
private function getHooksFromDoc( $doc ) {
*
* @param ResultWrapper $res Query result sorted by $column (ascending)
* @param string $column
+ * @param int $limit
* @return array (array of rows, string column value)
*/
protected function pageableSortedRows( ResultWrapper $res, $column, $limit ) {
* @author Rob Church <robchur@gmail.com>
*/
+/**
+ * @param bool $delete
+ */
function PurgeRedundantText( $delete = false ) {
# Data should come off the master, wrapped in a transaction
}
}
- /** @todo document */
+ /**
+ * @todo document
+ * @param int $start
+ * @param string $extdb
+ */
private function compressOldPages( $start = 0, $extdb = '' ) {
$chunksize = 50;
$this->output( "Starting from old_id $start...\n" );
/**
* Dispatch a command to a specified slave
+ * @param int $slaveId
+ * @param array|string $args
*/
function dispatchToSlave( $slaveId, $args ) {
$args = (array)$args;
/**
* Display a progress report
+ * @param string $label
+ * @param int $current
+ * @param int $end
*/
function report( $label, $current, $end ) {
$this->numBatches++;
/**
* Create a transaction from a RecompressTracked object
+ * @param RecompressTracked $parent
+ * @param string $blobClass
*/
function __construct( $parent, $blobClass ) {
$this->blobClass = $blobClass;
/**
* Resolve a history stub
+ * @param int $id
+ * @param string $stubText
+ * @param string $flags
*/
function resolveStub( $id, $stubText, $flags ) {
$fname = 'resolveStub';
* Substitute the backend name of storage paths with that of a given one
*
* @param array|string $paths List of paths or single string path
+ * @param FileBackend $backend
* @return array|string
*/
protected function replaceNamePaths( $paths, FileBackend $backend ) {
/**
* Return an SQL expression selecting rows which sort above the given row,
* assuming an ordering of cl_to, cl_type, cl_from
+ * @param stdClass $row
+ * @param DatabaseBase $dbw
*/
function getBatchCondition( $row, $dbw ) {
$fields = array( 'cl_to', 'cl_type', 'cl_from' );
private $mMode, $mReady;
- /** Constructor. Will show usage and exit if script options are not correct */
+ /**
+ * Constructor. Will show usage and exit if script options are not correct
+ * @param array $opts
+ * @param array $args
+ */
function __construct( $opts, $args ) {
if ( !$this->checkOpts( $opts, $args ) ) {
UserOptions::showUsageAndExit();
* @covers WikiImporter::handlePage
* @dataProvider getRedirectXML
* @param string $xml
+ * @param string|null $redirectTitle
*/
public function testHandlePageContainsRedirect( $xml, $redirectTitle ) {
$source = $this->getInputStreamSource( $xml );
/**
* Check that the parameter is a valid two element array,
* with the first element being API request and the second - expected result
+ * @param array $v
+ * @return array
*/
private function validateRequestExpectedPair( $v ) {
$this->assertType( 'array', $v, self::PARAM_ASSERT );
/**
* Recursively merges the expected values in the $item into the $all
+ * @param array &$all
+ * @param array $item
*/
private function mergeExpected( &$all, $item ) {
foreach ( $item as $k => $v ) {
* @param array $userOptions User options to test with. For example:
* array('searchNs5' => 1 );. Null to use default options.
* @param string $expectedProfile An expected search profile name
- * @param array $expectedNs Expected namespaces
+ * @param array $expectedNS Expected namespaces
+ * @param string $message
*/
public function testProfileAndNamespaceLoading( $requested, $userOptions,
$expectedProfile, $expectedNS, $message = 'Profile name and namespaces mismatches!'
/**
* Helper to create a new User object with given options
* User remains anonymous though
+ * @param array|null $opt
*/
function newUserWithSearchNS( $opt = null ) {
$u = User::newFromId( 0 );
* a thumbnail at all. That is merely returning a ThumbnailImage that
* will be consumed by the unit test. There is no need to create a real
* thumbnail on the filesystem.
+ * @param ImageHandler $that
+ * @param File $image
+ * @param string $dstPath
+ * @param string $dstUrl
+ * @param array $params
+ * @param int $flags
+ * @return ThumbnailImage
*/
static function doFakeTransform( $that, $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
# Example of what we receive: