InputForm   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 25
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 7 1
A attributeLabels() 0 6 1
1
<?php
2
/**
3
 * Multi-factor authentication for Yii2 projects
4
 *
5
 * @link      https://github.com/hiqdev/yii2-mfa
6
 * @package   yii2-mfa
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2018, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\yii2\mfa\forms;
12
13
use Yii;
14
15
/**
16
 * Verification code input form.
17
 */
18
class InputForm extends \yii\base\Model
19
{
20
    public $code;
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function rules()
26
    {
27
        return [
28
            ['code', 'integer', 'max' => 999999],
29
            ['code', 'required'],
30
        ];
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function attributeLabels()
37
    {
38
        return [
39
            'code' => Yii::t('mfa', 'Authentication code'),
40
        ];
41
    }
42
}
43