code: protected function setMandatorySettings(array $settings): void
      {
          $props = ['engine', 'host', 'user', 'password', 'database'];
          foreach ($props as $prop) {
              if (!isset($settings[$prop]) || !\is_string($settings[$prop])) {
                  throw new DatabaseException('"' . $prop . '" settings is not defined or not a string');
              }
  
              $this->{'set' . \ucfirst($prop)}($settings[$prop]);
          }
      }
docs: @param array $settings
  
  @throws DatabaseException