BankAccountMapper::map()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
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\Api\Mapper;
9
10
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...
11
use Generated\Shared\Transfer\RatepayRequestBankAccountTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfe...uestBankAccountTransfer 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\RatepayRequestTransfer;
0 ignored issues
show
Bug introduced by
The type Generated\Shared\Transfer\RatepayRequestTransfer 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
14
class BankAccountMapper extends BaseMapper
15
{
16
    /**
17
     * @var \Generated\Shared\Transfer\RatepayPaymentRequestTransfer
18
     */
19
    protected $ratepayPaymentRequestTransfer;
20
21
    /**
22
     * @var \Generated\Shared\Transfer\RatepayRequestTransfer
23
     */
24
    protected $requestTransfer;
25
26
    /**
27
     * @param \Generated\Shared\Transfer\RatepayPaymentRequestTransfer $ratepayPaymentRequestTransfer
28
     * @param \Generated\Shared\Transfer\RatepayRequestTransfer $requestTransfer
29
     */
30
    public function __construct(
31
        RatepayPaymentRequestTransfer $ratepayPaymentRequestTransfer,
32
        RatepayRequestTransfer $requestTransfer
33
    ) {
34
35
        $this->ratepayPaymentRequestTransfer = $ratepayPaymentRequestTransfer;
36
        $this->requestTransfer = $requestTransfer;
37
    }
38
39
    /**
40
     * @return void
41
     */
42
    public function map()
43
    {
44
        $this->requestTransfer->setBankAccount(new RatepayRequestBankAccountTransfer())->getBankAccount()
45
            ->setOwner($this->ratepayPaymentRequestTransfer->getBankAccountHolder())
46
            ->setIban($this->ratepayPaymentRequestTransfer->getBankAccountIban())
47
            ->setBicSwift($this->ratepayPaymentRequestTransfer->getBankAccountBic());
48
    }
49
}
50