Merge "Improve param docs and add @var to clarify types"

This commit is contained in:
jenkins-bot 2019-02-17 01:29:48 +00:00 committed by Gerrit Code Review
commit 3fd6549ced
4 changed files with 13 additions and 7 deletions

View file

@ -9,7 +9,7 @@ class EchoUserLocator {
* *
* @param EchoEvent $event * @param EchoEvent $event
* @param int $batchSize * @param int $batchSize
* @return User[] * @return User[]|Iterator<User>
*/ */
public static function locateUsersWatchingTitle( EchoEvent $event, $batchSize = 500 ) { public static function locateUsersWatchingTitle( EchoEvent $event, $batchSize = 500 ) {
$title = $event->getTitle(); $title = $event->getTitle();

View file

@ -141,7 +141,7 @@ class ApiEchoNotifications extends ApiQueryBase {
* Internal method for getting the property 'list' data for individual section * Internal method for getting the property 'list' data for individual section
* @param User $user * @param User $user
* @param string $section 'alert' or 'message' * @param string $section 'alert' or 'message'
* @param string $filter 'all', 'read' or 'unread' * @param string[] $filter 'all', 'read' or 'unread'
* @param int $limit * @param int $limit
* @param string $continue * @param string $continue
* @param string $format * @param string $format
@ -184,7 +184,7 @@ class ApiEchoNotifications extends ApiQueryBase {
* of a set of sections or a single section * of a set of sections or a single section
* @param User $user * @param User $user
* @param string[] $eventTypes * @param string[] $eventTypes
* @param string $filter 'all', 'read' or 'unread' * @param string[] $filter 'all', 'read' or 'unread'
* @param int $limit * @param int $limit
* @param string $continue * @param string $continue
* @param string $format * @param string $format

View file

@ -1,6 +1,7 @@
<?php <?php
class EchoNotificationJob extends Job { class EchoNotificationJob extends Job {
/** @var int */
private $eventId; private $eventId;
public function __construct( $title, $params ) { public function __construct( $title, $params ) {

View file

@ -8,34 +8,39 @@ use MediaWiki\Logger\LoggerFactory;
*/ */
class EchoEvent extends EchoAbstractEntity implements Bundleable { class EchoEvent extends EchoAbstractEntity implements Bundleable {
/** @var string|null */
protected $type = null; protected $type = null;
/** @var string|null|false */
protected $id = null; protected $id = null;
/** @var string|null */
protected $variant = null; protected $variant = null;
/** /**
* @var User * @var User|null
*/ */
protected $agent = null; protected $agent = null;
/** /**
* Loaded dynamically on request * Loaded dynamically on request
* *
* @var Title * @var Title|null
*/ */
protected $title = null; protected $title = null;
/** @var int|null */
protected $pageId = null; protected $pageId = null;
/** /**
* Loaded dynamically on request * Loaded dynamically on request
* *
* @var Revision * @var Revision|null
*/ */
protected $revision = null; protected $revision = null;
/** @var array */
protected $extra = []; protected $extra = [];
/** /**
* Notification timestamp * Notification timestamp
* @var string * @var string|null
*/ */
protected $timestamp = null; protected $timestamp = null;