Elv::getMethodName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Ratepay\Business\Request\Payment\Method;
9
10
use Generated\Shared\Transfer\QuoteTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\QuoteTransfer 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...
11
use Generated\Shared\Transfer\RatepayPaymentElvTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...tepayPaymentElvTransfer 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...
12
use Generated\Shared\Transfer\RatepayPaymentRequestTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...yPaymentRequestTransfer 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...
13
use SprykerEco\Shared\Ratepay\RatepayConfig;
14
15
/**
16
 * Ratepay Elv payment method.
17
 */
18
class Elv extends AbstractMethod
19
{
20
    /**
21
     * @return string
22
     */
23
    public function getMethodName()
24
    {
25
        return RatepayConfig::ELV;
26
    }
27
28
    /**
29
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
30
     *
31
     * @return \Generated\Shared\Transfer\RatepayPaymentElvTransfer
32
     */
33
    public function getPaymentData(QuoteTransfer $quoteTransfer)
34
    {
35
        return $quoteTransfer
36
            ->requirePayment()
37
            ->getPayment()
38
            ->requireRatepayElv()
39
            ->getRatepayElv();
40
    }
41
42
    /**
43
     * @param \Generated\Shared\Transfer\RatepayPaymentRequestTransfer $ratepayPaymentRequestTransfer
44
     *
45
     * @return void
46
     */
47
    protected function mapPaymentData(RatepayPaymentRequestTransfer $ratepayPaymentRequestTransfer)
48
    {
49
        parent::mapPaymentData($ratepayPaymentRequestTransfer);
50
        $this->mapBankAccountData($ratepayPaymentRequestTransfer);
51
    }
52
53
    /**
54
     * @param \Orm\Zed\Ratepay\Persistence\SpyPaymentRatepay $payment
0 ignored issues
show
Bug introduced by
The type Orm\Zed\Ratepay\Persistence\SpyPaymentRatepay 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...
55
     *
56
     * @return \Generated\Shared\Transfer\RatepayPaymentElvTransfer
57
     */
58
    protected function getPaymentTransferObject($payment)
59
    {
60
        return new RatepayPaymentElvTransfer();
61
    }
62
}
63