Making PHPStan happy

This commit is contained in:
Pavel Shevaev 2023-08-16 14:05:00 +03:00
parent 7e5a25237e
commit 7eea49897f
2 changed files with 5 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
tags

View File

@ -40,7 +40,7 @@ function game_version_code($str = null)
$min = $items[1]; $min = $items[1];
$pat = isset($items[2]) ? $items[2] : 0; $pat = isset($items[2]) ? $items[2] : 0;
$num = $pat + $min*100 + $maj*1000000; $num = $pat + intval($min)*100 + intval($maj)*1000000;
return $num; return $num;
} }
@ -67,6 +67,8 @@ function get_inc_game_version()
{ {
$string = game_version(); $string = game_version();
$most_significant_number = -1;
for($i = strlen($string) - 1; $i >= 0; $i--) for($i = strlen($string) - 1; $i >= 0; $i--)
{ {
if(is_numeric($string[$i])) if(is_numeric($string[$i]))