protected function setLocalDbConfig() {
    $config_local_db = $this->confirm("Would you like to configure the local database credentials?");
    $db = [];

    if ($config_local_db) {
      $default_db = $this->getConfigValue('drupal.db');
      $db['database'] = $this->askDefault("Local database name",
        $default_db['database']);
      $db['username'] = $this->askDefault("Local database user",
        $default_db['username']);
      $db['password'] = $this->askDefault("Local database password",
        $default_db['password']);
      $db['host'] = $this->askDefault("Local database host",
        $default_db['host']);
      $db['port'] = $this->askDefault("Local database port",
        $default_db['port']);
      $this->getConfig()->set('drupal.db', $db);
    }

    return $db;
  }