Code Duplication    Length = 19-19 lines in 3 locations

Command/FormGenCommand.php 1 location

@@ 81-99 (lines=19) @@
78
        return $formGenerator;
79
    }
80
81
    protected function getSkeletonDirs(BundleInterface $bundle = null)
82
    {
83
        $skeletonDirs = parent::getSkeletonDirs($bundle);
84
85
        if (isset($bundle) && is_dir($dir = $bundle->getPath() . '/Resources/skeleton')) {
86
            $skeletonDirs[] = $dir;
87
        }
88
89
        if (is_dir($dir = $this->getContainer()->get('kernel')->getRootdir() . '/Resources/skeleton')) {
90
            $skeletonDirs[] = $dir;
91
        }
92
93
        $kernel = $this->getApplication()->getKernel();
94
95
        $skeletonDirs[] = $kernel->locateResource('@KpicazaGenBundle/Resources/skeleton');
96
        $skeletonDirs[] = $kernel->locateResource('@KpicazaGenBundle/Resources');
97
98
        return array_reverse($skeletonDirs);
99
    }
100
}
101

Command/CrudGenCommand.php 1 location

@@ 166-184 (lines=19) @@
163
        return $this->generator;
164
    }
165
166
    protected function getSkeletonDirs(BundleInterface $bundle = null)
167
    {
168
        $skeletonDirs = parent::getSkeletonDirs($bundle);
169
170
        if (isset($bundle) && is_dir($dir = $bundle->getPath() . '/Resources/skeleton')) {
171
            $skeletonDirs[] = $dir;
172
        }
173
174
        if (is_dir($dir = $this->getContainer()->get('kernel')->getRootdir() . '/Resources/skeleton')) {
175
            $skeletonDirs[] = $dir;
176
        }
177
178
        $kernel = $this->getApplication()->getKernel();
179
180
        $skeletonDirs[] = $kernel->locateResource('@KpicazaGenBundle/Resources/skeleton');
181
        $skeletonDirs[] = $kernel->locateResource('@KpicazaGenBundle/Resources');
182
183
        return array_reverse($skeletonDirs);
184
    }
185
186
}
187

Command/RepositoryGenCommand.php 1 location

@@ 92-110 (lines=19) @@
89
        return $repositoryGenerator;
90
    }
91
92
    protected function getSkeletonDirs(BundleInterface $bundle = null)
93
    {
94
        $skeletonDirs = parent::getSkeletonDirs($bundle);
95
96
        if (isset($bundle) && is_dir($dir = $bundle->getPath() . '/Resources/skeleton')) {
97
            $skeletonDirs[] = $dir;
98
        }
99
100
        if (is_dir($dir = $this->getContainer()->get('kernel')->getRootdir() . '/Resources/skeleton')) {
101
            $skeletonDirs[] = $dir;
102
        }
103
104
        $kernel = $this->getApplication()->getKernel();
105
106
        $skeletonDirs[] = $kernel->locateResource('@KpicazaGenBundle/Resources/skeleton');
107
        $skeletonDirs[] = $kernel->locateResource('@KpicazaGenBundle/Resources');
108
109
        return array_reverse($skeletonDirs);
110
    }
111
}
112