@@ -304,8 +304,7 @@ discard block |
||
304 | 304 | $currentRowIndex = $xmlReader->getAttribute(self::XML_ATTRIBUTE_ROW_INDEX); |
305 | 305 | |
306 | 306 | return ($currentRowIndex !== null) ? |
307 | - (int) $currentRowIndex : |
|
308 | - $this->lastRowIndexProcessed + 1; |
|
307 | + (int) $currentRowIndex : $this->lastRowIndexProcessed + 1; |
|
309 | 308 | } |
310 | 309 | |
311 | 310 | /** |
@@ -319,8 +318,7 @@ discard block |
||
319 | 318 | $currentCellIndex = $xmlReader->getAttribute(self::XML_ATTRIBUTE_CELL_INDEX); |
320 | 319 | |
321 | 320 | return ($currentCellIndex !== null) ? |
322 | - CellHelper::getColumnIndexFromCellIndex($currentCellIndex) : |
|
323 | - $this->lastColumnIndexProcessed + 1; |
|
321 | + CellHelper::getColumnIndexFromCellIndex($currentCellIndex) : $this->lastColumnIndexProcessed + 1; |
|
324 | 322 | } |
325 | 323 | |
326 | 324 | /** |
@@ -380,8 +378,7 @@ discard block |
||
380 | 378 | // but to avoid a breaking change, the return value for |
381 | 379 | // this function has been kept as the number of rows read. |
382 | 380 | return $this->shouldPreserveEmptyRows ? |
383 | - $this->nextRowIndexToBeProcessed : |
|
384 | - $this->numReadRows; |
|
381 | + $this->nextRowIndexToBeProcessed : $this->numReadRows; |
|
385 | 382 | } |
386 | 383 | |
387 | 384 | /** |
@@ -21,33 +21,33 @@ |
||
21 | 21 | private static $excelDateFormatToPHPDateFormatMapping = [ |
22 | 22 | self::KEY_GENERAL => [ |
23 | 23 | // Time |
24 | - 'am/pm' => 'A', // Uppercase Ante meridiem and Post meridiem |
|
24 | + 'am/pm' => 'A', // Uppercase Ante meridiem and Post meridiem |
|
25 | 25 | ':mm' => ':i', // Minutes with leading zeros - if preceded by a ":" (otherwise month) |
26 | 26 | 'mm:' => 'i:', // Minutes with leading zeros - if followed by a ":" (otherwise month) |
27 | - 'ss' => 's', // Seconds, with leading zeros |
|
28 | - '.s' => '', // Ignore (fractional seconds format does not exist in PHP) |
|
27 | + 'ss' => 's', // Seconds, with leading zeros |
|
28 | + '.s' => '', // Ignore (fractional seconds format does not exist in PHP) |
|
29 | 29 | |
30 | 30 | // Date |
31 | - 'e' => 'Y', // Full numeric representation of a year, 4 digits |
|
32 | - 'yyyy' => 'Y', // Full numeric representation of a year, 4 digits |
|
33 | - 'yy' => 'y', // Two digit representation of a year |
|
34 | - 'mmmmm' => 'M', // Short textual representation of a month, three letters ("mmmmm" should only contain the 1st letter...) |
|
35 | - 'mmmm' => 'F', // Full textual representation of a month |
|
36 | - 'mmm' => 'M', // Short textual representation of a month, three letters |
|
37 | - 'mm' => 'm', // Numeric representation of a month, with leading zeros |
|
38 | - 'm' => 'n', // Numeric representation of a month, without leading zeros |
|
39 | - 'dddd' => 'l', // Full textual representation of the day of the week |
|
40 | - 'ddd' => 'D', // Textual representation of a day, three letters |
|
41 | - 'dd' => 'd', // Day of the month, 2 digits with leading zeros |
|
42 | - 'd' => 'j', // Day of the month without leading zeros |
|
31 | + 'e' => 'Y', // Full numeric representation of a year, 4 digits |
|
32 | + 'yyyy' => 'Y', // Full numeric representation of a year, 4 digits |
|
33 | + 'yy' => 'y', // Two digit representation of a year |
|
34 | + 'mmmmm' => 'M', // Short textual representation of a month, three letters ("mmmmm" should only contain the 1st letter...) |
|
35 | + 'mmmm' => 'F', // Full textual representation of a month |
|
36 | + 'mmm' => 'M', // Short textual representation of a month, three letters |
|
37 | + 'mm' => 'm', // Numeric representation of a month, with leading zeros |
|
38 | + 'm' => 'n', // Numeric representation of a month, without leading zeros |
|
39 | + 'dddd' => 'l', // Full textual representation of the day of the week |
|
40 | + 'ddd' => 'D', // Textual representation of a day, three letters |
|
41 | + 'dd' => 'd', // Day of the month, 2 digits with leading zeros |
|
42 | + 'd' => 'j', // Day of the month without leading zeros |
|
43 | 43 | ], |
44 | 44 | self::KEY_HOUR_12 => [ |
45 | - 'hh' => 'h', // 12-hour format of an hour without leading zeros |
|
46 | - 'h' => 'g', // 12-hour format of an hour without leading zeros |
|
45 | + 'hh' => 'h', // 12-hour format of an hour without leading zeros |
|
46 | + 'h' => 'g', // 12-hour format of an hour without leading zeros |
|
47 | 47 | ], |
48 | 48 | self::KEY_HOUR_24 => [ |
49 | - 'hh' => 'H', // 24-hour hours with leading zero |
|
50 | - 'h' => 'G', // 24-hour format of an hour without leading zeros |
|
49 | + 'hh' => 'H', // 24-hour hours with leading zero |
|
50 | + 'h' => 'G', // 24-hour format of an hour without leading zeros |
|
51 | 51 | ], |
52 | 52 | ]; |
53 | 53 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | 22 => 'm/d/yyyy h:mm', // @NOTE: ECMA spec is 'm/d/yy h:mm', |
48 | 48 | 45 => 'mm:ss', |
49 | 49 | 46 => '[h]:mm:ss', |
50 | - 47 => 'mm:ss.0', // @NOTE: ECMA spec is 'mmss.0', |
|
50 | + 47 => 'mm:ss.0', // @NOTE: ECMA spec is 'mmss.0', |
|
51 | 51 | ]; |
52 | 52 | |
53 | 53 | /** @var string Path of the XLSX file being read */ |
@@ -193,8 +193,7 @@ |
||
193 | 193 | $streamScheme = $this->getStreamWrapperScheme($filePath); |
194 | 194 | |
195 | 195 | return ($streamScheme !== null) ? |
196 | - in_array($streamScheme, $this->globalFunctionsHelper->stream_get_wrappers()) : |
|
197 | - true; |
|
196 | + in_array($streamScheme, $this->globalFunctionsHelper->stream_get_wrappers()) : true; |
|
198 | 197 | } |
199 | 198 | |
200 | 199 | /** |
@@ -32,7 +32,7 @@ |
||
32 | 32 | // |
33 | 33 | // @NOTE: Using ENT_NOQUOTES as only XML entities ('<', '>', '&') need to be encoded. |
34 | 34 | // Single and double quotes can be left as is. |
35 | - $escapedString = htmlspecialchars($string, ENT_NOQUOTES); |
|
35 | + $escapedString = htmlspecialchars($string, ENT_NOQUOTES); |
|
36 | 36 | |
37 | 37 | // control characters values are from 0 to 1F (hex values) in the ASCII table |
38 | 38 | // some characters should not be escaped though: "\t", "\r" and "\n". |
@@ -92,8 +92,7 @@ discard block |
||
92 | 92 | public function getFillIdForStyleId($styleId) |
93 | 93 | { |
94 | 94 | return (isset($this->styleIdToFillMappingTable[$styleId])) ? |
95 | - $this->styleIdToFillMappingTable[$styleId] : |
|
96 | - null; |
|
95 | + $this->styleIdToFillMappingTable[$styleId] : null; |
|
97 | 96 | } |
98 | 97 | |
99 | 98 | /** |
@@ -132,8 +131,7 @@ discard block |
||
132 | 131 | public function getBorderIdForStyleId($styleId) |
133 | 132 | { |
134 | 133 | return (isset($this->styleIdToBorderMappingTable[$styleId])) ? |
135 | - $this->styleIdToBorderMappingTable[$styleId] : |
|
136 | - null; |
|
134 | + $this->styleIdToBorderMappingTable[$styleId] : null; |
|
137 | 135 | } |
138 | 136 | |
139 | 137 | /** |