src/Robo/Inspector/Inspector.php
public function getDrushMajorVersion() {
    $version_info = json_decode($this->executor->drush('version --format=json')->run()->getMessage(), TRUE);
    if (!empty($version_info['drush-version'])) {
      $version = $version_info['drush-version'];
    }
    else {
      $version = $version_info;
    }

    $major_version = substr($version, 0, 1);

    return (int) $major_version;
  }
public function getDrushMajorVersion() {
    $version_info = json_decode($this->executor->drush('version --format=json')->run()->getMessage(), TRUE);
    if (!empty($version_info['drush-version'])) {
      $version = $version_info['drush-version'];
    }
    else {
      $version = $version_info;
    }

    $major_version = substr($version, 0, 1);

    return (int) $major_version;
  }
public function getDrushMajorVersion ( ) { $ version_info = json_decode ( $ this -> executor -> drush ( 'version --format=json' ) -> run ( ) -> getMessage ( ) , TRUE ) ; if ( ! empty ( $ version_info [ 'drush-version' ] ) ) { $ version = $ version_info [ 'drush-version' ] ; } else { $ version = $ version_info ; } $ major_version = substr ( $ version , 0 , 1 ) ; return ( int ) $ major_version ; }
Gets the major version of drush.

@return int
The major version of drush.
Gets the major version of drush .