Skip to content

Commit

Permalink
minor #174 [CreditMemo] Remove unused service from credit memo genera…
Browse files Browse the repository at this point in the history
…tor (GSadee)

This PR was merged into the 1.0-dev branch.

Discussion
----------

After #172 

Commits
-------

8d2f7a8 [CreditMemo] Remove unused service from credit memo generator
  • Loading branch information
lchrusciel authored Jan 14, 2020
2 parents d3363aa + 8d2f7a8 commit 3f2640a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions spec/Generator/CreditMemoGeneratorSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -25,15 +24,13 @@
final class CreditMemoGeneratorSpec extends ObjectBehavior
{
function let(
OrderRepositoryInterface $orderRepository,
CreditMemoUnitGeneratorInterface $orderItemUnitCreditMemoUnitGenerator,
CreditMemoUnitGeneratorInterface $shipmentCreditMemoUnitGenerator,
NumberGenerator $creditMemoNumberGenerator,
CurrentDateTimeProviderInterface $currentDateTimeProvider,
CreditMemoIdentifierGeneratorInterface $creditMemoIdentifierGenerator
): void {
$this->beConstructedWith(
$orderRepository,
$orderItemUnitCreditMemoUnitGenerator,
$shipmentCreditMemoUnitGenerator,
$creditMemoNumberGenerator,
Expand Down
6 changes: 0 additions & 6 deletions src/Generator/CreditMemoGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,9 +17,6 @@

final class CreditMemoGenerator implements CreditMemoGeneratorInterface
{
/** @var OrderRepositoryInterface */
private $orderRepository;

/** @var CreditMemoUnitGeneratorInterface */
private $orderItemUnitCreditMemoUnitGenerator;

Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/services/generator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
</service>

<service id="Sylius\RefundPlugin\Generator\CreditMemoGenerator">
<argument type="service" id="sylius.repository.order" />
<argument type="service" id="Sylius\RefundPlugin\Generator\OrderItemUnitCreditMemoUnitGenerator" />
<argument type="service" id="Sylius\RefundPlugin\Generator\ShipmentCreditMemoUnitGenerator" />
<argument type="service" id="Sylius\RefundPlugin\Generator\SequentialNumberGenerator" />
Expand Down

0 comments on commit 3f2640a

Please sign in to comment.