function Version::parseVersion
Parameters
string[] $matches:
Throws
InvalidPreReleaseSuffixException
1 call to Version::parseVersion()
- Version::ensureVersionStringIsValid in vendor/
phar-io/ version/ src/ Version.php
File
-
vendor/
phar-io/ version/ src/ Version.php, line 163
Class
Namespace
PharIo\VersionCode
private function parseVersion(array $matches) : void {
$this->major = new VersionNumber((int) $matches['Major']);
$this->minor = new VersionNumber((int) $matches['Minor']);
$this->patch = isset($matches['Patch']) ? new VersionNumber((int) $matches['Patch']) : new VersionNumber(0);
if (isset($matches['PreReleaseSuffix']) && $matches['PreReleaseSuffix'] !== '') {
$this->preReleaseSuffix = new PreReleaseSuffix($matches['PreReleaseSuffix']);
}
if (isset($matches['BuildMetadata'])) {
$this->buildMetadata = new BuildMetaData($matches['BuildMetadata']);
}
}