src/Util.php
public static function ensureConfig($config)
    {
        if ($config === null) {
            return new Config();
        }

        if ($config instanceof Config) {
            return $config;
        }

        if (is_array($config)) {
            return new Config($config);
        }

        throw new LogicException('A config should either be an array or a Flysystem\Config object.');
    }
public static function ensureConfig($config)
    {
        if ($config === null) {
            return new Config();
        }

        if ($config instanceof Config) {
            return $config;
        }

        if (is_array($config)) {
            return new Config($config);
        }

        throw new LogicException('A config should either be an array or a Flysystem\Config object.');
    }
public static function ensureConfig ( $ config ) { if ( $ config === null ) { return new Config ( ) ; } if ( $ config instanceof Config ) { return $ config ; } if ( is_array ( $ config ) ) { return new Config ( $ config ) ; } throw new LogicException ( 'A config should either be an array or a Flysystem\Config object.' ) ; }
Ensure a Config instance.

@param null|array|Config $config

@return Config config instance

@throw  LogicException
Ensure a Config instance .