From 8d2f7a85a15a8a0aaa2fa048a254f8761da3818a Mon Sep 17 00:00:00 2001 From: Grzegorz Sadowski Date: Tue, 14 Jan 2020 13:38:28 +0100 Subject: [PATCH] [CreditMemo] Remove unused service from credit memo generator --- spec/Generator/CreditMemoGeneratorSpec.php | 3 --- src/Generator/CreditMemoGenerator.php | 6 ------ src/Resources/config/services/generator.xml | 1 - 3 files changed, 10 deletions(-) diff --git a/spec/Generator/CreditMemoGeneratorSpec.php b/spec/Generator/CreditMemoGeneratorSpec.php index 52e31eae..aadd9802 100644 --- a/spec/Generator/CreditMemoGeneratorSpec.php +++ b/spec/Generator/CreditMemoGeneratorSpec.php @@ -9,7 +9,6 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopBillingDataInterface; -use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\RefundPlugin\Entity\CreditMemo; use Sylius\RefundPlugin\Entity\CreditMemoUnit; use Sylius\RefundPlugin\Entity\CustomerBillingData; @@ -25,7 +24,6 @@ final class CreditMemoGeneratorSpec extends ObjectBehavior { function let( - OrderRepositoryInterface $orderRepository, CreditMemoUnitGeneratorInterface $orderItemUnitCreditMemoUnitGenerator, CreditMemoUnitGeneratorInterface $shipmentCreditMemoUnitGenerator, NumberGenerator $creditMemoNumberGenerator, @@ -33,7 +31,6 @@ function let( CreditMemoIdentifierGeneratorInterface $creditMemoIdentifierGenerator ): void { $this->beConstructedWith( - $orderRepository, $orderItemUnitCreditMemoUnitGenerator, $shipmentCreditMemoUnitGenerator, $creditMemoNumberGenerator, diff --git a/src/Generator/CreditMemoGenerator.php b/src/Generator/CreditMemoGenerator.php index 3eb9c721..3a28d0ca 100644 --- a/src/Generator/CreditMemoGenerator.php +++ b/src/Generator/CreditMemoGenerator.php @@ -8,7 +8,6 @@ use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShopBillingDataInterface as ChannelShopBillingData; -use Sylius\Component\Core\Repository\OrderRepositoryInterface; use Sylius\RefundPlugin\Entity\CreditMemo; use Sylius\RefundPlugin\Entity\CreditMemoInterface; use Sylius\RefundPlugin\Entity\CustomerBillingData; @@ -18,9 +17,6 @@ final class CreditMemoGenerator implements CreditMemoGeneratorInterface { - /** @var OrderRepositoryInterface */ - private $orderRepository; - /** @var CreditMemoUnitGeneratorInterface */ private $orderItemUnitCreditMemoUnitGenerator; @@ -37,14 +33,12 @@ final class CreditMemoGenerator implements CreditMemoGeneratorInterface private $uuidCreditMemoIdentifierGenerator; public function __construct( - OrderRepositoryInterface $orderRepository, CreditMemoUnitGeneratorInterface $orderItemUnitCreditMemoUnitGenerator, CreditMemoUnitGeneratorInterface $shipmentCreditMemoUnitGenerator, NumberGenerator $creditMemoNumberGenerator, CurrentDateTimeProviderInterface $currentDateTimeProvider, CreditMemoIdentifierGeneratorInterface $uuidCreditMemoIdentifierGenerator ) { - $this->orderRepository = $orderRepository; $this->orderItemUnitCreditMemoUnitGenerator = $orderItemUnitCreditMemoUnitGenerator; $this->shipmentCreditMemoUnitGenerator = $shipmentCreditMemoUnitGenerator; $this->creditMemoNumberGenerator = $creditMemoNumberGenerator; diff --git a/src/Resources/config/services/generator.xml b/src/Resources/config/services/generator.xml index bbac8411..6831fb0f 100644 --- a/src/Resources/config/services/generator.xml +++ b/src/Resources/config/services/generator.xml @@ -19,7 +19,6 @@ -