Passed
Pull Request — feature/ECO-948-renaming-and-r... (#7)
by Andrey
04:36 queued 01:50
created

GetOrderAuthorizationDetailsAdapter::call()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 11
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 1
dl 11
loc 11
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 GetOrderAuthorizationDetailsAdapter 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
     * @param \Generated\Shared\Transfer\AmazonpayCallTransfer $amazonpayCallTransfer
16
     *
17
     * @return \Generated\Shared\Transfer\AmazonpayResponseTransfer
18
     */
19
    public function call(AmazonpayCallTransfer $amazonpayCallTransfer)
20
    {
21
        $result = $this->client->getAuthorizationDetails([
22
            static::AMAZON_AUTHORIZATION_ID =>
23
                $amazonpayCallTransfer
24
                    ->getAmazonpayPayment()
25
                    ->getAuthorizationDetails()
26
                    ->getAmazonAuthorizationId(),
27
        ]);
28
29
        return $this->converter->convert($result);
30
    }
31
}
32