You are here

private function VersionParser::expandStability in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/composer/semver/src/VersionParser.php \Composer\Semver\VersionParser::expandStability()

Expand shorthand stability string to long version.

Parameters

string $stability:

Return value

string

2 calls to VersionParser::expandStability()
VersionParser::normalize in vendor/composer/semver/src/VersionParser.php
Normalizes a version string to be able to perform comparisons on it.
VersionParser::parseConstraint in vendor/composer/semver/src/VersionParser.php

File

vendor/composer/semver/src/VersionParser.php, line 502

Class

VersionParser
Version parser.

Namespace

Composer\Semver

Code

private function expandStability($stability) {
  $stability = strtolower($stability);
  switch ($stability) {
    case 'a':
      return 'alpha';
    case 'b':
      return 'beta';
    case 'p':
    case 'pl':
      return 'patch';
    case 'rc':
      return 'RC';
    default:
      return $stability;
  }
}