mapTransferToEntity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
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\Converter;
9
10
use Generated\Shared\Transfer\AmazonpayPaymentTransfer;
11
use Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpay;
12
13
class AmazonPayTransferToEntityConverter implements AmazonPayTransferToEntityConverterInterface
14
{
15
    /**
16
     * @param \Generated\Shared\Transfer\AmazonpayPaymentTransfer $amazonpayPaymentTransfer
17
     *
18
     * @return \Orm\Zed\AmazonPay\Persistence\SpyPaymentAmazonpay
19
     */
20
    public function mapTransferToEntity(AmazonpayPaymentTransfer $amazonpayPaymentTransfer)
21
    {
22
        $paymentEntity = new SpyPaymentAmazonpay();
23
        $paymentEntity->fromArray($amazonpayPaymentTransfer->toArray());
24
25
        return $paymentEntity;
26
    }
27
}
28