lib/Client.php
private function validate_config($config)
    {
        $required_option_keys = array('access_token', 'environment');

        foreach ($required_option_keys as $required_option_key) {
            if (!isset($config[$required_option_key])) {
                throw new \Exception('Missing required option `' . $required_option_key . '`.');
            }

            if (!is_string($config[$required_option_key])) {
                throw new \Exception('Option `'. $required_option_key .'` can only be a string.');
            }
        }
    }
private function validate_config($config)
    {
        $required_option_keys = array('access_token', 'environment');

        foreach ($required_option_keys as $required_option_key) {
            if (!isset($config[$required_option_key])) {
                throw new \Exception('Missing required option `' . $required_option_key . '`.');
            }

            if (!is_string($config[$required_option_key])) {
                throw new \Exception('Option `'. $required_option_key .'` can only be a string.');
            }
        }
    }
private function validate_config ( $ config ) { $ required_option_keys = array ( 'access_token' , 'environment' ) ; foreach ( $ required_option_keys as $ required_option_key ) { if ( ! isset ( $ config [ $ required_option_key ] ) ) { throw new \ Exception ( 'Missing required option `' . $ required_option_key . '`.' ) ; } if ( ! is_string ( $ config [ $ required_option_key ] ) ) { throw new \ Exception ( 'Option `' . $ required_option_key . '` can only be a string.' ) ; } } }
Ensures a config is valid and sets defaults where required

@param array[string]mixed $config the client configuration options
Ensures a config is valid and sets defaults where required