From c5cc1b872b875b059840d39de81726c94ac6e562 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Fri, 12 Jul 2024 11:45:01 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Promotion/Actions/CartFixedDiscount.php | 6 +++--- src/Promotion/Models/PromotionAction.php | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Promotion/Actions/CartFixedDiscount.php b/src/Promotion/Actions/CartFixedDiscount.php index 3844de27..9eb049aa 100644 --- a/src/Promotion/Actions/CartFixedDiscount.php +++ b/src/Promotion/Actions/CartFixedDiscount.php @@ -29,7 +29,7 @@ public static function getID(): string public function adjust(object $subject): Adjuster { if (!$subject instanceof Cart) { - throw new \InvalidArgumentException('Subject must be an instance of '.Cart::class); + throw new \InvalidArgumentException('Subject must be an instance of ' . Cart::class); } return new SimpleDiscount($this->getConfiguration()['discount_amount'] / 100 * $subject->total()); @@ -46,7 +46,7 @@ public function setConfiguration(array $configuration): self $configuration = (new Processor())->process($this->getSchema(), $configuration); } - $this->configuration = (array)$configuration; + $this->configuration = (array) $configuration; return $this; } @@ -59,6 +59,6 @@ public function getConfiguration(): ?array $configuration = (new Processor())->process($this->getSchema(), $configuration); } - return (array)$configuration; + return (array) $configuration; } } diff --git a/src/Promotion/Models/PromotionAction.php b/src/Promotion/Models/PromotionAction.php index 70eb7a9c..42e7e6aa 100644 --- a/src/Promotion/Models/PromotionAction.php +++ b/src/Promotion/Models/PromotionAction.php @@ -10,8 +10,6 @@ use Vanilo\Promotion\Contracts\Promotion; use Vanilo\Promotion\Contracts\PromotionAction as PromotionActionContract; use Vanilo\Promotion\Contracts\PromotionActionType; -use Vanilo\Promotion\Contracts\PromotionRuleType; -use Vanilo\Promotion\PromotionRuleTypes; use Vanilo\Support\Traits\ConfigurableModel; use Vanilo\Support\Traits\ConfigurationHasNoSchema;