Code Duplication    Length = 5-5 lines in 3 locations

src/Kunstmaan/GeneratorBundle/Generator/PagePartGenerator.php 1 location

@@ 148-152 (lines=5) @@
145
    private function generateSectionConfig()
146
    {
147
        if (count($this->sections) > 0) {
148
            if ($this->isSymfony4()) {
149
                $dir = $this->container->getParameter('kernel.project_dir') . '/config/kunstmaancms/pageparts/';
150
            } else {
151
                $dir = $this->bundle->getPath().'/Resources/config/pageparts/';
152
            }
153
154
            foreach ($this->sections as $section) {
155
                $data = Yaml::parse(file_get_contents($dir . $section));

src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php 2 locations

@@ 227-231 (lines=5) @@
224
    protected function installDefaultPageTemplates($bundle)
225
    {
226
        // Configuration templates
227
        if ($this->isSymfony4()) {
228
            $dirPath = $this->container->getParameter('kernel.project_dir') . '/config/kunstmaancms/pagetemplates/';
229
        } else {
230
            $dirPath = sprintf('%s/Resources/config/pagetemplates/', $bundle->getPath());
231
        }
232
233
        $skeletonDir = sprintf('%s/Resources/config/pagetemplates/', GeneratorUtils::getFullSkeletonPath('/common'));
234
@@ 290-294 (lines=5) @@
287
    protected function installDefaultPagePartConfiguration($bundle)
288
    {
289
        // Pagepart configuration
290
        if ($this->isSymfony4()) {
291
            $dirPath = $this->container->getParameter('kernel.project_dir') . '/config/kunstmaancms/pageparts/';
292
        } else {
293
            $dirPath = sprintf('%s/Resources/config/pageparts/', $bundle->getPath());
294
        }
295
296
        $skeletonDir = sprintf('%s/Resources/config/pageparts/', GeneratorUtils::getFullSkeletonPath('/common'));
297