You are here

class PHPUnit_Runner_Version in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Runner/Version.php \PHPUnit_Runner_Version

This class defines the current version of PHPUnit.

@since Class available since Release 2.0.0

Hierarchy

Expanded class hierarchy of PHPUnit_Runner_Version

File

vendor/phpunit/phpunit/src/Runner/Version.php, line 16

View source
class PHPUnit_Runner_Version {
  private static $pharVersion;
  private static $version;

  /**
   * Returns the current version of PHPUnit.
   *
   * @return string
   */
  public static function id() {
    if (self::$pharVersion !== null) {
      return self::$pharVersion;
    }
    if (self::$version === null) {
      $version = new SebastianBergmann\Version('4.8.11', dirname(dirname(__DIR__)));
      self::$version = $version
        ->getVersion();
    }
    return self::$version;
  }

  /**
   * @return string
   */
  public static function getVersionString() {
    return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.';
  }

  /**
   * @return string
   * @since  Method available since Release 4.0.0
   */
  public static function getReleaseChannel() {
    if (strpos(self::$pharVersion, 'alpha') !== false) {
      return '-alpha';
    }
    if (strpos(self::$pharVersion, 'beta') !== false) {
      return '-beta';
    }
    return '';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPUnit_Runner_Version::$pharVersion private static property
PHPUnit_Runner_Version::$version private static property
PHPUnit_Runner_Version::getReleaseChannel public static function @since Method available since Release 4.0.0
PHPUnit_Runner_Version::getVersionString public static function
PHPUnit_Runner_Version::id public static function Returns the current version of PHPUnit.