mk-j / PHP_XLSXWriter

Lightweight XLSX Excel Spreadsheet Writer in PHP
MIT License
1.84k stars 665 forks source link

Why there are four lines of addCellStyle in construct function? #225

Closed finlaywang closed 5 years ago

finlaywang commented 6 years ago
public function __construct()
{
    if(!ini_get('date.timezone'))
    {
        //using date functions can kick out warning if this isn't set
        date_default_timezone_set('UTC');
    }
    $this->addCellStyle($number_format='GENERAL', $style_string=null);
    $this->addCellStyle($number_format='GENERAL', $style_string=null);
    $this->addCellStyle($number_format='GENERAL', $style_string=null);
    $this->addCellStyle($number_format='GENERAL', $style_string=null);
}
mk-j commented 5 years ago

Good question. I think in the past, they were needed as placeholders, but now I handle the placeholders somewhere else, and no longer need all 4.