Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CreditMemo] Remove unused service from credit memo generator #174

Merged
merged 1 commit into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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