public static function getPackageName($source)
    {
        $ignore_yaml_files = ['blueprints', 'languages'];

        foreach (glob($source . '*.yaml') as $filename) {
            $name = strtolower(basename($filename, '.yaml'));
            if (in_array($name, $ignore_yaml_files)) {
                continue;
            }
            return $name;
        }
        return false;
    }
public static function getPackageName($source)
    {
        $ignore_yaml_files = ['blueprints', 'languages'];

        foreach (glob($source . '*.yaml') as $filename) {
            $name = strtolower(basename($filename, '.yaml'));
            if (in_array($name, $ignore_yaml_files)) {
                continue;
            }
            return $name;
        }
        return false;
    }
public static function getPackageName ( $ source ) { $ ignore_yaml_files = [ 'blueprints' , 'languages' ] ; foreach ( glob ( $ source . '*.yaml' ) as $ filename ) { $ name = strtolower ( basename ( $ filename , '.yaml' ) ) ; if ( in_array ( $ name , $ ignore_yaml_files ) ) { continue ; } return $ name ; } return false ; }
Try to guess the package name from the source files

@param string $source
@return bool|string
Try to guess the package name from the source files