Passed
Pull Request — master (#4)
by Andrey
11:07 queued 03:32
created

CloseOrderAdapter::call()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 7
loc 7
rs 9.4285
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\Api\Adapter;
9
10
use Generated\Shared\Transfer\AmazonpayCallTransfer;
11
12 View Code Duplication
class CloseOrderAdapter extends AbstractAdapter
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
15
    /**
16
     * @param \Generated\Shared\Transfer\AmazonpayCallTransfer $amazonpayCallTransfer
17
     *
18
     * @return \Generated\Shared\Transfer\AmazonpayResponseTransfer
19
     */
20
    public function call(AmazonpayCallTransfer $amazonpayCallTransfer)
21
    {
22
        $result = $this->client->closeOrderReference([
23
            AbstractAdapter::AMAZON_ORDER_REFERENCE_ID => $amazonpayCallTransfer->getAmazonpayPayment()->getOrderReferenceId(),
24
        ]);
25
26
        return $this->converter->convert($result);
27
    }
28
29
}
30