diff options
Diffstat (limited to 'MLEB/Translate/utils/TranslateSandboxEmailJob.php')
-rw-r--r-- | MLEB/Translate/utils/TranslateSandboxEmailJob.php | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/MLEB/Translate/utils/TranslateSandboxEmailJob.php b/MLEB/Translate/utils/TranslateSandboxEmailJob.php index 1496bfda..7ffb7513 100644 --- a/MLEB/Translate/utils/TranslateSandboxEmailJob.php +++ b/MLEB/Translate/utils/TranslateSandboxEmailJob.php @@ -1,21 +1,29 @@ <?php class TranslateSandboxEmailJob extends Job { + /** + * @param array $params + * @return TranslateSandboxEmailJob + */ public static function newJob( array $params ) { return new self( Title::newMainPage(), $params ); } - function __construct( $title, $params, $id = 0 ) { - parent::__construct( __CLASS__, $title, $params, $id ); + /** + * @param Title $title + * @param array $params + */ + public function __construct( $title, $params ) { + parent::__construct( __CLASS__, $title, $params ); } - function run() { + public function run() { $status = UserMailer::send( $this->params['to'], $this->params['from'], $this->params['subj'], $this->params['body'], - $this->params['replyto'] + [ 'replyTo' => $this->params['replyto'] ] ); $isOK = $status->isOK(); @@ -24,7 +32,7 @@ class TranslateSandboxEmailJob extends Job { $user = User::newFromId( $this->params['user'] ); $reminders = $user->getOption( 'translate-sandbox-reminders' ); - $reminders = $reminders ? explode( '|', $reminders ) : array(); + $reminders = $reminders ? explode( '|', $reminders ) : []; $reminders[] = wfTimestamp(); $user->setOption( 'translate-sandbox-reminders', implode( '|', $reminders ) ); |