/**
  * @param array|null $parameters
  */
 public function __construct(array $parameters = null)
 {
     parent::__construct($parameters);
     if (!$this->hasRootPath()) {
         $this->setRootPath('.');
     }
 }
 protected static function registerKnownTypes()
 {
     if (!empty(static::$registeredByServerType)) {
         return;
     }
     static::register(GenericConnectionSettings::getServerType(), GenericConnectionSettings::getClassName());
     static::register(LocalFileConnectionSettings::getServerType(), LocalFileConnectionSettings::getClassName());
     static::register(RemoteFileConnectionSettings::getServerType(), RemoteFileConnectionSettings::getClassName());
     static::register(GitLabRepoConnectionSettings::getServerType(), GitLabRepoConnectionSettings::getClassName());
 }
 /**
  * Validate the connection parameters and throw appropriate exceptions.
  *
  * @throws ConnectionSettingsException
  */
 public function validate()
 {
     parent::validate();
     $requestMethod = $this->getRequestMethod();
     if ($requestMethod != static::METHOD_GET && $requestMethod != static::METHOD_GET) {
         throw new ConnectionSettingsException($this, sprintf('Invalid request method "%s"', $requestMethod));
     }
 }