button fix, kernel update

This commit is contained in:
2024-12-19 12:53:55 +03:00
parent 4ff9fa9ad3
commit e75d21bd1b
15 changed files with 393 additions and 47 deletions

View File

@ -0,0 +1,16 @@
<?php
namespace kernel\helpers;
class Version
{
public static function getIntVersionByString(string $version): int
{
$version = preg_replace('/[^0-9]+/', '', $version);
return match (strlen($version)) {
1 => intval($version) * 100,
2 => intval($version) * 10,
3 => intval($version),
};
}
}