CoinHiveCaptchaType   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 45
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 4 1
A getParent() 0 3 1
A getBlockPrefix() 0 3 1
A configureOptions() 0 4 1
A getName() 0 3 1
1
<?php
2
3
namespace CoinhiveBundle\Form\Type;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\Extension\Core\Type\TextType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
use Symfony\Component\OptionsResolver\OptionsResolver;
9
10
/**
11
 * Class CoinHiveCaptchaType.
12
 */
13
class CoinHiveCaptchaType extends AbstractType
14
{
15
    /**
16
     * @param FormBuilderInterface $builder
17
     * @param array $options
18
     */
19
    public function buildForm(FormBuilderInterface $builder, array $options)
20
    {
21
        $builder
22
            ->add('coinhive-captcha-token', TextType::class)
23
        ;
24
    }
25
26
    /**
27
     * @param OptionsResolver $resolver
28
     */
29
    public function configureOptions(OptionsResolver $resolver)
30
    {
31
        $resolver->setDefaults([
32
            'compound' => true,
33
        ]);
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getParent()
40
    {
41
        return TextType::class;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getBlockPrefix()
48
    {
49
        return 'coinhive_captcha';
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getName()
56
    {
57
        return 'coinhive_captcha';
58
    }
59
}
60