HeidelpayResponseToIdealAuthorizeForm::map()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 2
dl 0
loc 11
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Yves\Heidelpay\Mapper;
9
10
use Generated\Shared\Transfer\HeidelpayIdealAuthorizeFormTransfer;
11
use Generated\Shared\Transfer\HeidelpayResponseTransfer;
12
13
class HeidelpayResponseToIdealAuthorizeForm implements HeidelpayResponseToIdealAuthorizeFormInterface
14
{
15
    /**
16
     * @param \Generated\Shared\Transfer\HeidelpayResponseTransfer $responseTransfer
17
     * @param \Generated\Shared\Transfer\HeidelpayIdealAuthorizeFormTransfer $idealAuthoriseFormTransfer
18
     *
19
     * @return void
20
     */
21
    public function map(HeidelpayResponseTransfer $responseTransfer, HeidelpayIdealAuthorizeFormTransfer $idealAuthoriseFormTransfer): void
22
    {
23
        $idealAuthoriseFormTransfer
24
            ->setActionUrl(
25
                $responseTransfer->getPaymentFormUrl()
26
            )
27
            ->setCountries(
28
                $responseTransfer->getConfig()->getBankCountries()
29
            )
30
            ->setBanks(
31
                $responseTransfer->getConfig()->getBankBrands()
32
            );
33
    }
34
}
35