src/Robo/Commands/Generate/MultisiteCommand.php
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;
  }
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;
  }
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 ; }
Prompts for and sets config for new database.

@return array
Empty array if user did not want to configure local db. Populated array
otherwise.
Prompts for and sets config for new database .