Code Duplication    Length = 11-11 lines in 2 locations

PayloadGenerator/PaymentRequestPayloadGenerator.php 2 locations

@@ 89-99 (lines=11) @@
86
        }
87
88
        // add payment fee as an order line if it's set
89
        if ($this->paymentRequest->getPaymentFee()) {
90
            $orderLinePayload = $this->createOrderLine(
91
                $this->paymentRequest->getPaymentMethod(),
92
                $this->paymentRequest->getPaymentMethod(),
93
                1,
94
                $this->paymentRequest->getPaymentFee(),
95
                null,
96
                OrderLinePayload::GOODS_TYPE_HANDLING
97
            );
98
            $paymentRequestPayload->addOrderLine($orderLinePayload);
99
        }
100
101
        // add shipping fee as an order line if it's set
102
        if ($this->paymentRequest->getShippingFee()) {
@@ 102-112 (lines=11) @@
99
        }
100
101
        // add shipping fee as an order line if it's set
102
        if ($this->paymentRequest->getShippingFee()) {
103
            $orderLinePayload = $this->createOrderLine(
104
                $this->paymentRequest->getShippingMethod(),
105
                $this->paymentRequest->getShippingMethod(),
106
                1,
107
                $this->paymentRequest->getShippingFee(),
108
                null,
109
                OrderLinePayload::GOODS_TYPE_SHIPMENT
110
            );
111
            $paymentRequestPayload->addOrderLine($orderLinePayload);
112
        }
113
114
        $customerNames = explode(' ', $this->paymentRequest->getCustomerName(), 2);
115
        $shippingNames = explode(' ', $this->paymentRequest->getDeliveryName(), 2);