Version.php 691 B

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=1);
  2. /*
  3. * This file is part of phpunit/php-code-coverage.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace SebastianBergmann\CodeCoverage;
  11. use function dirname;
  12. use SebastianBergmann\Version as VersionId;
  13. final class Version
  14. {
  15. /**
  16. * @var string
  17. */
  18. private static $version;
  19. public static function id(): string
  20. {
  21. if (self::$version === null) {
  22. self::$version = (new VersionId('9.2.30', dirname(__DIR__)))->getVersion();
  23. }
  24. return self::$version;
  25. }
  26. }