public static function formatConfig($config)
    {
        if (\is_string($config)) {
            $config = ['file' => $config];
        }

        if (!\is_array($config)) {
            throw new UnexpectedTypeException($config, 'array');
        }

        if (!isset($config['file'])) {
            $msg = 'The "file" attribute must be defined in config of layout template';

            throw new InvalidConfigurationException($msg);
        }

        return $config;
    }
public static function formatConfig($config)
    {
        if (\is_string($config)) {
            $config = ['file' => $config];
        }

        if (!\is_array($config)) {
            throw new UnexpectedTypeException($config, 'array');
        }

        if (!isset($config['file'])) {
            $msg = 'The "file" attribute must be defined in config of layout template';

            throw new InvalidConfigurationException($msg);
        }

        return $config;
    }
public static function formatConfig ( $ config ) { if ( \ is_string ( $ config ) ) { $ config = [ 'file' => $ config ] ; } if ( ! \ is_array ( $ config ) ) { throw new UnexpectedTypeException ( $ config , 'array' ) ; } if ( ! isset ( $ config [ 'file' ] ) ) { $ msg = 'The "file" attribute must be defined in config of layout template' ; throw new InvalidConfigurationException ( $ msg ) ; } return $ config ; }
Format the string config to array config with "file" attribute.

@param array|string $config The config

@return array
Format the string config to array config with file attribute .