src/Robo/Commands/Doctor/DrupalVmCheck.php
protected function checkDrupalVm() {
    $drupal_vm_config_file = $this->getConfigValue('vm.config');
    if (!file_exists($drupal_vm_config_file)) {
      $this->logProblem(__FUNCTION__ . ':init', "You have DrupalVM initialized, but $drupal_vm_config_file is missing.", 'error');
      return FALSE;
    }
    $drupal_vm_config = Yaml::parse(file_get_contents($drupal_vm_config_file));

    $result = $this->getExecutor()->drush('site:alias --format=json')->silent(TRUE)->run();
    $drush_aliases = json_decode($result->getMessage(), TRUE);
    $local_alias_id = '@' . $this->getConfigValue('drush.aliases.local');
    if ($local_alias_id !== '@self') {
      if (empty($drush_aliases[$local_alias_id])) {
        $this->logProblem(__FUNCTION__ . ":alias", [
          "The drush alias assigned to drush.aliases.local does not exist in your drush aliases file.",
          "  drush.aliases.local is set to @$local_alias_id",
        ], 'error');
      }
      else {
        $local_alias = $drush_aliases[$local_alias_id];
        $this->checkHost($local_alias, $drupal_vm_config, $local_alias_id);
        $this->checkUri($local_alias, $drupal_vm_config, $local_alias_id);
        $this->checkRoot($drupal_vm_config, $local_alias, $local_alias_id);
      }
    }
  }
protected function checkDrupalVm() {
    $drupal_vm_config_file = $this->getConfigValue('vm.config');
    if (!file_exists($drupal_vm_config_file)) {
      $this->logProblem(__FUNCTION__ . ':init', "You have DrupalVM initialized, but $drupal_vm_config_file is missing.", 'error');
      return FALSE;
    }
    $drupal_vm_config = Yaml::parse(file_get_contents($drupal_vm_config_file));

    $result = $this->getExecutor()->drush('site:alias --format=json')->silent(TRUE)->run();
    $drush_aliases = json_decode($result->getMessage(), TRUE);
    $local_alias_id = '@' . $this->getConfigValue('drush.aliases.local');
    if ($local_alias_id !== '@self') {
      if (empty($drush_aliases[$local_alias_id])) {
        $this->logProblem(__FUNCTION__ . ":alias", [
          "The drush alias assigned to drush.aliases.local does not exist in your drush aliases file.",
          "  drush.aliases.local is set to @$local_alias_id",
        ], 'error');
      }
      else {
        $local_alias = $drush_aliases[$local_alias_id];
        $this->checkHost($local_alias, $drupal_vm_config, $local_alias_id);
        $this->checkUri($local_alias, $drupal_vm_config, $local_alias_id);
        $this->checkRoot($drupal_vm_config, $local_alias, $local_alias_id);
      }
    }
  }
protected function checkDrupalVm ( ) { $ drupal_vm_config_file = $ this -> getConfigValue ( 'vm.config' ) ; if ( ! file_exists ( $ drupal_vm_config_file ) ) { $ this -> logProblem ( __FUNCTION__ . ':init' , "You have DrupalVM initialized, but $drupal_vm_config_file is missing." , 'error' ) ; return FALSE ; } $ drupal_vm_config = Yaml :: parse ( file_get_contents ( $ drupal_vm_config_file ) ) ; $ result = $ this -> getExecutor ( ) -> drush ( 'site:alias --format=json' ) -> silent ( TRUE ) -> run ( ) ; $ drush_aliases = json_decode ( $ result -> getMessage ( ) , TRUE ) ; $ local_alias_id = '@' . $ this -> getConfigValue ( 'drush.aliases.local' ) ; if ( $ local_alias_id !== '@self' ) { if ( empty ( $ drush_aliases [ $ local_alias_id ] ) ) { $ this -> logProblem ( __FUNCTION__ . ":alias" , [ "The drush alias assigned to drush.aliases.local does not exist in your drush aliases file." , "  drush.aliases.local is set to @$local_alias_id" , ] , 'error' ) ; } else { $ local_alias = $ drush_aliases [ $ local_alias_id ] ; $ this -> checkHost ( $ local_alias , $ drupal_vm_config , $ local_alias_id ) ; $ this -> checkUri ( $ local_alias , $ drupal_vm_config , $ local_alias_id ) ; $ this -> checkRoot ( $ drupal_vm_config , $ local_alias , $ local_alias_id ) ; } } }
Checks Drupal VM configuration.
Checks Drupal VM configuration .