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

InterestAmountCalculator::getInterestAmount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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
}