Code Duplication    Length = 3-3 lines in 2 locations

core/helpers/XLSXWriter.php 2 locations

@@ 430-432 (lines=3) @@
427
            $file->write('<c r="' . $cell_name . '" s="' . $cell_style_idx . '" t="n"><v>' . intval(self::convert_date_time($value)) . '</v></c>');
428
        } elseif ($num_format_type == 'n_datetime') {
429
            $file->write('<c r="' . $cell_name . '" s="' . $cell_style_idx . '" t="n"><v>' . self::convert_date_time($value) . '</v></c>');
430
        } elseif ($num_format_type == 'n_numeric') {
431
            $file->write('<c r="' . $cell_name . '" s="' . $cell_style_idx . '" t="n"><v>' . self::xmlspecialchars($value) . '</v></c>');//int,float,currency
432
        } elseif ($num_format_type == 'n_string') {
433
            $file->write('<c r="' . $cell_name . '" s="' . $cell_style_idx . '" t="inlineStr"><is><t>' . self::xmlspecialchars($value) . '</t></is></c>');
434
        } elseif ($num_format_type == 'n_auto' || 1) { //auto-detect unknown column types
435
            if (!is_string($value) || $value == '0' || ($value[0] != '0' && ctype_digit($value)) || preg_match("/^\-?(0|[1-9][0-9]*)(\.[0-9]+)?$/",
@@ 439-441 (lines=3) @@
436
                    $value)
437
            ) {
438
                $file->write('<c r="' . $cell_name . '" s="' . $cell_style_idx . '" t="n"><v>' . self::xmlspecialchars($value) . '</v></c>');//int,float,currency
439
            } else { //implied: ($cell_format=='string')
440
                $file->write('<c r="' . $cell_name . '" s="' . $cell_style_idx . '" t="inlineStr"><is><t>' . self::xmlspecialchars($value) . '</t></is></c>');
441
            }
442
        }
443
    }
444