@@ -219,8 +219,8 @@ |
||
219 | 219 | } |
220 | 220 | $spreadsheet->setActiveSheetIndex($this->sheetIndex); |
221 | 221 | |
222 | - $fromFormats = ['\-', '\ ']; |
|
223 | - $toFormats = ['-', ' ']; |
|
222 | + $fromFormats = ['\-', '\ ']; |
|
223 | + $toFormats = ['-', ' ']; |
|
224 | 224 | |
225 | 225 | // Loop through file |
226 | 226 | $rowData = []; |
@@ -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 | } |
@@ -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))) { |
@@ -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 |
@@ -170,21 +170,21 @@ |
||
170 | 170 | $ret = str_pad($this->Name, 64, "\x00"); |
171 | 171 | |
172 | 172 | $ret .= pack('v', strlen($this->Name) + 2) // 66 |
173 | - . pack('c', $this->Type) // 67 |
|
174 | - . pack('c', 0x00) //UK // 68 |
|
175 | - . pack('V', $this->PrevPps) //Prev // 72 |
|
176 | - . pack('V', $this->NextPps) //Next // 76 |
|
177 | - . pack('V', $this->DirPps) //Dir // 80 |
|
178 | - . "\x00\x09\x02\x00" // 84 |
|
179 | - . "\x00\x00\x00\x00" // 88 |
|
180 | - . "\xc0\x00\x00\x00" // 92 |
|
181 | - . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
182 | - . "\x00\x00\x00\x00" // 100 |
|
183 | - . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
184 | - . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
185 | - . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
186 | - . pack('V', $this->Size) // 124 |
|
187 | - . pack('V', 0); // 128 |
|
173 | + . pack('c', $this->Type) // 67 |
|
174 | + . pack('c', 0x00) //UK // 68 |
|
175 | + . pack('V', $this->PrevPps) //Prev // 72 |
|
176 | + . pack('V', $this->NextPps) //Next // 76 |
|
177 | + . pack('V', $this->DirPps) //Dir // 80 |
|
178 | + . "\x00\x09\x02\x00" // 84 |
|
179 | + . "\x00\x00\x00\x00" // 88 |
|
180 | + . "\xc0\x00\x00\x00" // 92 |
|
181 | + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root |
|
182 | + . "\x00\x00\x00\x00" // 100 |
|
183 | + . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 |
|
184 | + . \PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 |
|
185 | + . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 |
|
186 | + . pack('V', $this->Size) // 124 |
|
187 | + . pack('V', 0); // 128 |
|
188 | 188 | return $ret; |
189 | 189 | } |
190 | 190 |
@@ -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 |
@@ -137,8 +137,7 @@ |
||
137 | 137 | $this->rotation = 0; |
138 | 138 | $this->shadow = new Drawing\Shadow(); |
139 | 139 | |
140 | - // Set image index |
|
141 | - ++self::$imageCounter; |
|
140 | + // Set image index++self::$imageCounter; |
|
142 | 141 | $this->imageIndex = self::$imageCounter; |
143 | 142 | } |
144 | 143 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | public function testGetCurrencyCode() |
66 | 66 | { |
67 | 67 | $localeconv = localeconv(); |
68 | - $expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol']: '$')); |
|
68 | + $expectedResult = (!empty($localeconv['currency_symbol']) ? $localeconv['currency_symbol'] : (!empty($localeconv['int_curr_symbol']) ? $localeconv['int_curr_symbol'] : '$')); |
|
69 | 69 | $result = call_user_func([StringHelper::class, 'getCurrencyCode']); |
70 | 70 | $this->assertEquals($expectedResult, $result); |
71 | 71 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | $attributeSet = ['val' => 100, |
115 | 115 | 'maxVal' => 200, |
116 | - ]; |
|
116 | + ]; |
|
117 | 117 | |
118 | 118 | // Setters return the instance to implement the fluent interface |
119 | 119 | $result = $this->testAutoFilterColumnObject->setAttributes($attributeSet); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | $attributeSet = ['val' => 100, |
126 | 126 | 'maxVal' => 200, |
127 | - ]; |
|
127 | + ]; |
|
128 | 128 | |
129 | 129 | $this->testAutoFilterColumnObject->setAttributes($attributeSet); |
130 | 130 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | { |
138 | 138 | $attributeSet = ['val' => 100, |
139 | 139 | 'maxVal' => 200, |
140 | - ]; |
|
140 | + ]; |
|
141 | 141 | |
142 | 142 | foreach ($attributeSet as $attributeName => $attributeValue) { |
143 | 143 | // Setters return the instance to implement the fluent interface |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | { |
151 | 151 | $attributeSet = ['val' => 100, |
152 | 152 | 'maxVal' => 200, |
153 | - ]; |
|
153 | + ]; |
|
154 | 154 | |
155 | 155 | $this->testAutoFilterColumnObject->setAttributes($attributeSet); |
156 | 156 |
@@ -2,15 +2,15 @@ |
||
2 | 2 | |
3 | 3 | // Unix TimeStamp Result Comments |
4 | 4 | return [ |
5 | - [-2147472000, 714], // PHP 32-bit Earliest Date 14-Dec-1901 |
|
6 | - [-2082931200, 1461], // 31-Dec-1903 |
|
7 | - [-2082844800, 1462], // Excel 1904 Calendar Base Date 01-Jan-1904 |
|
8 | - [-2082758400, 1463], // 02-Jan-1904 |
|
9 | - [-285120000, 22269], // 19-Dec-1960 |
|
10 | - [0, 25569], // PHP Base Date 01-Jan-1970 |
|
11 | - [408067200, 30292], // 07-Dec-1982 |
|
12 | - [1213228800, 39611], // 12-Jun-2008 |
|
13 | - [2147472000, 50424], // PHP 32-bit Latest Date 19-Jan-2038 |
|
14 | - [-2102494934, 1234.56789], // 18-May-1903 13:37:46 |
|
15 | - [-1142494943, 12345.6789], // 18-Oct-1933 16:17:37 |
|
5 | + [-2147472000, 714], // PHP 32-bit Earliest Date 14-Dec-1901 |
|
6 | + [-2082931200, 1461], // 31-Dec-1903 |
|
7 | + [-2082844800, 1462], // Excel 1904 Calendar Base Date 01-Jan-1904 |
|
8 | + [-2082758400, 1463], // 02-Jan-1904 |
|
9 | + [-285120000, 22269], // 19-Dec-1960 |
|
10 | + [0, 25569], // PHP Base Date 01-Jan-1970 |
|
11 | + [408067200, 30292], // 07-Dec-1982 |
|
12 | + [1213228800, 39611], // 12-Jun-2008 |
|
13 | + [2147472000, 50424], // PHP 32-bit Latest Date 19-Jan-2038 |
|
14 | + [-2102494934, 1234.56789], // 18-May-1903 13:37:46 |
|
15 | + [-1142494943, 12345.6789], // 18-Oct-1933 16:17:37 |
|
16 | 16 | ]; |