src/Robo/Hooks/ValidateHook.php
public function validateGitConfig() {
    if (!$this->getInspector()->isGitMinimumVersionSatisfied('2.0')) {
      throw new BltException("Your system does not meet BLT's requirements. Please update git to 2.0 or newer.");
    }
    if (!$this->getInspector()->isGitUserSet()) {
      if (!$this->getConfigValue('git.user.name') || !$this->getConfigValue('git.user.email')) {
        $this->logger->warning("Git user name or email is not configured. BLT will attempt to set a dummy user and email address for this commit.");
        $this->config->set('git.user.name', 'BLT dummy user');
        $this->config->set('git.user.email', 'no-reply@example.com');
      }
    }
  }
public function validateGitConfig() {
    if (!$this->getInspector()->isGitMinimumVersionSatisfied('2.0')) {
      throw new BltException("Your system does not meet BLT's requirements. Please update git to 2.0 or newer.");
    }
    if (!$this->getInspector()->isGitUserSet()) {
      if (!$this->getConfigValue('git.user.name') || !$this->getConfigValue('git.user.email')) {
        $this->logger->warning("Git user name or email is not configured. BLT will attempt to set a dummy user and email address for this commit.");
        $this->config->set('git.user.name', 'BLT dummy user');
        $this->config->set('git.user.email', 'no-reply@example.com');
      }
    }
  }
public function validateGitConfig ( ) { if ( ! $ this -> getInspector ( ) -> isGitMinimumVersionSatisfied ( '2.0' ) ) { throw new BltException ( "Your system does not meet BLT's requirements. Please update git to 2.0 or newer." ) ; } if ( ! $ this -> getInspector ( ) -> isGitUserSet ( ) ) { if ( ! $ this -> getConfigValue ( 'git.user.name' ) || ! $ this -> getConfigValue ( 'git.user.email' ) ) { $ this -> logger -> warning ( "Git user name or email is not configured. BLT will attempt to set a dummy user and email address for this commit." ) ; $ this -> config -> set ( 'git.user.name' , 'BLT dummy user' ) ; $ this -> config -> set ( 'git.user.email' , 'no-reply@example.com' ) ; } } }
Validates that Git user is configured.

@hook validate @validateGitConfig
Validates that Git user is configured .