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

MultipleTestPaymentHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A capture() 0 6 1
A validate() 0 6 1
A pay() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Test\Integration\PaymentHandler;
4
5
use Shopware\Core\Checkout\Cart\Cart;
6
use Shopware\Core\Checkout\Payment\Cart\PaymentHandler\PreparedPaymentHandlerInterface;
7
use Shopware\Core\Checkout\Payment\Cart\PaymentHandler\SynchronousPaymentHandlerInterface;
8
use Shopware\Core\Checkout\Payment\Cart\PreparedPaymentTransactionStruct;
9
use Shopware\Core\Checkout\Payment\Cart\SyncPaymentTransactionStruct;
10
use Shopware\Core\Framework\Log\Package;
11
use Shopware\Core\Framework\Struct\ArrayStruct;
12
use Shopware\Core\Framework\Struct\Struct;
13
use Shopware\Core\Framework\Validation\DataBag\RequestDataBag;
14
use Shopware\Core\System\SalesChannel\SalesChannelContext;
15
16
/**
17
 * @internal
18
 */
19
#[Package('checkout')]
20
class MultipleTestPaymentHandler implements SynchronousPaymentHandlerInterface, PreparedPaymentHandlerInterface
21
{
22
    public function validate(
23
        Cart $cart,
24
        RequestDataBag $requestDataBag,
25
        SalesChannelContext $context
26
    ): Struct {
27
        return new ArrayStruct();
28
    }
29
30
    public function capture(
31
        PreparedPaymentTransactionStruct $transaction,
32
        RequestDataBag $requestDataBag,
33
        SalesChannelContext $context,
34
        Struct $preOrderPaymentStruct
35
    ): void {
36
    }
37
38
    public function pay(
39
        SyncPaymentTransactionStruct $transaction,
40
        RequestDataBag $dataBag,
41
        SalesChannelContext $salesChannelContext
42
    ): void {
43
    }
44
}
45