Completed
Push — develop ( 44ec0d...21eab1 )
by Michiel
02:03
created

RevokeSecondFactorType::getBlockPrefix()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * Copyright 2014 SURFnet bv
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
19
namespace Surfnet\StepupSelfService\SelfServiceBundle\Form\Type;
20
21
use Symfony\Component\Form\AbstractType;
22
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
23
use Symfony\Component\Form\FormBuilderInterface;
24
use Symfony\Component\OptionsResolver\OptionsResolver;
25
26 View Code Duplication
class RevokeSecondFactorType extends AbstractType
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

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.

Loading history...
27
{
28
    public function buildForm(FormBuilderInterface $builder, array $options)
29
    {
30
        $builder->add('revoke', SubmitType::class, [
31
            'label' => 'ss.form.ss_revoke_second_factor.revoke',
32
            'attr' => [ 'class' => 'btn btn-danger pull-right' ],
33
        ]);
34
        $builder->add('cancel', AnchorType::class, [
35
            'label' => 'ss.form.ss_revoke_second_factor.cancel',
36
            'attr' => [ 'class' => 'btn pull-right' ],
37
            'route' => 'ss_second_factor_list',
38
        ]);
39
    }
40
41
    public function configureOptions(OptionsResolver $resolver)
42
    {
43
        $resolver->setDefaults([
44
            'data_class' => 'Surfnet\StepupSelfService\SelfServiceBundle\Command\RevokeCommand',
45
        ]);
46
    }
47
48
    public function getBlockPrefix()
49
    {
50
        return 'ss_revoke_second_factor';
51
    }
52
}
53