Passed
Push — trunk ( 49986f...44ff76 )
by Christian
22:08 queued 08:23
created

RefundTestPaymentHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 2 1
A refund() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Test\Integration\PaymentHandler;
4
5
use Shopware\Core\Checkout\Order\Aggregate\OrderTransactionCaptureRefund\OrderTransactionCaptureRefundStateHandler;
6
use Shopware\Core\Checkout\Payment\Cart\PaymentHandler\RefundPaymentHandlerInterface;
7
use Shopware\Core\Framework\Context;
8
use Shopware\Core\Framework\Log\Package;
9
10
/**
11
 * @internal
12
 */
13
#[Package('checkout')]
14
class RefundTestPaymentHandler implements RefundPaymentHandlerInterface
15
{
16
    public function __construct(private readonly OrderTransactionCaptureRefundStateHandler $stateHandler)
17
    {
18
    }
19
20
    public function refund(string $refundId, Context $context): void
21
    {
22
        $this->stateHandler->complete($refundId, $context);
23
    }
24
}
25