Passed
Push — feature/ECO-808-scrutinizer ( 956529...82fb0b )
by Andrey
05:28 queued 01:30
created

IpnAbstractPaymentAuthorizeHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A retrievePaymentEntity() 0 5 1
A getOmsEventId() 0 3 1
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\Payment\Handler\Ipn;
9
10
use Spryker\Shared\Kernel\Transfer\AbstractTransfer;
11
use SprykerEco\Shared\Amazonpay\AmazonpayConstants;
12
13
abstract class IpnAbstractPaymentAuthorizeHandler extends IpnAbstractTransferRequestHandler
14
{
15
16
    /**
17
     * @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer | \Generated\Shared\Transfer\AmazonpayIpnPaymentAuthorizeRequestTransfer $amazonpayIpnPaymentAuthorizeRequestTransfer
18
     *
19
     * @return \Orm\Zed\Amazonpay\Persistence\SpyPaymentAmazonpay|null
1 ignored issue
show
Bug introduced by
The type Orm\Zed\Amazonpay\Persistence\SpyPaymentAmazonpay was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
     */
21
    protected function retrievePaymentEntity(AbstractTransfer $amazonpayIpnPaymentAuthorizeRequestTransfer)
22
    {
23
        return $this->amazonpayQueryContainer->queryPaymentByAuthorizationReferenceId(
24
            $amazonpayIpnPaymentAuthorizeRequestTransfer->getAuthorizationDetails()->getAuthorizationReferenceId()
0 ignored issues
show
Bug introduced by
The method getAuthorizationDetails() does not exist on Spryker\Shared\Kernel\Transfer\AbstractTransfer. It seems like you code against a sub-type of Spryker\Shared\Kernel\Transfer\AbstractTransfer such as Generated\Shared\Transfe...azonpayResponseTransfer or Generated\Shared\Transfer\AmazonpayPaymentTransfer or Generated\Shared\Transfe...uthorizeRequestTransfer. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

24
            $amazonpayIpnPaymentAuthorizeRequestTransfer->/** @scrutinizer ignore-call */ getAuthorizationDetails()->getAuthorizationReferenceId()
Loading history...
25
        )->findOne();
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    protected function getOmsEventId()
32
    {
33
        return AmazonpayConstants::OMS_EVENT_UPDATE_AUTH_STATUS;
34
    }
35
36
}
37