Code Duplication    Length = 11-11 lines in 2 locations

PayloadGenerator/PaymentRequestPayloadGenerator.php 2 locations

@@ 96-106 (lines=11) @@
93
        }
94
95
        // add payment fee as an order line if it's set
96
        if ($this->dandomainPayment->getPaymentFee() && 0 !== (int) $this->dandomainPayment->getPaymentFee()->getAmount()) {
97
            $orderLinePayload = $this->createOrderLine(
98
                $this->dandomainPayment->getPaymentMethod(),
99
                $this->dandomainPayment->getPaymentMethod(),
100
                1,
101
                $this->dandomainPayment->getPaymentFee(),
102
                null,
103
                OrderLinePayload::GOODS_TYPE_HANDLING
104
            );
105
            $paymentRequestPayload->addOrderLine($orderLinePayload);
106
        }
107
108
        // add shipping fee as an order line if it's set
109
        if ($this->dandomainPayment->getShippingFee() && 0 !== (int) $this->dandomainPayment->getShippingFee()->getAmount()) {
@@ 109-119 (lines=11) @@
106
        }
107
108
        // add shipping fee as an order line if it's set
109
        if ($this->dandomainPayment->getShippingFee() && 0 !== (int) $this->dandomainPayment->getShippingFee()->getAmount()) {
110
            $orderLinePayload = $this->createOrderLine(
111
                $this->dandomainPayment->getShippingMethod(),
112
                $this->dandomainPayment->getShippingMethod(),
113
                1,
114
                $this->dandomainPayment->getShippingFee(),
115
                null,
116
                OrderLinePayload::GOODS_TYPE_SHIPMENT
117
            );
118
            $paymentRequestPayload->addOrderLine($orderLinePayload);
119
        }
120
121
        $customerNames = explode(' ', $this->dandomainPayment->getCustomerName(), 2);
122
        $shippingNames = explode(' ', $this->dandomainPayment->getDeliveryName(), 2);