@@ -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 | } |
@@ -26,19 +26,19 @@ discard block |
||
| 26 | 26 | private $urlSchemaFormat = 'http://schemas.openxmlformats.org/officeDocument/2006'; |
| 27 | 27 | |
| 28 | 28 | /** @var string */ |
| 29 | - protected $author ='Unknown Author'; |
|
| 29 | + protected $author = 'Unknown Author'; |
|
| 30 | 30 | /** @var array */ |
| 31 | 31 | protected $sheets = []; |
| 32 | 32 | /** @var array */ |
| 33 | - protected $sharedStrings = [];//unique set |
|
| 33 | + protected $sharedStrings = []; //unique set |
|
| 34 | 34 | /** @var int */ |
| 35 | - protected $sharedStringCount = 0;//count of non-unique references to the unique set |
|
| 35 | + protected $sharedStringCount = 0; //count of non-unique references to the unique set |
|
| 36 | 36 | /** @var array */ |
| 37 | 37 | protected $tempFiles = []; |
| 38 | 38 | /** @var array */ |
| 39 | - protected $cellFormats = [];//contains excel format like YYYY-MM-DD HH:MM:SS |
|
| 39 | + protected $cellFormats = []; //contains excel format like YYYY-MM-DD HH:MM:SS |
|
| 40 | 40 | /** @var array */ |
| 41 | - protected $cellTypes = [];//contains friendly format like datetime |
|
| 41 | + protected $cellTypes = []; //contains friendly format like datetime |
|
| 42 | 42 | /** @var string */ |
| 43 | 43 | protected $currentSheet = ''; |
| 44 | 44 | /** @var null */ |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | return; |
| 192 | 192 | } |
| 193 | 193 | $sheetFilename = $this->tempFilename(); |
| 194 | - $sheetXmlName = 'sheet' . (count($this->sheets) + 1).".xml"; |
|
| 194 | + $sheetXmlName = 'sheet'.(count($this->sheets) + 1).".xml"; |
|
| 195 | 195 | $sheetObj = new Sheet(); |
| 196 | 196 | $sheetObj |
| 197 | 197 | ->setFilename($sheetFilename) |
@@ -202,8 +202,8 @@ discard block |
||
| 202 | 202 | $this->sheets[$sheetName] = $sheetObj; |
| 203 | 203 | /** @var Sheet $sheet */ |
| 204 | 204 | $sheet = &$this->sheets[$sheetName]; |
| 205 | - $selectedTab = count($this->sheets) == 1 ? 'true' : 'false';//only first sheet is selected |
|
| 206 | - $maxCell = ExcelWriter::xlsCell(self::EXCEL_MAX_ROW, self::EXCEL_MAX_COL);//XFE1048577 |
|
| 205 | + $selectedTab = count($this->sheets) == 1 ? 'true' : 'false'; //only first sheet is selected |
|
| 206 | + $maxCell = ExcelWriter::xlsCell(self::EXCEL_MAX_ROW, self::EXCEL_MAX_COL); //XFE1048577 |
|
| 207 | 207 | $sheet->getWriter()->write('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n"); |
| 208 | 208 | $sheet->getWriter()->write( |
| 209 | 209 | '<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | return 60 + $seconds; |
| 709 | 709 | } |
| 710 | 710 | |
| 711 | - $range = $year - $epoch; |
|
| 711 | + $range = $year - $epoch; |
|
| 712 | 712 | // check leapDay |
| 713 | 713 | $leap = (new \DateTime($dateInput))->format('L'); |
| 714 | 714 | $mDays = [31, ($leap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | } |
| 719 | 719 | |
| 720 | 720 | $days = $day + ($range * 365) + array_sum(array_slice($mDays, 0, $month - 1)); |
| 721 | - $days += intval(($range) / 4) - intval(($range + $offset) / 100); |
|
| 721 | + $days += intval(($range) / 4) - intval(($range + $offset) / 100); |
|
| 722 | 722 | $days += intval(($range + $offset + $norm) / 400) - intval($leap); |
| 723 | 723 | |
| 724 | 724 | if ($days > 59) { |