mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Simplifies Expression
Null not possible.
This commit is contained in:
parent
7909f629c6
commit
c2d36e8b09
@ -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] ?? '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user