original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Process the passed - in defaults and merge them with the new values while checking that all required options are set .