AppUserType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 8 1
A getBlockPrefix() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Form\Type\User;
13
14
use Sylius\Bundle\UserBundle\Form\Type\UserType;
15
use Symfony\Component\Form\FormBuilderInterface;
16
17
class AppUserType extends UserType
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function buildForm(FormBuilderInterface $builder, array $options): void
23
    {
24
        parent::buildForm($builder, $options);
25
26
        $builder
27
            ->remove('username')
28
            ->remove('email');
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function getBlockPrefix()
35
    {
36
        return 'sylius_app_user';
37
    }
38
}
39