ResetPasswordForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 22
dl 0
loc 29
ccs 22
cts 22
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 27 1
1
<?php
2
3
namespace Bone\User\Form;
4
5
use Del\Form\AbstractForm;
6
use Del\Form\Field\Submit;
7
use Del\Form\Field\Text\EmailAddress;
8
use Del\Form\Field\Text\Password;
9
use Del\Form\Filter\Adapter\FilterAdapterZf;
10
use Del\Form\Renderer\HorizontalFormRenderer;
11
use Laminas\Filter\StringToLower;
12
13
class ResetPasswordForm extends AbstractForm
14
{
15 8
    public function init()
16
    {
17 8
        $password = new Password('password');
18 8
        $password->setRequired(true);
19 8
        $password->setClass('form-control password');
20 8
        $password->setLabel('Password');
21 8
        $password->setId('password');
22 8
        $password->setAttribute('size', 40);
23 8
        $password->setAttribute('placeholder', 'Enter a password');
24 8
        $password->setCustomErrorMessage('You must input a password.');
25
26 8
        $confirm = new Password('confirm');
27 8
        $confirm->setRequired(true);
28 8
        $confirm->setLabel('Confirm Password');
29 8
        $confirm->setAttribute('size', 40);
30 8
        $confirm->setAttribute('placeholder', 'Retype your password');
31 8
        $confirm->setCustomErrorMessage('You must retype your password.');
32
33 8
        $submit = new Submit('submit');
34 8
        $submit->setValue('Reset Password');
35
36 8
        $this->addField($password);
37 8
        $this->addField($confirm);
38 8
        $this->addField($submit);
39
40 8
        $renderer = new HorizontalFormRenderer();
41 8
        $this->setFormRenderer($renderer);
42
    }
43
44
}