Elv   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 34
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethodName() 0 3 1
A getPaymentTransfer() 0 3 1
A mapMethodDataToPayment() 0 8 1
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\Order\MethodMapper;
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 Orm\Zed\Ratepay\Persistence\SpyPaymentRatepay;
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...
12
use SprykerEco\Shared\Ratepay\RatepayConfig;
13
14
class Elv extends AbstractMapper
15
{
16
    /**
17
     * @return string
18
     */
19
    public function getMethodName()
20
    {
21
        return RatepayConfig::ELV;
22
    }
23
24
    /**
25
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
26
     *
27
     * @return \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...
28
     */
29
    protected function getPaymentTransfer(QuoteTransfer $quoteTransfer)
30
    {
31
        return $quoteTransfer->getPayment()->getRatepayElv();
32
    }
33
34
    /**
35
     * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
36
     * @param \Orm\Zed\Ratepay\Persistence\SpyPaymentRatepay $payment
37
     *
38
     * @return void
39
     */
40
    public function mapMethodDataToPayment(QuoteTransfer $quoteTransfer, SpyPaymentRatepay $payment)
41
    {
42
        parent::mapMethodDataToPayment($quoteTransfer, $payment);
43
44
        $paymentTransfer = $this->getPaymentTransfer($quoteTransfer);
45
        $payment
46
            ->setBankAccountBic($paymentTransfer->requireBankAccountBic()->getBankAccountBic())
47
            ->setBankAccountIban($paymentTransfer->requireBankAccountIban()->getBankAccountIban());
48
    }
49
}
50