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

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