Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Version.php

function Version::generate

1 call to Version::generate()
Version::__construct in vendor/sebastian/version/src/Version.php

File

vendor/sebastian/version/src/Version.php, line 37

Class

Version

Namespace

SebastianBergmann

Code

private function generate(string $release, string $path) : string {
    if (substr_count($release, '.') + 1 === 3) {
        $version = $release;
    }
    else {
        $version = $release . '-dev';
    }
    $git = $this->getGitInformation($path);
    if (!$git) {
        return $version;
    }
    if (substr_count($release, '.') + 1 === 3) {
        return $git;
    }
    $git = explode('-', $git);
    return $release . '-' . end($git);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal