mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Cleanup code, improve typings
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace common\models\confirmations;
|
||||
|
||||
use common\models\EmailActivation;
|
||||
use common\models\EmailActivationQuery;
|
||||
use yii\helpers\ArrayHelper;
|
||||
|
||||
class ForgotPassword extends EmailActivation {
|
||||
|
||||
public function behaviors() {
|
||||
public static function find(): EmailActivationQuery {
|
||||
return parent::find()->withType(EmailActivation::TYPE_FORGOT_PASSWORD_KEY);
|
||||
}
|
||||
|
||||
public function behaviors(): array {
|
||||
return ArrayHelper::merge(parent::behaviors(), [
|
||||
'expirationBehavior' => [
|
||||
'repeatTimeout' => 30 * 60,
|
||||
@@ -15,7 +22,7 @@ class ForgotPassword extends EmailActivation {
|
||||
]);
|
||||
}
|
||||
|
||||
public function init() {
|
||||
public function init(): void {
|
||||
parent::init();
|
||||
$this->type = EmailActivation::TYPE_FORGOT_PASSWORD_KEY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user