protected function resolveOptions($config)
    {
        if (! $this->schema) {
            return $config;
        }

        try {
            $resolver = new OptionsResolver();
            if ($this->configureOptions($resolver)) {
                $config = $resolver->resolve($config);
            }
        } catch (Exception $exception) {
            throw new FailedToResolveConfigException(
                sprintf(
                    _('Error while resolving config options: %1$s'),
                    $exception->getMessage()
                )
            );
        }

        return $config;
    }
protected function resolveOptions($config)
    {
        if (! $this->schema) {
            return $config;
        }

        try {
            $resolver = new OptionsResolver();
            if ($this->configureOptions($resolver)) {
                $config = $resolver->resolve($config);
            }
        } catch (Exception $exception) {
            throw new FailedToResolveConfigException(
                sprintf(
                    _('Error while resolving config options: %1$s'),
                    $exception->getMessage()
                )
            );
        }

        return $config;
    }
protected function resolveOptions ( $ config ) { if ( ! $ this -> schema ) { return $ config ; } try { $ resolver = new OptionsResolver ( ) ; if ( $ this -> configureOptions ( $ resolver ) ) { $ config = $ resolver -> resolve ( $ config ) ; } } catch ( Exception $ exception ) { throw new FailedToResolveConfigException ( sprintf ( _ ( 'Error while resolving config options: %1$s' ) , $ exception -> getMessage ( ) ) ) ; } return $ config ; }
Process the passed-in defaults and merge them with the new values, while
checking that all required options are set.

@since 0.1.0

@param array $config Configuration settings to resolve.

@return array Resolved configuration settings.
@throws FailedToResolveConfigException If there are errors while resolving the options.
Process the passed - in defaults and merge them with the new values while checking that all required options are set .