ShipmentDataQuoteInitializer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A update() 0 8 2
1
<?php
2
3
/**
4
 * Apache OSL-2
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\AmazonPay\Business\Quote;
9
10
use Generated\Shared\Transfer\QuoteTransfer;
11
use Generated\Shared\Transfer\ShipmentTransfer;
12
13
class ShipmentDataQuoteInitializer implements QuoteUpdaterInterface
14
{
15
    /**
16
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
17
     *
18
     * @return \Generated\Shared\Transfer\QuoteTransfer
19
     */
20
    public function update(QuoteTransfer $quoteTransfer)
21
    {
22
        if (!$quoteTransfer->getShipment()) {
23
            $shipmentTransfer = new ShipmentTransfer();
24
            $quoteTransfer->setShipment($shipmentTransfer);
25
        }
26
27
        return $quoteTransfer;
28
    }
29
}
30