Code Duplication    Length = 5-7 lines in 2 locations

Command/BundleTrait.php 1 location

@@ 22-28 (lines=7) @@
19
    private function configureBundleDirs(InputInterface $input, Configuration $config)
20
    {
21
        if ($bundleName = $input->getOption('bundle')) {
22
            if ('@' === $bundleName[0]) {
23
                if (false === $pos = strpos($bundleName, '/')) {
24
                    $bundleName = substr($bundleName, 1);
25
                } else {
26
                    $bundleName = substr($bundleName, 1, $pos - 2);
27
                }
28
            }
29
30
            $bundle = $this->getApplication()
31
                ->getKernel()

DependencyInjection/Configuration.php 1 location

@@ 111-115 (lines=5) @@
108
                                        $value = str_replace(DIRECTORY_SEPARATOR, '/', $value);
109
110
                                        if ('@' === $value[0]) {
111
                                            if (false === $pos = strpos($value, '/')) {
112
                                                $bundleName = substr($value, 1);
113
                                            } else {
114
                                                $bundleName = substr($value, 1, $pos - 2);
115
                                            }
116
117
                                            $bundles = $container->getParameter('kernel.bundles');
118
                                            if (!isset($bundles[$bundleName])) {