fix: resolve PHPStan static analysis warnings

This commit is contained in:
xboard
2025-04-14 02:12:42 +08:00
parent 3d254c02c1
commit 2d3e4b4a95
84 changed files with 2330 additions and 1190 deletions
+2 -3
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'));
}