Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial.php
public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0)
    {
        $settlement = Functions::flattenSingleValue($settlement);
        $maturity = Functions::flattenSingleValue($maturity);
        $frequency = (int) Functions::flattenSingleValue($frequency);
        $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);

        if (is_string($settlement = DateTime::getDateValue($settlement))) {
            return Functions::VALUE();
        }
        if (is_string($maturity = DateTime::getDateValue($maturity))) {
            return Functions::VALUE();
        }

        if (($settlement > $maturity) ||
            (!self::isValidFrequency($frequency)) ||
            (($basis < 0) || ($basis > 4))) {
            return Functions::NAN();
        }

        return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
    }
public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0)
    {
        $settlement = Functions::flattenSingleValue($settlement);
        $maturity = Functions::flattenSingleValue($maturity);
        $frequency = (int) Functions::flattenSingleValue($frequency);
        $basis = ($basis === null) ? 0 : (int) Functions::flattenSingleValue($basis);

        if (is_string($settlement = DateTime::getDateValue($settlement))) {
            return Functions::VALUE();
        }
        if (is_string($maturity = DateTime::getDateValue($maturity))) {
            return Functions::VALUE();
        }

        if (($settlement > $maturity) ||
            (!self::isValidFrequency($frequency)) ||
            (($basis < 0) || ($basis > 4))) {
            return Functions::NAN();
        }

        return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true);
    }
COUPNCD.

Returns the next coupon date after the settlement date.

Excel Function:
COUPNCD(settlement,maturity,frequency[,basis])

@category Financial Functions

@param mixed $settlement The security's settlement date.
The security settlement date is the date after the issue
date when the security is traded to the buyer.
@param mixed $maturity The security's maturity date.
The maturity date is the date when the security expires.
@param mixed $frequency the number of coupon payments per year.
Valid frequency values are:
1    Annual
2    Semi-Annual
4    Quarterly
If working in Gnumeric Mode, the following frequency options are
also available
6    Bimonthly
12    Monthly
@param int $basis The type of day count to use.
0 or omitted    US (NASD) 30/360
1                Actual/actual
2                Actual/360
3                Actual/365
4                European 30/360

@return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object,
depending on the value of the ReturnDateType flag