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

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