@@ -24,19 +24,19 @@ discard block |
||
24 | 24 | private $urlSchemaFormat = 'http://schemas.openxmlformats.org/officeDocument/2006'; |
25 | 25 | |
26 | 26 | /** @var string */ |
27 | - protected $author ='Unknown Author'; |
|
27 | + protected $author = 'Unknown Author'; |
|
28 | 28 | /** @var array */ |
29 | 29 | protected $sheets = []; |
30 | 30 | /** @var array */ |
31 | - protected $sharedStrings = [];//unique set |
|
31 | + protected $sharedStrings = []; //unique set |
|
32 | 32 | /** @var int */ |
33 | - protected $sharedStringCount = 0;//count of non-unique references to the unique set |
|
33 | + protected $sharedStringCount = 0; //count of non-unique references to the unique set |
|
34 | 34 | /** @var array */ |
35 | 35 | protected $tempFiles = []; |
36 | 36 | /** @var array */ |
37 | - protected $cellFormats = [];//contains excel format like YYYY-MM-DD HH:MM:SS |
|
37 | + protected $cellFormats = []; //contains excel format like YYYY-MM-DD HH:MM:SS |
|
38 | 38 | /** @var array */ |
39 | - protected $cellTypes = [];//contains friendly format like datetime |
|
39 | + protected $cellTypes = []; //contains friendly format like datetime |
|
40 | 40 | /** @var string */ |
41 | 41 | protected $currentSheet = ''; |
42 | 42 | /** @var null */ |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | public function writeToFile($filename) |
125 | 125 | { |
126 | 126 | foreach ($this->sheets as $sheetName => $sheet) { |
127 | - $this->finalizeSheet($sheetName);//making sure all footers have been written |
|
127 | + $this->finalizeSheet($sheetName); //making sure all footers have been written |
|
128 | 128 | } |
129 | 129 | if (file_exists($filename)) { |
130 | 130 | if (is_writable($filename)) { |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | return; |
188 | 188 | } |
189 | 189 | $sheetFilename = $this->tempFilename(); |
190 | - $sheetXmlName = 'sheet' . (count($this->sheets) + 1).".xml"; |
|
190 | + $sheetXmlName = 'sheet'.(count($this->sheets) + 1).".xml"; |
|
191 | 191 | $sheetObj = new Sheet(); |
192 | 192 | $sheetObj |
193 | 193 | ->setFilename($sheetFilename) |
@@ -198,8 +198,8 @@ discard block |
||
198 | 198 | $this->sheets[$sheetName] = $sheetObj; |
199 | 199 | /** @var Sheet $sheet */ |
200 | 200 | $sheet = &$this->sheets[$sheetName]; |
201 | - $selectedTab = count($this->sheets) == 1 ? 'true' : 'false';//only first sheet is selected |
|
202 | - $maxCell = ExcelWriter::xlsCell(self::EXCEL_MAX_ROW, self::EXCEL_MAX_COL);//XFE1048577 |
|
201 | + $selectedTab = count($this->sheets) == 1 ? 'true' : 'false'; //only first sheet is selected |
|
202 | + $maxCell = ExcelWriter::xlsCell(self::EXCEL_MAX_ROW, self::EXCEL_MAX_COL); //XFE1048577 |
|
203 | 203 | $sheet->getWriter()->write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n"); |
204 | 204 | $sheet->getWriter()->write( |
205 | 205 | '<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | $sheet = &$this->sheets[$sheetName]; |
407 | 407 | $columns = $sheet->getColumns(); |
408 | 408 | if (empty($columns)) { |
409 | - $sheet->setColumns(array_fill($from = 0, $until = count($row), '0'));//'0'=>'string' |
|
409 | + $sheet->setColumns(array_fill($from = 0, $until = count($row), '0')); //'0'=>'string' |
|
410 | 410 | } |
411 | 411 | $sheet->getWriter()->write( |
412 | 412 | '<row collapsed="false" customFormat="false" customHeight="false" |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | $stringValue = count($this->sharedStrings); |
654 | 654 | $this->sharedStrings[$v] = $stringValue; |
655 | 655 | } |
656 | - $this->sharedStringCount++;//non-unique count |
|
656 | + $this->sharedStringCount++; //non-unique count |
|
657 | 657 | |
658 | 658 | return $stringValue; |
659 | 659 | } |
@@ -856,8 +856,8 @@ discard block |
||
856 | 856 | $norm = 300; |
857 | 857 | $range = $year - $epoch; |
858 | 858 | # Set month days and check for leap year. |
859 | - $leap = (($year % 400 == 0) || (($year % 4 == 0) && ($year % 100)) ) ? 1 : 0; |
|
860 | - $mdays = array( 31, ($leap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ); |
|
859 | + $leap = (($year % 400 == 0) || (($year % 4 == 0) && ($year % 100))) ? 1 : 0; |
|
860 | + $mdays = array(31, ($leap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
|
861 | 861 | # Some boundary checks |
862 | 862 | if ($year < $epoch || $year > 9999) { |
863 | 863 | return 0; |