From 22c7e1705f0c922690dc464f0f27f9d4a167954e Mon Sep 17 00:00:00 2001 From: Alexey Kopytko Date: Thu, 16 Jun 2016 11:06:38 +0900 Subject: [PATCH] New timestamp field should respect existing style for variable names --- Spreadsheet/Excel/Writer/Workbook.php | 6 +++--- .../Excel/Writer/Test_Spreadsheet_Excel_WriterTestCase.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Spreadsheet/Excel/Writer/Workbook.php b/Spreadsheet/Excel/Writer/Workbook.php index a1c97f3..788d461 100644 --- a/Spreadsheet/Excel/Writer/Workbook.php +++ b/Spreadsheet/Excel/Writer/Workbook.php @@ -166,7 +166,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri var $_string_sizeinfo_size; /** @var int */ - public $timestamp; + var $_timestamp; /** * Class constructor @@ -203,7 +203,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri $this->_str_total = 0; $this->_str_unique = 0; $this->_str_table = array(); - $this->timestamp = time(); + $this->_timestamp = time(); $this->_setPaletteXl97(); } @@ -595,7 +595,7 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri } } - $root = new OLE_PPS_Root($this->timestamp, $this->timestamp, array($OLE)); + $root = new OLE_PPS_Root($this->_timestamp, $this->_timestamp, array($OLE)); if ($this->_tmp_dir != '') { $root->setTempDir($this->_tmp_dir); } diff --git a/test/Test/Spreadsheet/Excel/Writer/Test_Spreadsheet_Excel_WriterTestCase.php b/test/Test/Spreadsheet/Excel/Writer/Test_Spreadsheet_Excel_WriterTestCase.php index 00faa30..7d7d2a8 100644 --- a/test/Test/Spreadsheet/Excel/Writer/Test_Spreadsheet_Excel_WriterTestCase.php +++ b/test/Test/Spreadsheet/Excel/Writer/Test_Spreadsheet_Excel_WriterTestCase.php @@ -20,10 +20,10 @@ class Test_Spreadsheet_Excel_WriterTestCase extends PHPUnit_Framework_TestCase protected function assertSameAsInFixture($filename, Spreadsheet_Excel_Writer $workbook) { - $this->assertEmpty($workbook->fileName, "Testing with fixtures works only for standard output"); + $this->assertEmpty($workbook->_filename, "Testing with fixtures works only for standard output"); // we have to fix timestamp for fixtures to work - $workbook->timestamp = 1000000000; // somewhere in 2001 + $workbook->_timestamp = 1000000000; // somewhere in 2001 ob_start(); $workbook->close();