code: protected function validateConfiguration($userConfig = array())
      {
          if (!$this->configurator) {
              throw new \RuntimeException("Configurator class is not set.");
          }
          
          try {
              return $this->configurator->validate($userConfig);
          } catch (ConfigurationException $e) {
              $e->addBeforeMessage("Configuration error in ".static::CONFIG_FILE.":");
              throw $e;
          }
      }
docs: Configuration validation
  
  Calls the specific configurator instance, which validates the user
  provided configuration and adds default values.
  
  @param mixed $userConfig Anything read from the configuration file
  @return array Modified configuration (added defaults)
  @throws \RuntimeException Missing configurator
  @throws ConfigurationException Validation error