Code Duplication    Length = 3-3 lines in 2 locations

src/RunOpenCode/Bundle/QueryResourcesLoader/DependencyInjection/Extension.php 1 location

@@ 154-156 (lines=3) @@
151
152
            $name = $bundle;
153
154
            if ('Bundle' === substr($name, -6)) {
155
                $name = substr($name, 0, -6);
156
            }
157
158
            $twigFilesystemLoaderDefinition->addMethodCall('addPath', array($dir, $name));
159
        };

src/RunOpenCode/Bundle/QueryResourcesLoader/Twig/CacheWarmer/QuerySourcesIterator.php 1 location

@@ 53-55 (lines=3) @@
50
        $this->queries = $this->findQuerySourcesInDirectory($this->rootDir.'/Resources/query');
51
        foreach ($this->kernel->getBundles() as $bundle) {
52
            $name = $bundle->getName();
53
            if ('Bundle' === substr($name, -6)) {
54
                $name = substr($name, 0, -6);
55
            }
56
57
            $this->queries = array_merge(
58
                $this->queries,