Merge "Improve docs about @param/@return object $row to stdClass"
This commit is contained in:
commit
4acef2dd82
24 changed files with 44 additions and 44 deletions
|
|
@ -174,7 +174,7 @@ class Category {
|
|||
/**
|
||||
* Factory function, for constructing a Category object from a result set
|
||||
*
|
||||
* @param object $row Result set row, must contain the cat_xxx fields. If the
|
||||
* @param stdClass $row Result set row, must contain the cat_xxx fields. If the
|
||||
* fields are null, the resulting Category object will represent an empty
|
||||
* category if a title object was given. If the fields are null and no
|
||||
* title was given, this method fails and returns false.
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ class CommentStore {
|
|||
* @param IDatabase|null $db Database handle for getCommentLegacy(), or null for getComment()
|
||||
* @param string $key A key such as "rev_comment" identifying the comment
|
||||
* field being fetched.
|
||||
* @param object|array $row
|
||||
* @param stdClass|array $row
|
||||
* @param bool $fallback
|
||||
* @return CommentStoreComment
|
||||
*/
|
||||
|
|
@ -373,7 +373,7 @@ class CommentStore {
|
|||
* @since 1.31 Method signature changed, $key parameter added (required since 1.35)
|
||||
* @param string $key A key such as "rev_comment" identifying the comment
|
||||
* field being fetched.
|
||||
* @param object|array|null $row Result row.
|
||||
* @param stdClass|array|null $row Result row.
|
||||
* @param bool $fallback If true, fall back as well as possible instead of throwing an exception.
|
||||
* @return CommentStoreComment
|
||||
*/
|
||||
|
|
@ -401,7 +401,7 @@ class CommentStore {
|
|||
* @param IDatabase $db Database handle to use for lookup
|
||||
* @param string $key A key such as "rev_comment" identifying the comment
|
||||
* field being fetched.
|
||||
* @param object|array|null $row Result row.
|
||||
* @param stdClass|array|null $row Result row.
|
||||
* @param bool $fallback If true, fall back as well as possible instead of throwing an exception.
|
||||
* @return CommentStoreComment
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class FeedUtils {
|
|||
/**
|
||||
* Format a diff for the newsfeed
|
||||
*
|
||||
* @param object $row Row from the recentchanges table, including fields as
|
||||
* @param stdClass $row Row from the recentchanges table, including fields as
|
||||
* appropriate for CommentStore
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class Revision implements IDBAccessObject {
|
|||
*
|
||||
* @deprecated since 1.31 (soft), 1.35 (hard)
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param array $overrides
|
||||
*
|
||||
* @throws MWException
|
||||
|
|
@ -231,7 +231,7 @@ class Revision implements IDBAccessObject {
|
|||
* but should be avoided.
|
||||
*
|
||||
* @deprecated since 1.31 together with the Revision class. Hard deprecated since 1.35
|
||||
* @param object|array $row
|
||||
* @param stdClass|array $row
|
||||
* @return Revision
|
||||
*/
|
||||
public static function newFromRow( $row ) {
|
||||
|
|
@ -353,7 +353,7 @@ class Revision implements IDBAccessObject {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param object|array|RevisionRecord $row Either a database row or an array
|
||||
* @param stdClass|array|RevisionRecord $row Either a database row or an array
|
||||
* @param int $queryFlags
|
||||
* @param Title|null $title
|
||||
*
|
||||
|
|
@ -400,7 +400,7 @@ class Revision implements IDBAccessObject {
|
|||
* Make sure we have *some* Title object for use by the constructor.
|
||||
* For B/C, the constructor shouldn't fail even for a bad page ID or bad revision ID.
|
||||
*
|
||||
* @param array|object $row
|
||||
* @param array|stdClass $row
|
||||
* @param int $queryFlags
|
||||
* @param Title|null $title
|
||||
*
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ interface RevisionFactory extends IDBAccessObject {
|
|||
* MCR migration note: this replaces Revision::newFromRow for rows based on the
|
||||
* revision, slot, and content tables defined for MCR since MW1.31.
|
||||
*
|
||||
* @param object $row A query result row as a raw object.
|
||||
* @param \stdClass $row A query result row as a raw object.
|
||||
* Use RevisionStore::getQueryInfo() to build a query that yields the required fields.
|
||||
* @param int $queryFlags Flags for lazy loading behavior, see IDBAccessObject::READ_XXX.
|
||||
* @param Title|null $title A title object for the revision.
|
||||
|
|
@ -85,7 +85,7 @@ interface RevisionFactory extends IDBAccessObject {
|
|||
*
|
||||
* MCR migration note: this replaces Revision::newFromArchiveRow
|
||||
*
|
||||
* @param object $row A query result row as a raw object.
|
||||
* @param \stdClass $row A query result row as a raw object.
|
||||
* Use RevisionStore::getArchiveQueryInfo() to build a query that yields the
|
||||
* required fields.
|
||||
* @param int $queryFlags Flags for lazy loading behavior, see IDBAccessObject::READ_XXX.
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ class SiteStats {
|
|||
*
|
||||
* Checks only fields which are filled by SiteStatsInit::refresh.
|
||||
*
|
||||
* @param bool|object $row
|
||||
* @param bool|stdClass $row
|
||||
* @return bool
|
||||
*/
|
||||
private static function isRowSane( $row ) {
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class XmlDumpWriter {
|
|||
* Opens a "<page>" section on the output stream, with data
|
||||
* from the given database row.
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @return string
|
||||
*/
|
||||
public function openPage( $row ) {
|
||||
|
|
@ -331,7 +331,7 @@ class XmlDumpWriter {
|
|||
* Dumps a "<revision>" section on the output stream, with
|
||||
* data filled in from the given database row.
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param null|object[] $slotRows
|
||||
*
|
||||
* @return string
|
||||
|
|
@ -577,7 +577,7 @@ class XmlDumpWriter {
|
|||
* Dumps a "<logitem>" section on the output stream, with
|
||||
* data filled in from the given database row.
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @return string
|
||||
*/
|
||||
public function writeLogItem( $row ) {
|
||||
|
|
@ -649,7 +649,7 @@ class XmlDumpWriter {
|
|||
|
||||
/**
|
||||
* Warning! This data is potentially inconsistent. :(
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param bool $dumpContents
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ class LocalFile extends File {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array|object $row
|
||||
* @param array|stdClass $row
|
||||
* @param string $prefix
|
||||
* @throws MWException
|
||||
* @return array
|
||||
|
|
@ -573,7 +573,7 @@ class LocalFile extends File {
|
|||
/**
|
||||
* Decode a row from the database (either object or array) to an array
|
||||
* with timestamps and MIME types decoded, and the field prefix removed.
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param string $prefix
|
||||
* @throws MWException
|
||||
* @return array
|
||||
|
|
@ -622,7 +622,7 @@ class LocalFile extends File {
|
|||
* Load file metadata from a DB result row
|
||||
* @stable to override
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param string $prefix
|
||||
*/
|
||||
public function loadFromRow( $row, $prefix = 'img_' ) {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @return string
|
||||
*/
|
||||
public function formatRow( $row ) {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class WikiPage implements Page, IDBAccessObject {
|
|||
* Constructor from a database row
|
||||
*
|
||||
* @since 1.20
|
||||
* @param object $row Database row containing at least fields returned by getQueryInfo().
|
||||
* @param stdClass $row Database row containing at least fields returned by getQueryInfo().
|
||||
* @param string|int $from Source of $data:
|
||||
* - "fromdb" or WikiPage::READ_NORMAL: from a replica DB
|
||||
* - "fromdbmaster" or WikiPage::READ_LATEST: from the master DB
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class WikiPageFactory {
|
|||
/**
|
||||
* Create a WikiPage object from a database row
|
||||
*
|
||||
* @param object $row Database row containing at least fields returned by getQueryInfo().
|
||||
* @param \stdClass $row Database row containing at least fields returned by getQueryInfo().
|
||||
* @param string|int $from Source of $data:
|
||||
* - "fromdb" or WikiPage::READ_NORMAL: from a replica DB
|
||||
* - "fromdbmaster" or WikiPage::READ_LATEST: from the master DB
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ abstract class TablePager extends IndexPager {
|
|||
*
|
||||
* @stable to override
|
||||
*
|
||||
* @param object $row The database result row
|
||||
* @param stdClass $row The database result row
|
||||
* @return string
|
||||
*/
|
||||
protected function getRowClass( $row ) {
|
||||
|
|
@ -231,7 +231,7 @@ abstract class TablePager extends IndexPager {
|
|||
*
|
||||
* @stable to override
|
||||
*
|
||||
* @param object $row The database result row
|
||||
* @param stdClass $row The database result row
|
||||
* @return array Array of attribute => value
|
||||
*/
|
||||
protected function getRowAttrs( $row ) {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class BlockListPager extends TablePager {
|
|||
}
|
||||
'@phan-var string[] $msg';
|
||||
|
||||
/** @var object $row */
|
||||
/** @var stdClass $row */
|
||||
$row = $this->mCurrentRow;
|
||||
|
||||
$language = $this->getLanguage();
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ class ContribsPager extends RangeChronologicalPager {
|
|||
*
|
||||
* @deprecated since 1.35
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param Title|null $title
|
||||
* @return Revision|null
|
||||
*/
|
||||
|
|
@ -562,7 +562,7 @@ class ContribsPager extends RangeChronologicalPager {
|
|||
*
|
||||
* @since 1.35
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param Title|null $title
|
||||
* @return RevisionRecord|null
|
||||
*/
|
||||
|
|
@ -595,7 +595,7 @@ class ContribsPager extends RangeChronologicalPager {
|
|||
* was not written by the target user.
|
||||
*
|
||||
* @todo This would probably look a lot nicer in a table.
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @return string
|
||||
*/
|
||||
public function formatRow( $row ) {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ class ProtectedPagesPager extends TablePager {
|
|||
* @throws MWException
|
||||
*/
|
||||
public function formatValue( $field, $value ) {
|
||||
/** @var object $row */
|
||||
/** @var stdClass $row */
|
||||
$row = $this->mCurrentRow;
|
||||
$linkRenderer = $this->getLinkRenderer();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class BotPassword implements IDBAccessObject {
|
|||
private $flags = self::READ_NORMAL;
|
||||
|
||||
/**
|
||||
* @param object $row bot_passwords database row
|
||||
* @param stdClass $row bot_passwords database row
|
||||
* @param bool $isSaved Whether the bot password was read from the database
|
||||
* @param int $flags IDBAccessObject read flags
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class TitleCleanup extends TableCleanup {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
*/
|
||||
protected function processRow( $row ) {
|
||||
$display = Title::makeName( $row->page_namespace, $row->page_title );
|
||||
|
|
@ -88,7 +88,7 @@ class TitleCleanup extends TableCleanup {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
*/
|
||||
protected function moveIllegalPage( $row ) {
|
||||
$legal = 'A-Za-z0-9_/\\\\-';
|
||||
|
|
@ -130,7 +130,7 @@ class TitleCleanup extends TableCleanup {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param Title $title
|
||||
*/
|
||||
protected function moveInconsistentPage( $row, Title $title ) {
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class CleanupUsersWithNoId extends LoggedUpdateMaintenance {
|
|||
* Calculate a "next" condition and progress display string
|
||||
* @param IDatabase $dbw
|
||||
* @param string[] $indexFields Fields in the index being ordered by
|
||||
* @param object $row Database row
|
||||
* @param stdClass $row Database row
|
||||
* @return string[] [ string $next, string $display ]
|
||||
*/
|
||||
private function makeNextCond( $dbw, $indexFields, $row ) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ class DeduplicateArchiveRevId extends LoggedUpdateMaintenance {
|
|||
* Process a set of ar_rev_ids
|
||||
* @param IDatabase $dbw
|
||||
* @param int[] $arRevIds IDs to process
|
||||
* @param object[] $revRows Existing revision-table row data
|
||||
* @param stdClass[] $revRows Existing revision-table row data
|
||||
*/
|
||||
private function processArRevIds( IDatabase $dbw, array $arRevIds, array $revRows ) {
|
||||
// Select all the data we need for deduplication
|
||||
|
|
@ -198,7 +198,7 @@ class DeduplicateArchiveRevId extends LoggedUpdateMaintenance {
|
|||
|
||||
/**
|
||||
* Make a key identifying a "unique" change from a row
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @return string
|
||||
*/
|
||||
private function getSeenKey( $row ) {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class MigrateActors extends LoggedUpdateMaintenance {
|
|||
* Calculate a "next" condition and a display string
|
||||
* @param IDatabase $dbw
|
||||
* @param string[] $primaryKey Primary key of the table.
|
||||
* @param object $row Database row
|
||||
* @param stdClass $row Database row
|
||||
* @return array [ string $next, string $display ]
|
||||
*/
|
||||
private function makeNextCond( $dbw, $primaryKey, $row ) {
|
||||
|
|
@ -172,7 +172,7 @@ class MigrateActors extends LoggedUpdateMaintenance {
|
|||
* @suppress SecurityCheck-SQLInjection The array_keys/array_map is too much for static analysis
|
||||
* @param IDatabase $dbw
|
||||
* @param string $nameField
|
||||
* @param object[] &$rows
|
||||
* @param stdClass[] &$rows
|
||||
* @param array &$complainedAboutUsers
|
||||
* @param int &$countErrors
|
||||
* @return int Count of actors inserted
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ class PopulateContentTables extends Maintenance {
|
|||
* Compute any missing fields in $row.
|
||||
* The way the missing values are computed must correspond to the way this is done in SlotRecord.
|
||||
*
|
||||
* @param object $row to be modified
|
||||
* @param stdClass $row to be modified
|
||||
* @param string $model
|
||||
* @param string $address
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class RevisionArchiveRecordTest extends MediaWikiIntegrationTestCase {
|
|||
* @param Title $title
|
||||
* @param UserIdentity $user
|
||||
* @param CommentStoreComment $comment
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param RevisionSlots $slots
|
||||
* @param bool $wikiId
|
||||
*/
|
||||
|
|
@ -253,7 +253,7 @@ class RevisionArchiveRecordTest extends MediaWikiIntegrationTestCase {
|
|||
* @param Title $title
|
||||
* @param UserIdentity $user
|
||||
* @param CommentStoreComment $comment
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param RevisionSlots $slots
|
||||
* @param bool $wikiId
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class RevisionStoreRecordTest extends MediaWikiIntegrationTestCase {
|
|||
* @param Title $title
|
||||
* @param UserIdentity $user
|
||||
* @param CommentStoreComment $comment
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param RevisionSlots $slots
|
||||
* @param bool $wikiId
|
||||
*/
|
||||
|
|
@ -285,7 +285,7 @@ class RevisionStoreRecordTest extends MediaWikiIntegrationTestCase {
|
|||
* @param Title $title
|
||||
* @param UserIdentity $user
|
||||
* @param CommentStoreComment $comment
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param RevisionSlots $slots
|
||||
* @param bool $wikiId
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1858,7 +1858,7 @@ more stuff
|
|||
* @covers WikiPage::loadFromRow
|
||||
* @dataProvider provideNewFromRowSuccess
|
||||
*
|
||||
* @param object $row
|
||||
* @param stdClass $row
|
||||
* @param callable $assertions
|
||||
*/
|
||||
public function testNewFromRow( $row, $assertions ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue