| Conditions | 5 |
| Paths | 16 |
| Total Lines | 24 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function buildData() |
||
| 21 | { |
||
| 22 | $return = [ |
||
| 23 | 'amount' => $this->requestTransfer->getInstallmentCalculation()->getAmount(), |
||
| 24 | ]; |
||
| 25 | if ($this->requestTransfer->getInstallmentCalculation()->getPaymentFirstday() !== null) { |
||
| 26 | $return['payment-firstday'] = $this->requestTransfer->getInstallmentCalculation()->getPaymentFirstday(); |
||
| 27 | } |
||
| 28 | if ($this->requestTransfer->getInstallmentCalculation()->getCalculationStart() !== null) { |
||
| 29 | $return['calculation-start'] = $this->requestTransfer->getInstallmentCalculation()->getCalculationStart(); |
||
| 30 | } |
||
| 31 | |||
| 32 | if ($this->requestTransfer->getInstallmentCalculation()->getSubType() == self::SUBTYPE_RATE) { |
||
| 33 | $return['calculation-rate'] = [ |
||
| 34 | 'rate' => $this->requestTransfer->getInstallmentCalculation()->getCalculationRate(), |
||
| 35 | ]; |
||
| 36 | } |
||
| 37 | if ($this->requestTransfer->getInstallmentCalculation()->getSubType() == self::SUBTYPE_TIME) { |
||
| 38 | $return['calculation-time'] = [ |
||
| 39 | 'month' => $this->requestTransfer->getInstallmentCalculation()->getMonth(), |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | return $return; |
||
| 44 | } |
||
| 54 |