fix: phan 메시지에 따라 수정

- array에 +=를 phan 알아듣기 쉽게 array_merge로
- Util::array_get이 더 이상 필요없으므로 null coalescing
- array로 tuple류를 반환하는 함수에 index를 포함하도록 변경
  - php intelephense에게는 현재 무효
- getPost 일부 값에 int 지정
- 아이템에 id property를 없앴으므로 관련 코드 제거
- enum은 array key로 사용할 수 없으므로 \Ds\Map으로 변경
- KakaoKey PhanRedefineClass 에러 우회
This commit is contained in:
2022-05-09 01:25:12 +09:00
parent de5fe818e6
commit 43997b9117
21 changed files with 121 additions and 103 deletions
+4 -3
View File
@@ -882,9 +882,9 @@ function generalInfo2(General $generalObj)
</table>";
}
function getOnlineNum()
function getOnlineNum(): int
{
return KVStorage::getStorage(DB::db(), 'game_env')->online;
return KVStorage::getStorage(DB::db(), 'game_env')->getValue('online') ?? 0;
}
function onlinegen(General $general)
@@ -1075,6 +1075,7 @@ function updateTraffic()
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['year', 'month', 'refresh', 'maxonline', 'maxrefresh']);
/** @var array{year:int,month:int,refresh:int,maxonline:int,maxrefresh:int} $admin */
//최다갱신자
$user = $db->queryFirstRow('select name,refresh from general order by refresh desc limit 1');
@@ -2248,7 +2249,7 @@ function calcCityDistance(int $from, int $to, ?array $linkNationList): ?int
* @param $from 기준 도시 코드
* @param $to 대상 도시 코드
* @param $linkNationList 경로에 해당하는 국가 리스트
* @return array $dist=>[cityID, $nation] 배열 가장 앞이 가장 가까움
* @return array<int,array{int,int}[]> $dist=>[cityID, $nation] 배열 가장 앞이 가장 가까움
*/
function searchDistanceListToDest(int $from, int $to, array $linkNationList)
{