src/Graviton/GeneratorBundle/Command/GenerateDynamicBundleCommand.php
private function getBundleFinder($baseDir)
    {
        $bundleBaseDir = $baseDir.self::BUNDLE_NAMESPACE;

        if (!(new Filesystem())->exists($bundleBaseDir)) {
            return null;
        }

        $bundleFinder = new Finder();
        $bundleFinder->directories()->in($bundleBaseDir)->depth('== 0')->notName('BundleBundle');

        return $bundleFinder;
    }
private function getBundleFinder($baseDir)
    {
        $bundleBaseDir = $baseDir.self::BUNDLE_NAMESPACE;

        if (!(new Filesystem())->exists($bundleBaseDir)) {
            return null;
        }

        $bundleFinder = new Finder();
        $bundleFinder->directories()->in($bundleBaseDir)->depth('== 0')->notName('BundleBundle');

        return $bundleFinder;
    }
private function getBundleFinder ( $ baseDir ) { $ bundleBaseDir = $ baseDir . self :: BUNDLE_NAMESPACE ; if ( ! ( new Filesystem ( ) ) -> exists ( $ bundleBaseDir ) ) { return null ; } $ bundleFinder = new Finder ( ) ; $ bundleFinder -> directories ( ) -> in ( $ bundleBaseDir ) -> depth ( '== 0' ) -> notName ( 'BundleBundle' ) ; return $ bundleFinder ; }
returns a finder that iterates all bundle directories

@param string $baseDir the base dir to search

@return Finder|null finder or null if basedir does not exist
returns a finder that iterates all bundle directories