src/WebService.php
protected function validateConfig( $service ){

            // Check for config file
            if( !\Config::has('googlemaps')){

                throw new \ErrorException('Unable to find config file.');
            }

            // Validate Key parameter
            if(!array_key_exists('key', config('googlemaps') ) ){

                throw new \ErrorException('Unable to find Key parameter in configuration file.');
            }


            // Validate Key parameter
            if(!array_key_exists('service', config('googlemaps') )
                    && !array_key_exists($service, config('googlemaps.service')) ){
                throw new \ErrorException('Web service must be declared in the configuration file.');
            }

            // Validate Endpoint
            $endpointCount = count(config('googlemaps.endpoint'));
            $endpointsKeyExists = array_key_exists('endpoint', config('googlemaps'));

            if($endpointsKeyExists === false || $endpointCount < 1){
                throw new \ErrorException('End point must not be empty.');
            }


    }
protected function validateConfig( $service ){

            // Check for config file
            if( !\Config::has('googlemaps')){

                throw new \ErrorException('Unable to find config file.');
            }

            // Validate Key parameter
            if(!array_key_exists('key', config('googlemaps') ) ){

                throw new \ErrorException('Unable to find Key parameter in configuration file.');
            }


            // Validate Key parameter
            if(!array_key_exists('service', config('googlemaps') )
                    && !array_key_exists($service, config('googlemaps.service')) ){
                throw new \ErrorException('Web service must be declared in the configuration file.');
            }

            // Validate Endpoint
            $endpointCount = count(config('googlemaps.endpoint'));
            $endpointsKeyExists = array_key_exists('endpoint', config('googlemaps'));

            if($endpointsKeyExists === false || $endpointCount < 1){
                throw new \ErrorException('End point must not be empty.');
            }


    }
protected function validateConfig ( $ service ) { // Check for config file if ( ! \ Config :: has ( 'googlemaps' ) ) { throw new \ ErrorException ( 'Unable to find config file.' ) ; } // Validate Key parameter if ( ! array_key_exists ( 'key' , config ( 'googlemaps' ) ) ) { throw new \ ErrorException ( 'Unable to find Key parameter in configuration file.' ) ; } // Validate Key parameter if ( ! array_key_exists ( 'service' , config ( 'googlemaps' ) ) && ! array_key_exists ( $ service , config ( 'googlemaps.service' ) ) ) { throw new \ ErrorException ( 'Web service must be declared in the configuration file.' ) ; } // Validate Endpoint $ endpointCount = count ( config ( 'googlemaps.endpoint' ) ) ; $ endpointsKeyExists = array_key_exists ( 'endpoint' , config ( 'googlemaps' ) ) ; if ( $ endpointsKeyExists === false || $ endpointCount < 1 ) { throw new \ ErrorException ( 'End point must not be empty.' ) ; } }
Validate configuration file
@throws \ErrorException
Validate configuration file