These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of EC-CUBE |
||
5 | * |
||
6 | * Copyright(c) LOCKON CO.,LTD. All Rights Reserved. |
||
7 | * |
||
8 | * http://www.lockon.co.jp/ |
||
9 | * |
||
10 | * For the full copyright and license information, please view the LICENSE |
||
11 | * file that was distributed with this source code. |
||
12 | */ |
||
13 | |||
14 | namespace Eccube\Form\Type\Master; |
||
15 | |||
16 | use Eccube\Form\Type\MasterType; |
||
17 | use Symfony\Component\Form\AbstractType; |
||
18 | use Symfony\Component\Form\FormBuilderInterface; |
||
19 | use Symfony\Component\OptionsResolver\OptionsResolver; |
||
20 | |||
21 | View Code Duplication | class CustomerStatusType extends AbstractType |
|
0 ignored issues
–
show
|
|||
22 | { |
||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 44 | public function buildForm(FormBuilderInterface $builder, array $options) |
|
27 | { |
||
28 | // todo ??? |
||
29 | 44 | $options['sex_options']['required'] = $options['required']; |
|
30 | } |
||
31 | |||
32 | 44 | public function configureOptions(OptionsResolver $resolver) |
|
33 | { |
||
34 | 44 | $resolver->setDefaults([ |
|
35 | 44 | 'class' => 'Eccube\Entity\Master\CustomerStatus', |
|
36 | 'expanded' => false, |
||
37 | ]); |
||
38 | } |
||
39 | |||
40 | 44 | public function getParent() |
|
41 | { |
||
42 | 44 | return MasterType::class; |
|
43 | } |
||
44 | |||
45 | 14 | public function getBlockPrefix() |
|
46 | { |
||
47 | 14 | return 'customer_status'; |
|
48 | } |
||
49 | } |
||
50 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.