}
/**
- * @return stdClass|array|false
+ * @return stdClass|array|bool
*/
function current() {
if ( is_null( $this->currentRow ) ) {
/**
* Callers want to be able to access fields with $this->fieldName
- * @return false|stdClass
+ * @return bool|stdClass
*/
function fetchObject() {
$this->fetchRow();
}
/**
- * @return false|stdClass
+ * @return bool|stdClass
*/
function next() {
return $this->fetchObject();
/**
* Return values for <html> element
- * @return array of associative name-to-value elements for <html> element
+ * @return array Array of associative name-to-value elements for <html> element
*/
public function getHtmlElementAttributes() {
$lang = $this->getLanguage();
* Get a legacy skin which uses the autodiscovery mechanism.
*
* @param string $name
- * @return Skin|bool false if the skin couldn't be constructed
+ * @return Skin|bool False if the skin couldn't be constructed
*/
private function getLegacySkin( $name ) {
$skinNames = $this->getLegacySkinNames();
* Get the list of variants supported by this language
* see sample implementation in LanguageZh.php
*
- * @return array an array of language codes
+ * @return array An array of language codes
*/
public function getVariants() {
return $this->mConverter->getVariants();
*
* @since 1.22
* @param string $code Language code
- * @return array array( fallbacks, site fallbacks )
+ * @return array Array( fallbacks, site fallbacks )
*/
public static function getFallbacksIncludingSiteLanguage( $code ) {
global $wgLanguageCode;
*
* @since 1.19
* @param string $code Language code
- * @return array of message keys (strings)
+ * @return array Array of message keys (strings)
*/
public static function getMessageKeysFor( $code ) {
return self::getLocalisationCache()->getSubItemList( $code, 'messages' );
/**
* Get the hook documentation, either locally or from MediaWiki.org
* @param string $doc
- * @return Array of documented hooks
+ * @return array Array of documented hooks
*/
private function getHooksFromDoc( $doc ) {
if ( $this->hasOption( 'online' ) ) {
/**
* Get hooks from a local file (for example docs/hooks.txt)
* @param string $doc Filename to look in
- * @return Array of documented hooks
+ * @return array Array of documented hooks
*/
private function getHooksFromLocalDoc( $doc ) {
$m = array();
/**
* Get hooks from www.mediawiki.org using the API
- * @return Array of documented hooks
+ * @return array Array of documented hooks
*/
private function getHooksFromOnlineDoc() {
// All hooks
/**
* Get hooks from a PHP file
* @param string $file Full filename to the PHP file.
- * @return Array of hooks found.
+ * @return array Array of hooks found
*/
private function getHooksFromFile( $file ) {
$content = file_get_contents( $file );
/**
* Get hooks from the source code.
* @param string $path Directory where the include files can be found
- * @return Array of hooks found.
+ * @return array Array of hooks found
*/
private function getHooksFromPath( $path ) {
$hooks = array();
/**
* Get bad hooks (where the hook name could not be determined) from a PHP file
* @param string $file Full filename to the PHP file.
- * @return Array of bad wfRunHooks() lines
+ * @return array Array of bad wfRunHooks() lines
*/
private function getBadHooksFromFile( $file ) {
$content = file_get_contents( $file );
/**
* Get bad hooks from the source code.
* @param string $path Directory where the include files can be found
- * @return Array of bad wfRunHooks() lines
+ * @return array Array of bad wfRunHooks() lines
*/
private function getBadHooksFromPath( $path ) {
$hooks = array();
* Will throw exceptions on SQL errors
* @param array|string $files
* @throws MWException
- * @return True if no error or error string in case of errors
+ * @return bool True if no error or error string in case of errors
*/
public static function checkSqlSyntax( $files ) {
if ( !Sqlite::isPresent() ) {
/**
* Print a skipped message.
*
- * @return boolean
+ * @return bool
*/
protected function showSkipped() {
if ( $this->showProgress ) {
}
/**
- * @return array of arrays with values;
+ * @return array Array of arrays with values;
* 0 => status object
* 1 => expected string (with no context)
*/
}
/**
- * @return array of arrays with values;
+ * @return array Array of arrays with values;
* 0 => status object
* 1 => expected Message parameters (with no context)
* 2 => expected Message key
* @param string $text Content of the page
* @param string $summary Optional summary string for the revision
* @param int $defaultNs Optional namespace id
- * @return Array as returned by WikiPage::doEditContent()
+ * @return array Array as returned by WikiPage::doEditContent()
*/
protected function editPage( $pageName, $text, $summary = '', $defaultNs = NS_MAIN ) {
$title = Title::newFromText( $pageName, $defaultNs );
* @param array $params Key-value API params
* @param array|null $session Session array
* @param User|null $user A User object for the context
- * @return Result of the API call
+ * @return array Result of the API call
* @throws Exception In case wsToken is not set in the session
*/
protected function doApiRequestWithToken( array $params, array $session = null,
* This is used when simulating a rotated image capture with Exif orientation
* @param array $spec Returned by getImageSpec
* @param array $matrix 2x2 transformation matrix
- * @return array transformed Spec
+ * @return array Transformed Spec
*/
private static function rotateImageSpec( &$spec, $matrix ) {
$tSpec = array();
* @param array $matrix 2x2 rotation matrix
* @param int $x The x-coordinate number
* @param int $y The y-coordinate number
- * @return Transformed with properties x, y
+ * @return array Transformed with properties x, y
*/
private static function matrixMultiply2x2( $matrix, $x, $y ) {
return array(
* array( array( 'foo', 'bar' ), array( 'quux', 'baz' ) );
*
* @param int $number Number of pairs
- * @return array two-element arrays
+ * @return array Two-element arrays
*/
private function getRandomWordPairs( $number ) {
$lines = $this->getRandomLines( $number * 2 );
* @param int $number_desired Number of lines desired
*
* @throws Exception
- * @return Array of exactly n elements, drawn randomly from lines the file
+ * @return array Array of exactly n elements, drawn randomly from lines the file
*/
private function getRandomLines( $number_desired ) {
$filepath = $this->dictionaryFile;
* @param int $expectedCount Max number of iterations
* @param string $id Unit test id
* @param bool $continue True to use smart continue
- * @return Merged results data array
+ * @return array Merged results data array
*/
protected function checkC( $expected, $params, $expectedCount, $id, $continue = true ) {
$result = $this->query( $params, $expectedCount, $id, $continue );
* @param int $expectedCount Max number of iterations
* @param string $id Unit test id
* @param bool $useContinue True to use smart continue
- * @return Merged results data array
+ * @return array Merged results data array
* @throws Exception
*/
protected function query( $params, $expectedCount, $id, $useContinue = true ) {
* Returns native represenation of the data. Interpretation depends on the data model used,
* as given by getDataModel().
*
- * @return mixed the native representation of the content. Could be a string, a nested array
+ * @return mixed The native representation of the content. Could be a string, a nested array
* structure, an object, a binary blob... anything, really.
*/
public function getNativeData() {
* return $this. That is, $copy === $original may be true, but only for imutable content
* objects.
*
- * @return Content. A copy of this object.
+ * @return Content A copy of this object
*/
public function copy() {
return $this;
/**
* @since 1.20
- * @return array of IORMRow
+ * @return array Array of IORMRow
*/
public function instanceProvider() {
$instances = array();
}
/**
- * @return int[] revision ids
+ * @return int[] Revision ids
*/
protected function doEdits() {
$title = $this->getTitle();
}
/**
- * @return Array Argument for FSRepo constructor
+ * @return array Argument for FSRepo constructor
*/
protected function getRepoOptions() {
return array(
* The result of this method will set the file path to use,
* as well as the protected member $filePath
*
- * @return String path where files are
+ * @return string Path where files are
*/
protected function getFilePath() {
return __DIR__ . '/../../data/media/';
*
* Override this method if your test case creates thumbnails
*
- * @return boolean
+ * @return bool
*/
protected function createsThumbnails() {
return false;
}
/**
- * @return array format is ($len, $ellipsis, $input, $expected)
+ * @return array Format is ($len, $ellipsis, $input, $expected)
*/
public static function provideHTMLTruncateData() {
return array(
* revision id increase further and further, while the text
* id of the first iteration is reused. The pages and revision
* of iteration > 1 have no corresponding representation in the database.
- * @return string absolute filename of the stub
+ * @return string Absolute filename of the stub
*/
private function setUpStub( $fname = null, $iterations = 1 ) {
if ( $fname === null ) {