InstallmentDetail   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRootTag() 0 3 1
A buildData() 0 11 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\Api\Builder;
9
10
class InstallmentDetail extends AbstractBuilder implements BuilderInterface
11
{
12
    public const ROOT_TAG = 'installment-details';
13
14
    /**
15
     * @return array
16
     */
17
    public function buildData()
18
    {
19
        $return = [
20
            'installment-number' => $this->requestTransfer->getInstallmentDetails()->getRatesNumber(),
21
            'installment-amount' => $this->requestTransfer->getInstallmentDetails()->getAmount(),
22
            'last-installment-amount' => $this->requestTransfer->getInstallmentDetails()->getLastAmount(),
23
            'interest-rate' => $this->requestTransfer->getInstallmentDetails()->getInterestRate(),
24
            'payment-firstday' => $this->requestTransfer->getInstallmentDetails()->getPaymentFirstday(),
25
        ];
26
27
        return $return;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getRootTag()
34
    {
35
        return static::ROOT_TAG;
36
    }
37
}
38