@@ -23,14 +23,14 @@ class NonPeriodic
23
23
* Excel Function:
24
24
* =XIRR(values,dates,guess)
25
25
*
26
- * @param float[] $values A series of cash flow payments
26
+ * @param mixed $values A series of cash flow payments, expecting float[]
27
27
* The series of values must contain at least one positive value & one negative value
28
28
* @param mixed[] $dates A series of payment dates
29
29
* The first payment date indicates the beginning of the schedule of payments
30
30
* All other dates must be later than this date, but they may occur in any order
31
31
* @param mixed $guess An optional guess at the expected answer
32
32
*/
33
- public static function rate (array $ values , array $ dates , mixed $ guess = self ::DEFAULT_GUESS ): float |string
33
+ public static function rate (mixed $ values , mixed $ dates , mixed $ guess = self ::DEFAULT_GUESS ): float |string
34
34
{
35
35
$ rslt = self ::xirrPart1 ($ values , $ dates );
36
36
if ($ rslt !== '' ) {
@@ -106,18 +106,18 @@ public static function rate(array $values, array $dates, mixed $guess = self::DE
106
106
* Excel Function:
107
107
* =XNPV(rate,values,dates)
108
108
*
109
- * @param array|float $rate the discount rate to apply to the cash flows
110
- * @param float[] $values A series of cash flows that corresponds to a schedule of payments in dates.
109
+ * @param mixed $rate the discount rate to apply to the cash flows, expect array|float
110
+ * @param mixed $values A series of cash flows that corresponds to a schedule of payments in dates, expecting floag[] .
111
111
* The first payment is optional and corresponds to a cost or payment that occurs
112
112
* at the beginning of the investment.
113
113
* If the first value is a cost or payment, it must be a negative value.
114
114
* All succeeding payments are discounted based on a 365-day year.
115
115
* The series of values must contain at least one positive value and one negative value.
116
- * @param mixed[] $dates A schedule of payment dates that corresponds to the cash flow payments.
116
+ * @param mixed $dates A schedule of payment dates that corresponds to the cash flow payments, expecting mixed[] .
117
117
* The first payment date indicates the beginning of the schedule of payments.
118
118
* All other dates must be later than this date, but they may occur in any order.
119
119
*/
120
- public static function presentValue (array | float $ rate , array $ values , array $ dates ): float |string
120
+ public static function presentValue (mixed $ rate , mixed $ values , mixed $ dates ): float |string
121
121
{
122
122
return self ::xnpvOrdered ($ rate , $ values , $ dates , true );
123
123
}
0 commit comments