aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames D. Forrester <jforrester@wikimedia.org>2023-10-30 18:55:57 -0400
committerJforrester <jforrester@wikimedia.org>2023-11-06 14:45:45 +0000
commitb63c1de13115d0999969afb875e02e812ea6e9b2 (patch)
tree9c9112c69d056b5282039949134e9b6653a9c7f0
parent141cd5376bec932303250d4f6c9acf074e9cfe52 (diff)
downloadmediawikicore-b63c1de13115d0999969afb875e02e812ea6e9b2.tar.gz
mediawikicore-b63c1de13115d0999969afb875e02e812ea6e9b2.zip
mail: Inline @var types
Change-Id: Id191717c1b88cc00368e1c038627250e118b563b
-rw-r--r--includes/mail/EmailNotification.php35
-rw-r--r--includes/mail/EmailUser.php16
-rw-r--r--includes/mail/EmailUserFactory.php15
-rw-r--r--includes/mail/MailAddress.php16
4 files changed, 30 insertions, 52 deletions
diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php
index 006c7ef142e0..8afb63500463 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -71,44 +71,33 @@ class EmailNotification {
*/
private const ALL_CHANGES = 'all_changes';
- /** @var string */
- protected $subject = '';
+ protected string $subject = '';
- /** @var string */
- protected $body = '';
+ protected string $body = '';
- /** @var MailAddress|null */
- protected $replyto;
+ protected ?MailAddress $replyto;
- /** @var MailAddress|null */
- protected $from;
+ protected ?MailAddress $from;
- /** @var string|null */
- protected $timestamp;
+ protected ?string $timestamp;
- /** @var string */
- protected $summary = '';
+ protected string $summary = '';
- /** @var bool|null */
- protected $minorEdit;
+ protected ?bool $minorEdit;
/** @var int|null|bool */
protected $oldid;
- /** @var bool */
- protected $composed_common = false;
+ protected bool $composed_common = false;
- /** @var string */
- protected $pageStatus = '';
+ protected string $pageStatus = '';
/** @var MailAddress[] */
- protected $mailTargets = [];
+ protected array $mailTargets = [];
- /** @var Title */
- protected $title;
+ protected Title $title;
- /** @var User */
- protected $editor;
+ protected User $editor;
/**
* Extensions that have hooks for
diff --git a/includes/mail/EmailUser.php b/includes/mail/EmailUser.php
index 824b55cfe8b2..8ea90ccc90ee 100644
--- a/includes/mail/EmailUser.php
+++ b/includes/mail/EmailUser.php
@@ -56,24 +56,22 @@ class EmailUser {
MainConfigNames::UserEmailUseReplyTo,
];
- /** @var ServiceOptions */
private ServiceOptions $options;
- /** @var HookRunner */
+
private HookRunner $hookRunner;
- /** @var UserOptionsLookup */
+
private UserOptionsLookup $userOptionsLookup;
- /** @var CentralIdLookup */
+
private CentralIdLookup $centralIdLookup;
- /** @var UserFactory */
+
private UserFactory $userFactory;
- /** @var IEmailer */
+
private IEmailer $emailer;
- /** @var IMessageFormatterFactory */
+
private IMessageFormatterFactory $messageFormatterFactory;
- /** @var ITextFormatter */
+
private ITextFormatter $contLangMsgFormatter;
- /** @var Authority */
private Authority $sender;
/** @var string Temporary property to support the deprecated EmailUserPermissionsErrors hook */
diff --git a/includes/mail/EmailUserFactory.php b/includes/mail/EmailUserFactory.php
index 7f36c8b30fbf..9bb42a426165 100644
--- a/includes/mail/EmailUserFactory.php
+++ b/includes/mail/EmailUserFactory.php
@@ -36,21 +36,20 @@ use Wikimedia\Message\ITextFormatter;
* @since 1.41
*/
class EmailUserFactory {
- /** @var ServiceOptions */
private ServiceOptions $options;
- /** @var HookContainer */
+
private HookContainer $hookContainer;
- /** @var UserOptionsLookup */
+
private UserOptionsLookup $userOptionsLookup;
- /** @var CentralIdLookup */
+
private CentralIdLookup $centralIdLookup;
- /** @var UserFactory */
+
private UserFactory $userFactory;
- /** @var IEmailer */
+
private IEmailer $emailer;
- /** @var IMessageFormatterFactory */
+
private IMessageFormatterFactory $messageFormatterFactory;
- /** @var ITextFormatter */
+
private ITextFormatter $contLangMsgFormatter;
/**
diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php
index f4c33b1fecae..9936dbef1b56 100644
--- a/includes/mail/MailAddress.php
+++ b/includes/mail/MailAddress.php
@@ -34,20 +34,12 @@ use MediaWiki\Mail\UserEmailContact;
* @newable
*/
class MailAddress {
- /**
- * @var string
- */
- public $name;
- /**
- * @var string
- */
- public $realName;
+ public string $name;
- /**
- * @var string
- */
- public $address;
+ public string $realName;
+
+ public string $address;
/**
* @stable to call