ResetPasswordForm   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 20
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 24 1
1
<?php
2
3
namespace App\Form\User;
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 Zend\Filter\StringToLower;
12
13
class ResetPasswordForm extends AbstractForm
14
{
15
    public function init()
16
    {
17
        $password = new Password('password');
18
        $password->setRequired(true)
19
            ->setClass('form-control password')
20
            ->setLabel('Password')
21
            ->setId('password')
22
            ->setAttribute('size', 40)
23
            ->setAttribute('placeholder', 'Enter a password')
24
            ->setCustomErrorMessage('You must input a password.');
25
26
        $confirm = new Password('confirm');
27
        $confirm->setRequired(true)
28
            ->setLabel('Confirm Password')
29
            ->setAttribute('size', 40)
30
            ->setAttribute('placeholder', 'Retype your password')
31
            ->setCustomErrorMessage('You must retype your password.');
32
33
        $submit = new Submit('submit');
34
        $submit->setValue('Register');
35
36
        $this->addField($password)
37
            ->addField($confirm)
38
            ->addField($submit);
39
    }
40
41
}