Simplifies Expression

Null not possible.
This commit is contained in:
Refringe 2024-09-15 23:46:02 -04:00
parent 7909f629c6
commit c2d36e8b09
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k

View File

@ -38,7 +38,7 @@ class Version
// Regex to match semantic versioning, including pre-release identifiers
if (preg_match('/^(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([\w.-]+))?$/', $this->version, $matches)) {
$this->major = (int) ($matches[1] ?? 0);
$this->major = (int) $matches[1];
$this->minor = (int) ($matches[2] ?? 0);
$this->patch = (int) ($matches[3] ?? 0);
$this->preRelease = $matches[4] ?? '';