Passed
Push — master ( f22158...709c4a )
by Kauri
31s
created

InterestAmountCalculator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getInterestAmount() 0 5 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Kauri\Loan;
6
7
8
class InterestAmountCalculator implements InterestAmountCalculatorInterface
9
{
10
    /**
11
     * @param float $presentValue
12
     * @param float $ratePerPeriod
13
     * @return float
14
     */
15
    public function getInterestAmount(float $presentValue, float $ratePerPeriod) : float
16
    {
17
        $interestAmount = ($presentValue * ($ratePerPeriod / 100));
18
        return $interestAmount;
19
    }
20
21
}