fix: resolve PHPStan static analysis warnings

This commit is contained in:
xboard
2025-05-07 19:48:19 +08:00
parent db235c10e8
commit 97e7ffccae
86 changed files with 2335 additions and 1206 deletions

View File

@@ -74,10 +74,9 @@ class PlanService
// 转换周期格式为新版格式
$periodKey = self::getPeriodKey($period);
$price = $this->plan->prices[$periodKey] ?? null;
// 检查价格时使用新版格式
if (!isset($this->plan->prices[$periodKey]) || $this->plan->prices[$periodKey] === NULL) {
if ($price === null) {
throw new ApiException(__('This payment period cannot be purchased, please choose another period'));
}