Revert "fix: resolve PHPStan static analysis warnings"

This reverts commit 2d3e4b4a95.
This commit is contained in:
xboard
2025-04-14 21:23:08 +08:00
parent 2d3e4b4a95
commit db235c10e8
84 changed files with 1190 additions and 2330 deletions
+2 -6
View File
@@ -2,14 +2,10 @@
namespace App\Http\Resources;
use App\Models\Order;
use App\Services\PlanService;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin Order
*/
class OrderResource extends JsonResource
{
/**
@@ -21,8 +17,8 @@ class OrderResource extends JsonResource
{
return [
...parent::toArray($request),
'period' => PlanService::getLegacyPeriod((string)$this->period),
'plan' => $this->whenLoaded('plan', fn() => PlanResource::make($this->plan)),
'period' => PlanService::getLegacyPeriod($this->period),
'plan' => PlanResource::make($this->plan),
];
}
}