@@ -23,14 +23,14 @@ class NonPeriodic
2323 * Excel Function:
2424 * =XIRR(values,dates,guess)
2525 *
26- * @param float[] $values A series of cash flow payments
26+ * @param mixed $values A series of cash flow payments, expecting float[]
2727 * The series of values must contain at least one positive value & one negative value
2828 * @param mixed[] $dates A series of payment dates
2929 * The first payment date indicates the beginning of the schedule of payments
3030 * All other dates must be later than this date, but they may occur in any order
3131 * @param mixed $guess An optional guess at the expected answer
3232 */
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
3434 {
3535 $ rslt = self ::xirrPart1 ($ values , $ dates );
3636 if ($ rslt !== '' ) {
@@ -106,18 +106,18 @@ public static function rate(array $values, array $dates, mixed $guess = self::DE
106106 * Excel Function:
107107 * =XNPV(rate,values,dates)
108108 *
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[] .
111111 * The first payment is optional and corresponds to a cost or payment that occurs
112112 * at the beginning of the investment.
113113 * If the first value is a cost or payment, it must be a negative value.
114114 * All succeeding payments are discounted based on a 365-day year.
115115 * 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[] .
117117 * The first payment date indicates the beginning of the schedule of payments.
118118 * All other dates must be later than this date, but they may occur in any order.
119119 */
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
121121 {
122122 return self ::xnpvOrdered ($ rate , $ values , $ dates , true );
123123 }
0 commit comments