Code Duplication    Length = 19-19 lines in 3 locations

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

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

Command/FormGenCommand.php 1 location

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