fix: phan 출력 결과에 따라 처리
- switch에 변수를 정하는 경우 default에 throw - Util::getPost에 일부 타입 강제 - array인 일부 값들에 PHPDoc 타입 지정 - Enum에 toString이 없으므로 value값 지정 - 사용하지 않는 use function 제거
This commit is contained in:
@@ -199,7 +199,7 @@ class KVStorage
|
||||
$keys = Util::valuesFromEnumArray($keys);
|
||||
|
||||
if ($this->cacheData === null) {
|
||||
return $this->getDBValues($keys);
|
||||
return $this->getDBValues($keys)->toArray();
|
||||
}
|
||||
|
||||
$result = [];
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace sammo;
|
||||
//NOTE: JavaScript 버전과 일치
|
||||
const MAX_RNG_SUPPORT_BIT = 53;
|
||||
if (PHP_INT_SIZE * 8 < MAX_RNG_SUPPORT_BIT) {
|
||||
throw new \RangeException("PHP not support {$MAX_RNG_SUPPORT_BIT} bit integer");
|
||||
throw new \RangeException('PHP not support '.MAX_RNG_SUPPORT_BIT.' bit integer');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-3
@@ -520,9 +520,8 @@ class Util extends \utilphp\util
|
||||
/**
|
||||
* 각 값의 비중에 따라 랜덤한 값을 선택.
|
||||
*
|
||||
* @param array $items 각 수치와 비중. [값, weight] 으로 보관
|
||||
*
|
||||
* @return object 선택된 랜덤 값의 첫번째 값
|
||||
* @param array<{0:array|object,1:float|int}> $items 각 수치와 비중. [값, weight] 으로 보관
|
||||
* @return array|object 선택된 랜덤 값의 첫번째 값
|
||||
*/
|
||||
public static function choiceRandomUsingWeightPair(array $items)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user