| 1 | <?php  | 
            ||
| 8 | class InterestAmountCalculator implements InterestAmountCalculatorInterface  | 
            ||
| 9 | { | 
            ||
| 10 | /**  | 
            ||
| 11 | * Calculate interest amount for present value based on interest rate  | 
            ||
| 12 | * @param float $presentValue  | 
            ||
| 13 | * @param float $interestRate  | 
            ||
| 14 | * @return float  | 
            ||
| 15 | */  | 
            ||
| 16 | 4 | public function getInterestAmount(float $presentValue, float $interestRate): float  | 
            |
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * @param float $interestRate Yearly interest rate (based on 360 days)  | 
            ||
| 24 | * @param float $periodLength Period length in days  | 
            ||
| 25 | * @return float  | 
            ||
| 26 | */  | 
            ||
| 27 | 4 | public function getPeriodInterestRate(float $interestRate, float $periodLength): float  | 
            |
| 32 | }  | 
            ||
| 33 |