Commit 3eff727c authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Use int value to compare and check if LTS version

parent 19b4ff36
Pipeline #17650 passed with stages
in 5 minutes and 48 seconds
...@@ -281,7 +281,7 @@ class LTSVersionService ...@@ -281,7 +281,7 @@ class LTSVersionService
public function isVersionLTS(int $versionNumber): bool public function isVersionLTS(int $versionNumber): bool
{ {
$firstRelease = $this->getFirstReleaseOfMainVersion($versionNumber); $firstRelease = $this->getFirstReleaseOfMainVersion($versionNumber);
$mainVersion = $firstRelease / self::FACTOR_MAIN_VERSION; $mainVersion = floor($firstRelease / self::FACTOR_MAIN_VERSION);
return ($mainVersion >= self::FIRST_LTS_VERSION_WITH_MAIN_VERSION_NUMBER && $mainVersion <= $this->getLatestDevelopmentVersion()) || in_array($firstRelease, $this->ltsVersionsWithMinorVersions, true); return ($mainVersion >= self::FIRST_LTS_VERSION_WITH_MAIN_VERSION_NUMBER && $mainVersion <= $this->getLatestDevelopmentVersion()) || in_array($firstRelease, $this->ltsVersionsWithMinorVersions, true);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment