Code Duplication    Length = 5-7 lines in 2 locations

Command/BundleTrait.php 1 location

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

DependencyInjection/Configuration.php 1 location

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