@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | $start = microtime(true); |
5 | 5 | $header = [ |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | $start = microtime(true); |
5 | 5 | $header = [ |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | $start = microtime(true); |
5 | 5 | $header = [ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -require_once __DIR__ . '/../vendor/autoload.php'; |
|
2 | +require_once __DIR__.'/../vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | use Ellumilel\ExcelWriter; |
5 | 5 | |
@@ -20,6 +20,6 @@ discard block |
||
20 | 20 | $writer->writeToFile("unit_test_output_one.xlsx"); |
21 | 21 | |
22 | 22 | |
23 | - $this->assertEquals(true, file_exists(__DIR__ . "/../unit_test_output_one.xlsx")); |
|
23 | + $this->assertEquals(true, file_exists(__DIR__."/../unit_test_output_one.xlsx")); |
|
24 | 24 | } |
25 | 25 | } |
@@ -25,19 +25,19 @@ discard block |
||
25 | 25 | private $urlSchemaFormat = 'http://schemas.openxmlformats.org/officeDocument/2006'; |
26 | 26 | |
27 | 27 | /** @var string */ |
28 | - protected $author ='Unknown Author'; |
|
28 | + protected $author = 'Unknown Author'; |
|
29 | 29 | /** @var array */ |
30 | 30 | protected $sheets = []; |
31 | 31 | /** @var array */ |
32 | - protected $sharedStrings = [];//unique set |
|
32 | + protected $sharedStrings = []; //unique set |
|
33 | 33 | /** @var int */ |
34 | - protected $sharedStringCount = 0;//count of non-unique references to the unique set |
|
34 | + protected $sharedStringCount = 0; //count of non-unique references to the unique set |
|
35 | 35 | /** @var array */ |
36 | 36 | protected $tempFiles = []; |
37 | 37 | /** @var array */ |
38 | - protected $cellFormats = [];//contains excel format like YYYY-MM-DD HH:MM:SS |
|
38 | + protected $cellFormats = []; //contains excel format like YYYY-MM-DD HH:MM:SS |
|
39 | 39 | /** @var array */ |
40 | - protected $cellTypes = [];//contains friendly format like datetime |
|
40 | + protected $cellTypes = []; //contains friendly format like datetime |
|
41 | 41 | /** @var string */ |
42 | 42 | protected $currentSheet = ''; |
43 | 43 | /** @var null */ |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | return; |
191 | 191 | } |
192 | 192 | $sheetFilename = $this->tempFilename(); |
193 | - $sheetXmlName = 'sheet' . (count($this->sheets) + 1).".xml"; |
|
193 | + $sheetXmlName = 'sheet'.(count($this->sheets) + 1).".xml"; |
|
194 | 194 | $sheetObj = new Sheet(); |
195 | 195 | $sheetObj |
196 | 196 | ->setFilename($sheetFilename) |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | $this->sheets[$sheetName] = $sheetObj; |
202 | 202 | /** @var Sheet $sheet */ |
203 | 203 | $sheet = &$this->sheets[$sheetName]; |
204 | - $selectedTab = count($this->sheets) == 1 ? 'true' : 'false';//only first sheet is selected |
|
205 | - $maxCell = ExcelWriter::xlsCell(self::EXCEL_MAX_ROW, self::EXCEL_MAX_COL);//XFE1048577 |
|
204 | + $selectedTab = count($this->sheets) == 1 ? 'true' : 'false'; //only first sheet is selected |
|
205 | + $maxCell = ExcelWriter::xlsCell(self::EXCEL_MAX_ROW, self::EXCEL_MAX_COL); //XFE1048577 |
|
206 | 206 | $sheet->getWriter()->write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n"); |
207 | 207 | $sheet->getWriter()->write( |
208 | 208 | '<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" |
@@ -776,8 +776,8 @@ discard block |
||
776 | 776 | $norm = 300; |
777 | 777 | $range = $year - $epoch; |
778 | 778 | // Set month days and check for leap year. |
779 | - $leap = (($year % 400 == 0) || (($year % 4 == 0) && ($year % 100)) ) ? 1 : 0; |
|
780 | - $mdays = array( 31, ($leap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ); |
|
779 | + $leap = (($year % 400 == 0) || (($year % 4 == 0) && ($year % 100))) ? 1 : 0; |
|
780 | + $mdays = array(31, ($leap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
|
781 | 781 | // Some boundary checks |
782 | 782 | if ($year < $epoch || $year > 9999) { |
783 | 783 | return 0; |