정적 분석기 결과 반영
This commit is contained in:
@@ -21,6 +21,10 @@ class CityHelper{
|
||||
$list = [];
|
||||
$listInv = [];
|
||||
$listByNation = [];
|
||||
|
||||
'@phan-var array<int,mixed>|null $list';
|
||||
'@phan-var array<string,mixed>|null $listInv';
|
||||
'@phan-var array<int,mixed>|null $listByNation';
|
||||
|
||||
foreach (DB::db()->query('SELECT `city` as `id`, `name`, `level`, `nation` from city') as $city) {
|
||||
$id = $city['id'];
|
||||
|
||||
@@ -20,7 +20,7 @@ class ChangeCity extends \sammo\Event\Action{
|
||||
private $queries;
|
||||
private $targetType = 'all';
|
||||
private $targetArgs = [];
|
||||
public function __construct($target = null, array $actions){
|
||||
public function __construct($target, array $actions){
|
||||
|
||||
//values 포맷은 key, value로
|
||||
|
||||
@@ -74,7 +74,7 @@ class ChangeCity extends \sammo\Event\Action{
|
||||
|
||||
$matches = null;
|
||||
if(preg_match(self::REGEXP_PERCENT, $value, $matches)){
|
||||
$value = round($matches[1], 0);
|
||||
$value = (int)round((float)$matches[1], 0);
|
||||
return DB::db()->sqleval('%i', Util::valueFit($value, 0, 100));
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class ChangeCity extends \sammo\Event\Action{
|
||||
|
||||
$matches = null;
|
||||
if(preg_match(self::REGEXP_PERCENT, $value, $matches)){
|
||||
$value = round($matches[1], 0);
|
||||
$value = (int)round((float)$matches[1], 0);
|
||||
return DB::db()->sqleval('ROUND(%b * %d, 0)', $keyMax, $value/100);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user