Code Duplication    Length = 14-16 lines in 2 locations

src/BenGorFile/FileBundle/DependencyInjection/Compiler/ApplicationCommandsPass.php 1 location

@@ 27-40 (lines=14) @@
24
 *
25
 * @author Beñat Espiña <[email protected]>
26
 */
27
class ApplicationCommandsPass implements CompilerPassInterface
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function process(ContainerBuilder $container)
33
    {
34
        $config = $container->getParameter('bengor_file.config');
35
36
        foreach ($config['file_class'] as $key => $file) {
37
            (new UploadFileCommandBuilder($container, $file['persistence']))->build($key);
38
        }
39
    }
40
}
41

src/BenGorFile/FileBundle/DependencyInjection/Compiler/ApplicationDataTransformersPass.php 1 location

@@ 27-42 (lines=16) @@
24
 *
25
 * @author Beñat Espiña <[email protected]>
26
 */
27
class ApplicationDataTransformersPass implements CompilerPassInterface
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function process(ContainerBuilder $container)
33
    {
34
        $config = $container->getParameter('bengor_file.config');
35
36
        foreach ($config['file_class'] as $key => $file) {
37
            (new FileDTODataTransformerBuilder(
38
                $container, $file['data_transformer']
39
            ))->build($key);
40
        }
41
    }
42
}
43