|
2 | 2 |
|
3 | 3 | namespace EWZ\Bundle\RecaptchaBundle\DependencyInjection; |
4 | 4 |
|
5 | | -use EWZ\Bundle\RecaptchaBundle\DependencyInjection\CompilerPass\WidgetCompilerPass; |
6 | | -use EWZ\Bundle\RecaptchaBundle\Resolver\WidgetResolver; |
7 | 5 | use EWZ\Bundle\RecaptchaBundle\Factory\EWZRecaptchaV2FormBuilderFactory; |
8 | 6 | use EWZ\Bundle\RecaptchaBundle\Factory\EWZRecaptchaV3FormBuilderFactory; |
9 | 7 | use Symfony\Component\Config\FileLocator; |
10 | 8 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
11 | 9 | use Symfony\Component\DependencyInjection\Loader; |
12 | 10 | use Symfony\Component\DependencyInjection\Reference; |
13 | | -use Symfony\Component\Form\FormBuilder; |
14 | 11 | use Symfony\Component\Form\FormBuilderInterface; |
15 | 12 | use Symfony\Component\Form\FormFactoryInterface; |
16 | 13 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
|
20 | 17 | */ |
21 | 18 | class EWZRecaptchaExtension extends Extension |
22 | 19 | { |
23 | | - |
24 | 20 | /** |
25 | 21 | * {@inheritdoc} |
26 | 22 | */ |
@@ -51,14 +47,13 @@ public function load(array $configs, ContainerBuilder $container) |
51 | 47 | ->addArgument(new Reference(FormFactoryInterface::class)); |
52 | 48 | } |
53 | 49 |
|
54 | | - foreach($config['service_definition'] as $serviceDefinition) { |
55 | | - $container->register('ewz_recaptcha.' . $serviceDefinition['service_name'], FormBuilderInterface::class) |
| 50 | + foreach ($config['service_definition'] as $serviceDefinition) { |
| 51 | + $container->register('ewz_recaptcha.'.$serviceDefinition['service_name'], FormBuilderInterface::class) |
56 | 52 | ->setFactory(array( |
57 | 53 | new Reference('ewz_recaptcha.form_builder_factory'), |
58 | | - 'get')) |
| 54 | + 'get', )) |
59 | 55 | ->setArguments([$serviceDefinition['options']]); |
60 | 56 | } |
61 | | - |
62 | 57 | } |
63 | 58 |
|
64 | 59 | /** |
|
0 commit comments