From c549ace5ba92539653dc56ef342dba1e67a10205 Mon Sep 17 00:00:00 2001 From: Arthur Monney Date: Mon, 25 Sep 2023 16:30:26 +0200 Subject: [PATCH] Fix PHPStan error --- .../admin/src/Http/Livewire/Modals/UpdateVariantStock.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/admin/src/Http/Livewire/Modals/UpdateVariantStock.php b/packages/admin/src/Http/Livewire/Modals/UpdateVariantStock.php index 89f3ae71f..d33491702 100644 --- a/packages/admin/src/Http/Livewire/Modals/UpdateVariantStock.php +++ b/packages/admin/src/Http/Livewire/Modals/UpdateVariantStock.php @@ -7,7 +7,6 @@ use Illuminate\Contracts\View\View; use Livewire\WithPagination; use LivewireUI\Modal\ModalComponent; -use Shopper\Core\Models\Product; use Shopper\Core\Repositories\Ecommerce\ProductRepository; use Shopper\Core\Repositories\InventoryHistoryRepository; use Shopper\Core\Repositories\InventoryRepository; @@ -22,10 +21,9 @@ class UpdateVariantStock extends ModalComponent public function mount(int $id): void { - /** @var Product $variant */ $this->product = $variant = (new ProductRepository())->getById($id); - $this->stock = $variant->stock; - $this->realStock = $variant->stock; + $this->stock = $variant->stock; // @phpstan-ignore-line + $this->realStock = $variant->stock; // @phpstan-ignore-line } public static function modalMaxWidth(): string