Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php
public static function wrapResult($value)
    {
        if (is_string($value)) {
            //    Error values cannot be "wrapped"
            if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) {
                //    Return Excel errors "as is"
                return $value;
            }
            //    Return strings wrapped in quotes
            return '"' . $value . '"';
        //    Convert numeric errors to NaN error
        } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {
            return Functions::NAN();
        }

        return $value;
    }
public static function wrapResult($value)
    {
        if (is_string($value)) {
            //    Error values cannot be "wrapped"
            if (preg_match('/^' . self::CALCULATION_REGEXP_ERROR . '$/i', $value, $match)) {
                //    Return Excel errors "as is"
                return $value;
            }
            //    Return strings wrapped in quotes
            return '"' . $value . '"';
        //    Convert numeric errors to NaN error
        } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) {
            return Functions::NAN();
        }

        return $value;
    }
public static function wrapResult ( $ value ) { if ( is_string ( $ value ) ) { //    Error values cannot be "wrapped" if ( preg_match ( '/^' . self :: CALCULATION_REGEXP_ERROR . '$/i' , $ value , $ match ) ) { //    Return Excel errors "as is" return $ value ; } //    Return strings wrapped in quotes return '"' . $ value . '"' ; //    Convert numeric errors to NaN error } elseif ( ( is_float ( $ value ) ) && ( ( is_nan ( $ value ) ) || ( is_infinite ( $ value ) ) ) ) { return Functions :: NAN ( ) ; } return $ value ; }
Wrap string values in quotes.

@param mixed $value

@return mixed
Wrap string values in quotes .