ResendForm::attributeLabels()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the 2amigos/yii2-usuario project.
5
 *
6
 * (c) 2amigOS! <http://2amigos.us/>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace Da\User\Form;
13
14
use Da\User\Query\UserQuery;
15
use Yii;
16
use yii\base\Model;
17
18
class ResendForm extends Model
19
{
20
    /**
21
     * @var string
22
     */
23
    public $email;
24
    /**
25
     * @var UserQuery
26
     */
27
    protected $userQuery;
28
29
    /**
30
     * @param UserQuery $userQuery
31
     * @param array     $config
32
     */
33 1
    public function __construct(UserQuery $userQuery, $config = [])
34
    {
35 1
        $this->userQuery = $userQuery;
36 1
        parent::__construct($config);
37 1
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42 1
    public function rules()
43
    {
44
        return [
45 1
            'emailRequired' => ['email', 'required'],
46
            'emailPattern' => ['email', 'email'],
47
        ];
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53 1
    public function attributeLabels()
54
    {
55
        return [
56 1
            'email' => Yii::t('usuario', 'Email'),
57
        ];
58
    }
59
}
60