@@ -626,10 +626,10 @@ |
||
626 | 626 | foreach ($temp as &$value) { |
627 | 627 | // Only replace in alternate array entries (i.e. non-quoted blocks) |
628 | 628 | if ($tKey = !$tKey) { |
629 | - $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value); // Cell range reference in another sheet |
|
630 | - $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet |
|
631 | - $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference |
|
632 | - $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference |
|
629 | + $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value); // Cell range reference in another sheet |
|
630 | + $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet |
|
631 | + $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference |
|
632 | + $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference |
|
633 | 633 | $value = \PhpSpreadsheet\Calculation::translateSeparator(';', ',', $value, $inBraces); |
634 | 634 | } |
635 | 635 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $worksheetNames = []; |
103 | 103 | while ($xml->read()) { |
104 | 104 | if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) { |
105 | - $xml->read(); // Move onto the value node |
|
105 | + $xml->read(); // Move onto the value node |
|
106 | 106 | $worksheetNames[] = (string) $xml->value; |
107 | 107 | } elseif ($xml->name == 'gnm:Sheets') { |
108 | 108 | // break out of the loop once we've got our sheet names rather than parse the entire file |
@@ -143,14 +143,14 @@ discard block |
||
143 | 143 | |
144 | 144 | while ($xml->read()) { |
145 | 145 | if ($xml->name == 'gnm:Name' && $xml->nodeType == XMLReader::ELEMENT) { |
146 | - $xml->read(); // Move onto the value node |
|
146 | + $xml->read(); // Move onto the value node |
|
147 | 147 | $tmpInfo['worksheetName'] = (string) $xml->value; |
148 | 148 | } elseif ($xml->name == 'gnm:MaxCol' && $xml->nodeType == XMLReader::ELEMENT) { |
149 | - $xml->read(); // Move onto the value node |
|
149 | + $xml->read(); // Move onto the value node |
|
150 | 150 | $tmpInfo['lastColumnIndex'] = (int) $xml->value; |
151 | 151 | $tmpInfo['totalColumns'] = (int) $xml->value + 1; |
152 | 152 | } elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) { |
153 | - $xml->read(); // Move onto the value node |
|
153 | + $xml->read(); // Move onto the value node |
|
154 | 154 | $tmpInfo['totalRows'] = (int) $xml->value + 1; |
155 | 155 | break; |
156 | 156 | } |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | if (isset($sheet->PrintInformation->Margins)) { |
350 | 350 | foreach ($sheet->PrintInformation->Margins->children('gnm', true) as $key => $margin) { |
351 | 351 | $marginAttributes = $margin->attributes(); |
352 | - $marginSize = 72 / 100; // Default |
|
352 | + $marginSize = 72 / 100; // Default |
|
353 | 353 | switch ($marginAttributes['PrefUnit']) { |
354 | 354 | case 'mm': |
355 | 355 | $marginSize = intval($marginAttributes['Points']) / 100; |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | break; |
436 | 436 | case '20': // Boolean |
437 | 437 | $type = \PhpSpreadsheet\Cell\DataType::TYPE_BOOL; |
438 | - $cell = ($cell == 'TRUE') ? true: false; |
|
438 | + $cell = ($cell == 'TRUE') ? true : false; |
|
439 | 439 | break; |
440 | 440 | case '30': // Integer |
441 | 441 | $cell = intval($cell); |
@@ -45,8 +45,8 @@ |
||
45 | 45 | const CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80; |
46 | 46 | const CHARSET_ANSI_KOREAN_HANGUL = 0x81; |
47 | 47 | const CHARSET_ANSI_KOREAN_JOHAB = 0x82; |
48 | - const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; // gb2312 |
|
49 | - const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; // big5 |
|
48 | + const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; // gb2312 |
|
49 | + const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; // big5 |
|
50 | 50 | const CHARSET_ANSI_GREEK = 0xA1; |
51 | 51 | const CHARSET_ANSI_TURKISH = 0xA2; |
52 | 52 | const CHARSET_ANSI_VIETNAMESE = 0xA3; |
@@ -29,8 +29,8 @@ |
||
29 | 29 | class Date |
30 | 30 | { |
31 | 31 | /** constants */ |
32 | - const CALENDAR_WINDOWS_1900 = 1900; // Base date of 1st Jan 1900 = 1.0 |
|
33 | - const CALENDAR_MAC_1904 = 1904; // Base date of 2nd Jan 1904 = 1.0 |
|
32 | + const CALENDAR_WINDOWS_1900 = 1900; // Base date of 1st Jan 1900 = 1.0 |
|
33 | + const CALENDAR_MAC_1904 = 1904; // Base date of 2nd Jan 1904 = 1.0 |
|
34 | 34 | |
35 | 35 | /* |
36 | 36 | * Names of the months of the year, indexed by shortname |
@@ -2592,7 +2592,7 @@ discard block |
||
2592 | 2592 | // ----- Set the file properties |
2593 | 2593 | $p_header['size'] = 0; |
2594 | 2594 | //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked |
2595 | - $p_header['external'] = 0x00000010; // Value for a folder : to be checked |
|
2595 | + $p_header['external'] = 0x00000010; // Value for a folder : to be checked |
|
2596 | 2596 | |
2597 | 2597 | // ----- Call the header generation |
2598 | 2598 | if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { |
@@ -4980,7 +4980,7 @@ discard block |
||
4980 | 4980 | if ($v_skip > 0) { |
4981 | 4981 | --$v_skip; |
4982 | 4982 | } else { |
4983 | - $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1)?'/' . $v_result:''); |
|
4983 | + $v_result = $v_list[$i] . ($i != (sizeof($v_list) - 1) ? '/' . $v_result : ''); |
|
4984 | 4984 | } |
4985 | 4985 | } |
4986 | 4986 | } |
@@ -233,8 +233,8 @@ |
||
233 | 233 | $y1 = $offsetY; |
234 | 234 | |
235 | 235 | // Initialise end cell to the same as the start cell |
236 | - $col_end = $col_start; // Col containing lower right corner of object |
|
237 | - $row_end = $row_start; // Row containing bottom right corner of object |
|
236 | + $col_end = $col_start; // Col containing lower right corner of object |
|
237 | + $row_end = $row_start; // Row containing bottom right corner of object |
|
238 | 238 | |
239 | 239 | // Zero the specified offset if greater than the cell dimensions |
240 | 240 | if ($x1 >= self::sizeCol($sheet, \PhpSpreadsheet\Cell::stringFromColumnIndex($col_start))) { |
@@ -266,7 +266,7 @@ |
||
266 | 266 | public function _readPpsWks($blockId) |
267 | 267 | { |
268 | 268 | $fh = $this->getStream($blockId); |
269 | - for ($pos = 0;; $pos += 128) { |
|
269 | + for ($pos = 0; ; $pos += 128) { |
|
270 | 270 | fseek($fh, $pos, SEEK_SET); |
271 | 271 | $nameUtf16 = fread($fh, 64); |
272 | 272 | $nameLength = self::_readInt2($fh); |
@@ -41,14 +41,14 @@ |
||
41 | 41 | public static function hashPassword($pPassword = '') |
42 | 42 | { |
43 | 43 | $password = 0x0000; |
44 | - $charPos = 1; // char position |
|
44 | + $charPos = 1; // char position |
|
45 | 45 | |
46 | 46 | // split the plain text password in its component characters |
47 | 47 | $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); |
48 | 48 | foreach ($chars as $char) { |
49 | - $value = ord($char) << $charPos++; // shifted ASCII value |
|
50 | - $rotated_bits = $value >> 15; // rotated bits beyond bit 15 |
|
51 | - $value &= 0x7fff; // first 15 bits |
|
49 | + $value = ord($char) << $charPos++; // shifted ASCII value |
|
50 | + $rotated_bits = $value >> 15; // rotated bits beyond bit 15 |
|
51 | + $value &= 0x7fff; // first 15 bits |
|
52 | 52 | $password ^= ($value | $rotated_bits); |
53 | 53 | } |
54 | 54 |
@@ -184,7 +184,7 @@ |
||
184 | 184 | . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
185 | 185 | . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
186 | 186 | . pack('V', $this->Size) // 124 |
187 | - . pack('V', 0); // 128 |
|
187 | + . pack('V', 0); // 128 |
|
188 | 188 | return $ret; |
189 | 189 | } |
190 | 190 |