Skip to content

Commit

Permalink
Fix PHPStan error
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Sep 25, 2023
1 parent 72245d3 commit c549ace
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit c549ace

Please sign in to comment.