@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function getExpirePeriod(): CarbonInterval |
| 25 | 25 | { |
| 26 | 26 | $minutes = (int)getenv($this->expirePeriodKey) ?: $this->defaultExpirePeriod; |
| 27 | - return CarbonInterval::minutes((int) $minutes); |
|
| 27 | + return CarbonInterval::minutes((int)$minutes); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function getVerifyLimit(): int |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | $numbers = range(0, 9); |
| 26 | 26 | |
| 27 | - return implode('', array_map(function () use (&$numbers) { |
|
| 27 | + return implode('', array_map(function() use (&$numbers) { |
|
| 28 | 28 | return array_rand($numbers); |
| 29 | 29 | }, range(1, $this->length))); |
| 30 | 30 | } |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | 'type' => [ |
| 50 | 50 | 'class' => AttributeBehavior::class, |
| 51 | 51 | 'attributes' => [ |
| 52 | - db\ActiveRecord::EVENT_INIT => ['type',], |
|
| 53 | - db\ActiveRecord::EVENT_BEFORE_VALIDATE => ['type',], |
|
| 52 | + db\ActiveRecord::EVENT_INIT => ['type', ], |
|
| 53 | + db\ActiveRecord::EVENT_BEFORE_VALIDATE => ['type', ], |
|
| 54 | 54 | ], |
| 55 | 55 | /** @see Token::getType() */ |
| 56 | 56 | 'value' => [$this, 'getType'] |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | public function rules(): array |
| 62 | 62 | { |
| 63 | 63 | return [ |
| 64 | - [['token', 'recipient',], 'required'], |
|
| 65 | - [['token', 'recipient',], 'safe'], |
|
| 66 | - [['verify_count', 'delivery_count'], 'integer', 'min' => 0,], |
|
| 67 | - ['verify_count', 'default', 'value' => 0,], |
|
| 68 | - ['delivery_count', 'default', 'value' => 0,], |
|
| 69 | - ['data', 'safe',], |
|
| 64 | + [['token', 'recipient', ], 'required'], |
|
| 65 | + [['token', 'recipient', ], 'safe'], |
|
| 66 | + [['verify_count', 'delivery_count'], 'integer', 'min' => 0, ], |
|
| 67 | + ['verify_count', 'default', 'value' => 0, ], |
|
| 68 | + ['delivery_count', 'default', 'value' => 0, ], |
|
| 69 | + ['data', 'safe', ], |
|
| 70 | 70 | ]; |
| 71 | 71 | } |
| 72 | 72 | |