| 1 | <?php |
||
| 8 | class Calculator |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Get the interest when you know all the payments and their dates. Use this function when you have |
||
| 12 | * administration fees at the first payment and/or when payments are irregular. |
||
| 13 | * |
||
| 14 | * @param int $principal |
||
| 15 | * @param string $startDate in format 'YYYY-mm-dd' |
||
| 16 | * @param array $payments array with payment dates and values ['YYYY-mm-dd'=>int] |
||
| 17 | * @param float $guess A guess what the interest may be. Between zero and one. Example 0.045 |
||
| 18 | * |
||
| 19 | * @return float |
||
| 20 | */ |
||
| 21 | public function withSpecifiedPayments(int $principal, string $startDate, array $payments, float $guess): float |
||
| 25 | |||
| 26 | public function withEqualPayments() |
||
| 30 | } |
||
| 31 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.