Code Duplication    Length = 3-3 lines in 2 locations

core/helpers/XLSXWriter.php 2 locations

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