Completed
Push — master ( afa46a...04583c )
by Joachim
02:00
created

Gateway   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 45
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createOrderLine() 0 11 1
A createCustomerInfo() 0 18 1
A createConfig() 0 11 1
1
<?php
2
3
namespace Loevgaard\DandomainAltapayBundle\Tests\PayloadGenerator\Fixture;
4
5
use Loevgaard\AltaPay\Payload\OrderLine as OrderLinePayload;
6
use Loevgaard\AltaPay\Payload\PaymentRequest\Config as ConfigPayload;
7
use Loevgaard\AltaPay\Payload\PaymentRequest\CustomerInfo as CustomerInfoPayload;
8
use Loevgaard\DandomainAltapayBundle\PayloadGenerator\PaymentRequestPayloadGenerator;
9
10
final class Gateway extends PaymentRequestPayloadGenerator
11
{
12
    public function createOrderLine(
13
        string $description,
14
        string $itemId,
15
        string $quantity,
16
        float $unitPrice,
17
        float $taxPercent = null,
18
        string $goodsType = null
19
    ): OrderLinePayload {
20
        return parent::createOrderLine($description, $itemId, $quantity, $unitPrice, $taxPercent,
21
            $goodsType);
22
    }
23
24
    public function createCustomerInfo(
25
        string $billingFirstName,
26
        string $billingLastName,
27
        string $billingAddress,
28
        string $billingPostal,
29
        string $billingCity,
30
        string $billingCountry,
31
        string $shippingFirstName,
32
        string $shippingLastName,
33
        string $shippingAddress,
34
        string $shippingPostal,
35
        string $shippingCity,
36
        string $shippingCountry
37
    ): CustomerInfoPayload {
38
        return parent::createCustomerInfo($billingFirstName, $billingLastName, $billingAddress, $billingPostal,
39
            $billingCity, $billingCountry, $shippingFirstName, $shippingLastName, $shippingAddress, $shippingPostal,
40
            $shippingCity, $shippingCountry);
41
    }
42
43
    public function createConfig(
44
        string $callbackForm,
45
        string $callbackOk,
46
        string $callbackFail,
47
        string $callbackRedirect,
48
        string $callbackOpen,
49
        string $callbackNotification
50
    ): ConfigPayload {
51
        return parent::createConfig($callbackForm, $callbackOk, $callbackFail, $callbackRedirect, $callbackOpen,
52
            $callbackNotification);
53
    }
54
}
55