ClientResetPasswordFormBuilder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAlias() 0 4 1
A buildForm() 0 11 1
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 *
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 *
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
namespace WellCommerce\Bundle\AppBundle\Form\Front;
13
14
use WellCommerce\Bundle\CoreBundle\Form\AbstractFormBuilder;
15
use WellCommerce\Component\Form\Elements\FormInterface;
16
17
/**
18
 * Class ClientResetPasswordFormBuilder
19
 *
20
 * @author  Adam Piotrowski <[email protected]>
21
 */
22
class ClientResetPasswordFormBuilder extends AbstractFormBuilder
23
{
24
    public function getAlias(): string
25
    {
26
        return 'front.client_reset_password';
27
    }
28
    
29
    public function buildForm(FormInterface $form)
30
    {
31
        $form->addChild($this->getElement('text_field', [
32
            'name'  => '_username',
33
            'label' => 'client.label.username',
34
        ]));
35
36
        $form->addFilter($this->getFilter('no_code'));
37
        $form->addFilter($this->getFilter('trim'));
38
        $form->addFilter($this->getFilter('secure'));
39
    }
40
}
41