| Total Complexity | 5 | 
| Total Lines | 39 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php declare(strict_types=1); | ||
| 11 | final class Recaptcha3Type extends AbstractType | ||
| 12 | { | ||
| 13 | /** @var string */ | ||
| 14 | private $siteKey; | ||
| 15 | |||
| 16 | /** @var bool */ | ||
| 17 | private $enabled; | ||
| 18 | |||
| 19 | 6 | public function __construct(string $siteKey, bool $enabled) | |
| 23 | 6 | } | |
| 24 | |||
| 25 | 3 | public function buildView(FormView $view, FormInterface $form, array $options): void | |
| 26 |     { | ||
| 27 | 3 | $view->vars['site_key'] = $this->siteKey; | |
| 28 | 3 | $view->vars['enabled'] = $this->enabled; | |
| 29 | 3 | $view->vars['action_name'] = $options['action_name']; | |
| 30 | 3 | $view->vars['script_nonce_csp'] = $options['script_nonce_csp'] ?? ''; | |
| 31 | } | ||
| 32 | 6 | ||
| 33 | public function getParent(): string | ||
| 34 | 6 |     { | |
| 35 | return HiddenType::class; | ||
| 36 | } | ||
| 37 | 3 | ||
| 38 | public function getBlockPrefix(): string | ||
| 39 | 3 |     { | |
| 40 | return 'karser_recaptcha3'; | ||
| 41 | } | ||
| 42 | 6 | ||
| 43 | public function configureOptions(OptionsResolver $resolver): void | ||
| 50 | ]); | ||
| 51 | } | ||
| 52 | } | ||
| 53 |