Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Aug 23, 2024
1 parent 00bddb4 commit 7e628c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Foundation/Listeners/CalculatePromotions.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function handle(CouponAdded|CouponRemoved $event): void
if ($promotion->isValid() && $promotion->isEligible($this->cartModel)) {
/** @var PromotionAction $action */
foreach ($promotion->getActions() as $action) {
foreach($action->execute($this->cartModel) as $adjustment) {
foreach ($action->execute($this->cartModel) as $adjustment) {
if ($this->isAppliedToOurCart($adjustment)) {
$cartPromotionsTotal += $adjustment->getAmount();
}
Expand All @@ -49,7 +49,7 @@ public function handle(CouponAdded|CouponRemoved $event): void

public function isAppliedToOurCart(Adjustment $adjustment): bool
{
if ($adjustment->getAdjustable()::class !== $this->cartModel::class) {
if ($this->cartModel::class !== $adjustment->getAdjustable()::class) {
return false;
}

Expand Down
2 changes: 0 additions & 2 deletions src/Foundation/Listeners/CalculateTaxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

use Vanilo\Adjustments\Contracts\Adjustment;
use Vanilo\Adjustments\Models\AdjustmentTypeProxy;
use Vanilo\Cart\CartManager;
use Vanilo\Cart\Contracts\Cart;
use Vanilo\Cart\Contracts\CartEvent;
use Vanilo\Checkout\Contracts\Checkout as CheckoutContract;
use Vanilo\Checkout\Contracts\CheckoutEvent;
use Vanilo\Checkout\Facades\Checkout;
use Vanilo\Foundation\Models\CartItem;
use Vanilo\Support\Dto\DetailedAmount;
use Vanilo\Taxes\Contracts\TaxEngineDriver;
Expand Down

0 comments on commit 7e628c9

Please sign in to comment.