Completed
Branch develop (3f9c38)
by
unknown
25:32
created
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Escher.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 }
103 103
 
104 104
                 $header = pack('vvV', $recVerInstance, $recType, strlen($dggData));
105
-                $innerData .= $header . $dggData;
105
+                $innerData .= $header.$dggData;
106 106
 
107 107
                 // write the bstoreContainer
108 108
                 if ($bstoreContainer = $this->object->getBstoreContainer()) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
                 $header = pack('vvV', $recVerInstance, $recType, $length);
123 123
 
124
-                $this->data = $header . $innerData;
124
+                $this->data = $header.$innerData;
125 125
 
126 126
                 break;
127 127
             case BstoreContainer::class:
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
                 $header = pack('vvV', $recVerInstance, $recType, $length);
151 151
 
152
-                $this->data = $header . $innerData;
152
+                $this->data = $header.$innerData;
153 153
 
154 154
                 break;
155 155
             case BSE::class:
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
                 // number of shapes in this drawing (including group shape)
285 285
                 $countShapes = count($this->object->getSpgrContainer()->getChildren());
286
-                $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId());
286
+                $innerData .= $header.pack('VV', $countShapes, $this->object->getLastSpId());
287 287
 
288 288
                 // write the spgrContainer
289 289
                 if ($spgrContainer = $this->object->getSpgrContainer()) {
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
                 $header = pack('vvV', $recVerInstance, $recType, $length);
316 316
 
317
-                $this->data = $header . $innerData;
317
+                $this->data = $header.$innerData;
318 318
 
319 319
                 break;
320 320
             case SpgrContainer::class:
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 
353 353
                 $header = pack('vvV', $recVerInstance, $recType, $length);
354 354
 
355
-                $this->data = $header . $innerData;
355
+                $this->data = $header.$innerData;
356 356
                 $this->spOffsets = $spOffsets;
357 357
                 $this->spTypes = $spTypes;
358 358
 
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
                     $header = pack('vvV', $recVerInstance, $recType, $length);
377 377
 
378
-                    $data .= $header . pack('VVVV', 0, 0, 0, 0);
378
+                    $data .= $header.pack('VVVV', 0, 0, 0, 0);
379 379
                 }
380 380
                 $this->spTypes[] = ($this->object->getSpType());
381 381
 
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
                 $header = pack('vvV', $recVerInstance, $recType, $length);
392 392
 
393
-                $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00);
393
+                $data .= $header.pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00);
394 394
 
395 395
                 // the options
396 396
                 if ($this->object->getOPTCollection()) {
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
                     $recVerInstance |= $recInstance << 4;
409 409
 
410 410
                     $header = pack('vvV', $recVerInstance, $recType, $length);
411
-                    $data .= $header . $optData;
411
+                    $data .= $header.$optData;
412 412
                 }
413 413
 
414 414
                 // the client anchor
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
                     $recVerInstance |= $recInstance << 4;
450 450
 
451 451
                     $header = pack('vvV', $recVerInstance, $recType, $length);
452
-                    $data .= $header . $clientAnchorData;
452
+                    $data .= $header.$clientAnchorData;
453 453
                 }
454 454
 
455 455
                 // the client data, just empty for now
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                     $recVerInstance |= $recInstance << 4;
467 467
 
468 468
                     $header = pack('vvV', $recVerInstance, $recType, $length);
469
-                    $data .= $header . $clientDataData;
469
+                    $data .= $header.$clientDataData;
470 470
                 }
471 471
 
472 472
                 // write the record
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 
481 481
                 $header = pack('vvV', $recVerInstance, $recType, $length);
482 482
 
483
-                $this->data = $header . $data;
483
+                $this->data = $header.$data;
484 484
 
485 485
                 break;
486 486
         }
Please login to merge, or discard this patch.
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -498,19 +498,19 @@  discard block
 block discarded – undo
498 498
         } elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) {
499 499
             return $this->convertRef2d($token);
500 500
         // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1
501
-        } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?(\\d+)$/u', $token)) {
501
+        } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED.'(\\:'.self::REGEX_SHEET_TITLE_UNQUOTED.')?\\!\$?[A-Ia-i]?[A-Za-z]\$?(\\d+)$/u', $token)) {
502 502
             return $this->convertRef3d($token);
503 503
         // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1
504
-        } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\\d+)$/u", $token)) {
504
+        } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED.'(\\:'.self::REGEX_SHEET_TITLE_QUOTED.")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\\d+)$/u", $token)) {
505 505
             return $this->convertRef3d($token);
506 506
         // match ranges like A1:B2 or $A$1:$B$2
507 507
         } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)\:(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $token)) {
508 508
             return $this->convertRange2d($token);
509 509
         // match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2
510
-        } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)\\:\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)$/u', $token)) {
510
+        } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED.'(\\:'.self::REGEX_SHEET_TITLE_UNQUOTED.')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)\\:\$?([A-Ia-i]?[A-Za-z])?\$?(\\d+)$/u', $token)) {
511 511
             return $this->convertRange3d($token);
512 512
         // match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2
513
-        } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)\\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)$/u", $token)) {
513
+        } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED.'(\\:'.self::REGEX_SHEET_TITLE_QUOTED.")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)\\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\\d+)$/u", $token)) {
514 514
             return $this->convertRange3d($token);
515 515
         // operators (including parentheses)
516 516
         } elseif (isset($this->ptg[$token])) {
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
             throw new WriterException('String is too long');
570 570
         }
571 571
 
572
-        return pack('C', $this->ptg['ptgStr']) . StringHelper::UTF8toBIFF8UnicodeShort($string);
572
+        return pack('C', $this->ptg['ptgStr']).StringHelper::UTF8toBIFF8UnicodeShort($string);
573 573
     }
574 574
 
575 575
     /**
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
             throw new WriterException("Unknown class $class");
631 631
         }
632 632
 
633
-        return $ptgArea . $row1 . $row2 . $col1 . $col2;
633
+        return $ptgArea.$row1.$row2.$col1.$col2;
634 634
     }
635 635
 
636 636
     /**
@@ -657,13 +657,13 @@  discard block
 block discarded – undo
657 657
             [$row1, $col1] = $this->cellToPackedRowcol($cell1);
658 658
             [$row2, $col2] = $this->cellToPackedRowcol($cell2);
659 659
         } else { // It's a rows range (like 26:27)
660
-            [$row1, $col1, $row2, $col2] = $this->rangeToPackedRange($cell1 . ':' . $cell2);
660
+            [$row1, $col1, $row2, $col2] = $this->rangeToPackedRange($cell1.':'.$cell2);
661 661
         }
662 662
 
663 663
         // The ptg value depends on the class of the ptg.
664 664
         $ptgArea = pack('C', $this->ptg['ptgArea3d']);
665 665
 
666
-        return $ptgArea . $ext_ref . $row1 . $row2 . $col1 . $col2;
666
+        return $ptgArea.$ext_ref.$row1.$row2.$col1.$col2;
667 667
     }
668 668
 
669 669
     /**
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
         // The ptg value depends on the class of the ptg.
683 683
         $ptgRef = pack('C', $this->ptg['ptgRefA']);
684 684
 
685
-        return $ptgRef . $row . $col;
685
+        return $ptgRef.$row.$col;
686 686
     }
687 687
 
688 688
     /**
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
         // The ptg value depends on the class of the ptg.
708 708
         $ptgRef = pack('C', $this->ptg['ptgRef3dA']);
709 709
 
710
-        return $ptgRef . $ext_ref . $row . $col;
710
+        return $ptgRef.$ext_ref.$row.$col;
711 711
     }
712 712
 
713 713
     /**
@@ -1029,22 +1029,22 @@  discard block
 block discarded – undo
1029 1029
                 // if it's a reference A1 or $A$1 or $A1 or A$1
1030 1030
                 if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?\d+$/', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.') and ($this->lookAhead !== '!')) {
1031 1031
                     return $token;
1032
-                } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) {
1032
+                } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED.'(\\:'.self::REGEX_SHEET_TITLE_UNQUOTED.')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) {
1033 1033
                     // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1)
1034 1034
                     return $token;
1035
-                } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) {
1035
+                } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED.'(\\:'.self::REGEX_SHEET_TITLE_QUOTED.")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead) and ($this->lookAhead !== ':') and ($this->lookAhead !== '.')) {
1036 1036
                     // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1)
1037 1037
                     return $token;
1038 1038
                 } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+:(\$)?[A-Ia-i]?[A-Za-z](\$)?\d+$/', $token) && !preg_match('/\d/', $this->lookAhead)) {
1039 1039
                     // if it's a range A1:A2 or $A$1:$A$2
1040 1040
                     return $token;
1041
-                } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead)) {
1041
+                } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED.'(\\:'.self::REGEX_SHEET_TITLE_UNQUOTED.')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $token) and !preg_match('/\d/', $this->lookAhead)) {
1042 1042
                     // If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2
1043 1043
                     return $token;
1044
-                } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead)) {
1044
+                } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED.'(\\:'.self::REGEX_SHEET_TITLE_QUOTED.")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $token) and !preg_match('/\d/', $this->lookAhead)) {
1045 1045
                     // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2
1046 1046
                     return $token;
1047
-                } elseif (is_numeric($token) and (!is_numeric($token . $this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead !== '!') and ($this->lookAhead !== ':')) {
1047
+                } elseif (is_numeric($token) and (!is_numeric($token.$this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead !== '!') and ($this->lookAhead !== ':')) {
1048 1048
                     // If it's a number (check that it's not a sheet name or range)
1049 1049
                     return $token;
1050 1050
                 } elseif (preg_match('/"([^"]|""){0,255}"/', $token) and $this->lookAhead !== '"' and (substr_count($token, '"') % 2 == 0)) {
@@ -1258,13 +1258,13 @@  discard block
 block discarded – undo
1258 1258
             $this->advance();
1259 1259
 
1260 1260
             return $result;
1261
-        } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $this->currentToken)) {
1261
+        } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED.'(\\:'.self::REGEX_SHEET_TITLE_UNQUOTED.')?\\!\$?[A-Ia-i]?[A-Za-z]\$?\\d+$/u', $this->currentToken)) {
1262 1262
             // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1)
1263 1263
             $result = $this->createTree($this->currentToken, '', '');
1264 1264
             $this->advance();
1265 1265
 
1266 1266
             return $result;
1267
-        } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $this->currentToken)) {
1267
+        } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED.'(\\:'.self::REGEX_SHEET_TITLE_QUOTED.")?'\\!\\$?[A-Ia-i]?[A-Za-z]\\$?\\d+$/u", $this->currentToken)) {
1268 1268
             // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1)
1269 1269
             $result = $this->createTree($this->currentToken, '', '');
1270 1270
             $this->advance();
@@ -1278,14 +1278,14 @@  discard block
 block discarded – undo
1278 1278
             $this->advance();
1279 1279
 
1280 1280
             return $result;
1281
-        } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . '(\\:' . self::REGEX_SHEET_TITLE_UNQUOTED . ')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $this->currentToken)) {
1281
+        } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED.'(\\:'.self::REGEX_SHEET_TITLE_UNQUOTED.')?\\!\$?([A-Ia-i]?[A-Za-z])?\$?\\d+:\$?([A-Ia-i]?[A-Za-z])?\$?\\d+$/u', $this->currentToken)) {
1282 1282
             // If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2)
1283 1283
             // must be an error?
1284 1284
             $result = $this->createTree($this->currentToken, '', '');
1285 1285
             $this->advance();
1286 1286
 
1287 1287
             return $result;
1288
-        } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . '(\\:' . self::REGEX_SHEET_TITLE_QUOTED . ")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $this->currentToken)) {
1288
+        } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED.'(\\:'.self::REGEX_SHEET_TITLE_QUOTED.")?'\\!\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+:\\$?([A-Ia-i]?[A-Za-z])?\\$?\\d+$/u", $this->currentToken)) {
1289 1289
             // If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2)
1290 1290
             // must be an error?
1291 1291
             $result = $this->createTree($this->currentToken, '', '');
@@ -1308,7 +1308,7 @@  discard block
 block discarded – undo
1308 1308
             return $this->func();
1309 1309
         }
1310 1310
 
1311
-        throw new WriterException('Syntax error: ' . $this->currentToken . ', lookahead: ' . $this->lookAhead . ', current char: ' . $this->currentCharacter);
1311
+        throw new WriterException('Syntax error: '.$this->currentToken.', lookahead: '.$this->lookAhead.', current char: '.$this->currentCharacter);
1312 1312
     }
1313 1313
 
1314 1314
     /**
@@ -1429,10 +1429,10 @@  discard block
 block discarded – undo
1429 1429
                 $left_tree = '';
1430 1430
             }
1431 1431
             // add it's left subtree and return.
1432
-            return $left_tree . $this->convertFunction($tree['value'], $tree['right']);
1432
+            return $left_tree.$this->convertFunction($tree['value'], $tree['right']);
1433 1433
         }
1434 1434
         $converted_tree = $this->convert($tree['value']);
1435 1435
 
1436
-        return $polish . $converted_tree;
1436
+        return $polish.$converted_tree;
1437 1437
     }
1438 1438
 }
Please login to merge, or discard this patch.
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Xf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
         $data .= pack('CCC', self::mapTextRotation($this->_style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib);
241 241
         $data .= pack('VVv', $border1, $border2, $icv);
242 242
 
243
-        return $header . $data;
243
+        return $header.$data;
244 244
     }
245 245
 
246 246
     /**
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/BIFFwriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
         $header = pack('vv', $record, $length);
159 159
         $data = pack('vvvv', $version, $type, $build, $year);
160
-        $this->append($header . $data . $unknown);
160
+        $this->append($header.$data.$unknown);
161 161
     }
162 162
 
163 163
     /**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
         // The first 2080/8224 bytes remain intact. However, we have to change
205 205
         // the length field of the record.
206
-        $tmp = substr($data, 0, 2) . pack('v', $limit) . substr($data, 4, $limit);
206
+        $tmp = substr($data, 0, 2).pack('v', $limit).substr($data, 4, $limit);
207 207
 
208 208
         $header = pack('vv', $record, $limit); // Headers for continue records
209 209
 
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php 1 patch
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
                 // URL
523 523
             } else {
524 524
                 // external (local file)
525
-                $url = 'external:' . $url;
525
+                $url = 'external:'.$url;
526 526
             }
527 527
 
528 528
             $this->writeUrl($row - 1, Coordinate::columnIndexFromString($column) - 1, $url);
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
             $xl_double = strrev($xl_double);
671 671
         }
672 672
 
673
-        $this->append($header . $data . $xl_double);
673
+        $this->append($header.$data.$xl_double);
674 674
 
675 675
         return 0;
676 676
     }
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 
713 713
         $header = pack('vv', $record, $length);
714 714
         $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);
715
-        $this->append($header . $data);
715
+        $this->append($header.$data);
716 716
     }
717 717
 
718 718
     /**
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
 
741 741
         $header = pack('vv', $record, $length);
742 742
         $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]);
743
-        $this->append($header . $data);
743
+        $this->append($header.$data);
744 744
     }
745 745
 
746 746
     /**
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 
769 769
         $header = pack('vv', $record, $length);
770 770
         $data = pack('vvv', $row, $col, $xfIndex);
771
-        $this->append($header . $data);
771
+        $this->append($header.$data);
772 772
 
773 773
         return 0;
774 774
     }
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 
792 792
         $header = pack('vv', $record, $length);
793 793
         $data = pack('vvvCC', $row, $col, $xfIndex, $value, $isError);
794
-        $this->append($header . $data);
794
+        $this->append($header.$data);
795 795
 
796 796
         return 0;
797 797
     }
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
             $data = pack('vvv', $row, $col, $xfIndex)
884 884
                         . $num
885 885
                         . pack('vVv', $grbit, $unknown, $formlen);
886
-            $this->append($header . $data . $formula);
886
+            $this->append($header.$data.$formula);
887 887
 
888 888
             // Append also a STRING record if necessary
889 889
             if ($stringValue !== null) {
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
         $length = strlen($data);
910 910
         $header = pack('vv', $record, $length);
911 911
 
912
-        $this->append($header . $data);
912
+        $this->append($header.$data);
913 913
     }
914 914
 
915 915
     /**
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 
998 998
         // Convert URL to a null terminated wchar string
999 999
         $url = implode("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY));
1000
-        $url = $url . "\0\0\0";
1000
+        $url = $url."\0\0\0";
1001 1001
 
1002 1002
         // Pack the length of the URL
1003 1003
         $url_len = pack('V', strlen($url));
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
         $data = pack('vvvv', $row1, $row2, $col1, $col2);
1011 1011
 
1012 1012
         // Write the packed data
1013
-        $this->append($header . $data . $unknown1 . $options . $unknown2 . $url_len . $url);
1013
+        $this->append($header.$data.$unknown1.$options.$unknown2.$url_len.$url);
1014 1014
 
1015 1015
         return 0;
1016 1016
     }
@@ -1059,7 +1059,7 @@  discard block
 block discarded – undo
1059 1059
         $data = pack('vvvv', $row1, $row2, $col1, $col2);
1060 1060
 
1061 1061
         // Write the packed data
1062
-        $this->append($header . $data . $unknown1 . $options . $url_len . $url);
1062
+        $this->append($header.$data.$unknown1.$options.$url_len.$url);
1063 1063
 
1064 1064
         return 0;
1065 1065
     }
@@ -1124,10 +1124,10 @@  discard block
 block discarded – undo
1124 1124
         $up_count = pack('v', $up_count);
1125 1125
 
1126 1126
         // Store the short dos dir name (null terminated)
1127
-        $dir_short = preg_replace('/\\.\\.\\\\/', '', $dir_long) . "\0";
1127
+        $dir_short = preg_replace('/\\.\\.\\\\/', '', $dir_long)."\0";
1128 1128
 
1129 1129
         // Store the long dir name as a wchar string (non-null terminated)
1130
-        $dir_long = $dir_long . "\0";
1130
+        $dir_long = $dir_long."\0";
1131 1131
 
1132 1132
         // Pack the lengths of the dir strings
1133 1133
         $dir_short_len = pack('V', strlen($dir_short));
@@ -1141,14 +1141,14 @@  discard block
 block discarded – undo
1141 1141
         $unknown4 = pack('v', 0x03);
1142 1142
 
1143 1143
         // Pack the main data stream
1144
-        $data = pack('vvvv', $row1, $row2, $col1, $col2) .
1145
-                            $unknown1 .
1146
-                            $link_type .
1147
-                            $unknown2 .
1148
-                            $up_count .
1149
-                            $dir_short_len .
1150
-                            $dir_short .
1151
-                            $unknown3 .
1144
+        $data = pack('vvvv', $row1, $row2, $col1, $col2).
1145
+                            $unknown1.
1146
+                            $link_type.
1147
+                            $unknown2.
1148
+                            $up_count.
1149
+                            $dir_short_len.
1150
+                            $dir_short.
1151
+                            $unknown3.
1152 1152
                             $stream_len; /*.
1153 1153
                           $dir_long_len .
1154 1154
                           $unknown4     .
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
         $header = pack('vv', $record, $length);
1162 1162
 
1163 1163
         // Write the packed data
1164
-        $this->append($header . $data);
1164
+        $this->append($header.$data);
1165 1165
 
1166 1166
         return 0;
1167 1167
     }
@@ -1219,7 +1219,7 @@  discard block
 block discarded – undo
1219 1219
 
1220 1220
         $header = pack('vv', $record, $length);
1221 1221
         $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe);
1222
-        $this->append($header . $data);
1222
+        $this->append($header.$data);
1223 1223
     }
1224 1224
 
1225 1225
     /**
@@ -1233,7 +1233,7 @@  discard block
 block discarded – undo
1233 1233
         $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved
1234 1234
 
1235 1235
         $header = pack('vv', $record, $length);
1236
-        $this->append($header . $data);
1236
+        $this->append($header.$data);
1237 1237
     }
1238 1238
 
1239 1239
     /**
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 
1286 1286
         $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000);
1287 1287
 
1288
-        $this->append($header . $data);
1288
+        $this->append($header.$data);
1289 1289
     }
1290 1290
 
1291 1291
     /**
@@ -1307,7 +1307,7 @@  discard block
 block discarded – undo
1307 1307
 
1308 1308
         $header = pack('vv', $record, $length);
1309 1309
         $data = pack('vv', 1, $defaultRowHeight);
1310
-        $this->append($header . $data);
1310
+        $this->append($header.$data);
1311 1311
     }
1312 1312
 
1313 1313
     /**
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
 
1323 1323
         $header = pack('vv', $record, $length);
1324 1324
         $data = pack('v', $defaultColWidth);
1325
-        $this->append($header . $data);
1325
+        $this->append($header.$data);
1326 1326
     }
1327 1327
 
1328 1328
     /**
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
 
1381 1381
         $header = pack('vv', $record, $length);
1382 1382
         $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved);
1383
-        $this->append($header . $data);
1383
+        $this->append($header.$data);
1384 1384
     }
1385 1385
 
1386 1386
     /**
@@ -1440,7 +1440,7 @@  discard block
 block discarded – undo
1440 1440
 
1441 1441
         $header = pack('vv', $record, $length);
1442 1442
         $data = pack('CvvvvvvCC', $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast);
1443
-        $this->append($header . $data);
1443
+        $this->append($header.$data);
1444 1444
     }
1445 1445
 
1446 1446
     /**
@@ -1485,10 +1485,10 @@  discard block
 block discarded – undo
1485 1485
 
1486 1486
             // flush record if we have reached limit for number of merged cells, or reached final merged cell
1487 1487
             if ($j == $maxCountMergeCellsPerRecord or $i == $countMergeCells) {
1488
-                $recordData = pack('v', $j) . $recordData;
1488
+                $recordData = pack('v', $j).$recordData;
1489 1489
                 $length = strlen($recordData);
1490 1490
                 $header = pack('vv', $record, $length);
1491
-                $this->append($header . $recordData);
1491
+                $this->append($header.$recordData);
1492 1492
 
1493 1493
                 // initialize for next record, if any
1494 1494
                 $recordData = '';
@@ -1521,7 +1521,7 @@  discard block
 block discarded – undo
1521 1521
 
1522 1522
         $record = 0x0862; // Record identifier
1523 1523
         $header = pack('vv', $record, $length);
1524
-        $this->append($header . $recordData);
1524
+        $this->append($header.$recordData);
1525 1525
     }
1526 1526
 
1527 1527
     /**
@@ -1565,7 +1565,7 @@  discard block
 block discarded – undo
1565 1565
         $length = strlen($recordData);
1566 1566
         $header = pack('vv', $record, $length);
1567 1567
 
1568
-        $this->append($header . $recordData);
1568
+        $this->append($header.$recordData);
1569 1569
     }
1570 1570
 
1571 1571
     /**
@@ -1606,13 +1606,13 @@  discard block
 block discarded – undo
1606 1606
                 hexdec($password)
1607 1607
             );
1608 1608
 
1609
-            $recordData .= StringHelper::UTF8toBIFF8UnicodeLong('p' . md5($recordData));
1609
+            $recordData .= StringHelper::UTF8toBIFF8UnicodeLong('p'.md5($recordData));
1610 1610
 
1611 1611
             $length = strlen($recordData);
1612 1612
 
1613 1613
             $record = 0x0868; // Record identifier
1614 1614
             $header = pack('vv', $record, $length);
1615
-            $this->append($header . $recordData);
1615
+            $this->append($header.$recordData);
1616 1616
         }
1617 1617
     }
1618 1618
 
@@ -1700,7 +1700,7 @@  discard block
 block discarded – undo
1700 1700
 
1701 1701
         $header = pack('vv', $record, $length);
1702 1702
         $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct);
1703
-        $this->append($header . $data);
1703
+        $this->append($header.$data);
1704 1704
     }
1705 1705
 
1706 1706
     /**
@@ -1759,9 +1759,9 @@  discard block
 block discarded – undo
1759 1759
 
1760 1760
         $header = pack('vv', $record, $length);
1761 1761
         $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes);
1762
-        $data2 = $numHdr . $numFtr;
1762
+        $data2 = $numHdr.$numFtr;
1763 1763
         $data3 = pack('v', $iCopies);
1764
-        $this->append($header . $data1 . $data2 . $data3);
1764
+        $this->append($header.$data1.$data2.$data3);
1765 1765
     }
1766 1766
 
1767 1767
     /**
@@ -1785,7 +1785,7 @@  discard block
 block discarded – undo
1785 1785
 
1786 1786
         $header = pack('vv', $record, $length);
1787 1787
 
1788
-        $this->append($header . $recordData);
1788
+        $this->append($header.$recordData);
1789 1789
     }
1790 1790
 
1791 1791
     /**
@@ -1809,7 +1809,7 @@  discard block
 block discarded – undo
1809 1809
 
1810 1810
         $header = pack('vv', $record, $length);
1811 1811
 
1812
-        $this->append($header . $recordData);
1812
+        $this->append($header.$recordData);
1813 1813
     }
1814 1814
 
1815 1815
     /**
@@ -1825,7 +1825,7 @@  discard block
 block discarded – undo
1825 1825
         $header = pack('vv', $record, $length);
1826 1826
         $data = pack('v', $fHCenter);
1827 1827
 
1828
-        $this->append($header . $data);
1828
+        $this->append($header.$data);
1829 1829
     }
1830 1830
 
1831 1831
     /**
@@ -1840,7 +1840,7 @@  discard block
 block discarded – undo
1840 1840
 
1841 1841
         $header = pack('vv', $record, $length);
1842 1842
         $data = pack('v', $fVCenter);
1843
-        $this->append($header . $data);
1843
+        $this->append($header.$data);
1844 1844
     }
1845 1845
 
1846 1846
     /**
@@ -1859,7 +1859,7 @@  discard block
 block discarded – undo
1859 1859
             $data = strrev($data);
1860 1860
         }
1861 1861
 
1862
-        $this->append($header . $data);
1862
+        $this->append($header.$data);
1863 1863
     }
1864 1864
 
1865 1865
     /**
@@ -1878,7 +1878,7 @@  discard block
 block discarded – undo
1878 1878
             $data = strrev($data);
1879 1879
         }
1880 1880
 
1881
-        $this->append($header . $data);
1881
+        $this->append($header.$data);
1882 1882
     }
1883 1883
 
1884 1884
     /**
@@ -1897,7 +1897,7 @@  discard block
 block discarded – undo
1897 1897
             $data = strrev($data);
1898 1898
         }
1899 1899
 
1900
-        $this->append($header . $data);
1900
+        $this->append($header.$data);
1901 1901
     }
1902 1902
 
1903 1903
     /**
@@ -1916,7 +1916,7 @@  discard block
 block discarded – undo
1916 1916
             $data = strrev($data);
1917 1917
         }
1918 1918
 
1919
-        $this->append($header . $data);
1919
+        $this->append($header.$data);
1920 1920
     }
1921 1921
 
1922 1922
     /**
@@ -1931,7 +1931,7 @@  discard block
 block discarded – undo
1931 1931
 
1932 1932
         $header = pack('vv', $record, $length);
1933 1933
         $data = pack('v', $fPrintRwCol);
1934
-        $this->append($header . $data);
1934
+        $this->append($header.$data);
1935 1935
     }
1936 1936
 
1937 1937
     /**
@@ -1947,7 +1947,7 @@  discard block
 block discarded – undo
1947 1947
 
1948 1948
         $header = pack('vv', $record, $length);
1949 1949
         $data = pack('v', $fPrintGrid);
1950
-        $this->append($header . $data);
1950
+        $this->append($header.$data);
1951 1951
     }
1952 1952
 
1953 1953
     /**
@@ -1963,7 +1963,7 @@  discard block
 block discarded – undo
1963 1963
 
1964 1964
         $header = pack('vv', $record, $length);
1965 1965
         $data = pack('v', $fGridSet);
1966
-        $this->append($header . $data);
1966
+        $this->append($header.$data);
1967 1967
     }
1968 1968
 
1969 1969
     /**
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
 
1980 1980
         $header = pack('vv', $record, $length);
1981 1981
         $data = pack('v', $iNumFilters);
1982
-        $this->append($header . $data);
1982
+        $this->append($header.$data);
1983 1983
     }
1984 1984
 
1985 1985
     /**
@@ -2026,7 +2026,7 @@  discard block
 block discarded – undo
2026 2026
         $header = pack('vv', $record, $length);
2027 2027
         $data = pack('vvvv', $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level);
2028 2028
 
2029
-        $this->append($header . $data);
2029
+        $this->append($header.$data);
2030 2030
     }
2031 2031
 
2032 2032
     /**
@@ -2062,7 +2062,7 @@  discard block
 block discarded – undo
2062 2062
 
2063 2063
         $header = pack('vv', $record, $length);
2064 2064
         $data = pack('v', $grbit);
2065
-        $this->append($header . $data);
2065
+        $this->append($header.$data);
2066 2066
     }
2067 2067
 
2068 2068
     /**
@@ -2117,7 +2117,7 @@  discard block
 block discarded – undo
2117 2117
                 $data .= pack('vvv', $hbreak, 0x0000, 0x00ff);
2118 2118
             }
2119 2119
 
2120
-            $this->append($header . $data);
2120
+            $this->append($header.$data);
2121 2121
         }
2122 2122
 
2123 2123
         // vertical page breaks
@@ -2144,7 +2144,7 @@  discard block
 block discarded – undo
2144 2144
                 $data .= pack('vvv', $vbreak, 0x0000, 0xffff);
2145 2145
             }
2146 2146
 
2147
-            $this->append($header . $data);
2147
+            $this->append($header.$data);
2148 2148
         }
2149 2149
     }
2150 2150
 
@@ -2166,7 +2166,7 @@  discard block
 block discarded – undo
2166 2166
         $header = pack('vv', $record, $length);
2167 2167
         $data = pack('v', $fLock);
2168 2168
 
2169
-        $this->append($header . $data);
2169
+        $this->append($header.$data);
2170 2170
     }
2171 2171
 
2172 2172
     /**
@@ -2190,7 +2190,7 @@  discard block
 block discarded – undo
2190 2190
         $header = pack('vv', $record, $length);
2191 2191
         $data = pack('v', 1);
2192 2192
 
2193
-        $this->append($header . $data);
2193
+        $this->append($header.$data);
2194 2194
     }
2195 2195
 
2196 2196
     /**
@@ -2214,7 +2214,7 @@  discard block
 block discarded – undo
2214 2214
         $header = pack('vv', $record, $length);
2215 2215
         $data = pack('v', 1);
2216 2216
 
2217
-        $this->append($header . $data);
2217
+        $this->append($header.$data);
2218 2218
     }
2219 2219
 
2220 2220
     /**
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
         $header = pack('vv', $record, $length);
2236 2236
         $data = pack('v', $wPassword);
2237 2237
 
2238
-        $this->append($header . $data);
2238
+        $this->append($header.$data);
2239 2239
     }
2240 2240
 
2241 2241
     /**
@@ -2269,7 +2269,7 @@  discard block
 block discarded – undo
2269 2269
         $lcb = $size;
2270 2270
 
2271 2271
         $header = pack('vvvvV', $record, $length, $cf, $env, $lcb);
2272
-        $this->append($header . $data);
2272
+        $this->append($header.$data);
2273 2273
     }
2274 2274
 
2275 2275
     /**
@@ -2451,7 +2451,7 @@  discard block
 block discarded – undo
2451 2451
         $data .= pack('v', $grbit2);
2452 2452
         $data .= pack('V', $Reserved5);
2453 2453
 
2454
-        $this->append($header . $data);
2454
+        $this->append($header.$data);
2455 2455
     }
2456 2456
 
2457 2457
     /**
@@ -2473,7 +2473,7 @@  discard block
 block discarded – undo
2473 2473
                 foreach (['red', 'green', 'blue'] as $key) {
2474 2474
                     $color[$key] = $color[$key] + round((255 - $color[$key]) * $color['alpha'] / 127);
2475 2475
                 }
2476
-                $data .= chr($color['blue']) . chr($color['green']) . chr($color['red']);
2476
+                $data .= chr($color['blue']).chr($color['green']).chr($color['red']);
2477 2477
             }
2478 2478
             if (3 * $width % 4) {
2479 2479
                 $data .= str_repeat("\x00", 4 - 3 * $width % 4);
@@ -2564,7 +2564,7 @@  discard block
 block discarded – undo
2564 2564
 
2565 2565
         // Add the BITMAPCOREHEADER data
2566 2566
         $header = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18);
2567
-        $data = $header . $data;
2567
+        $data = $header.$data;
2568 2568
 
2569 2569
         return [$width, $height, $size, $data];
2570 2570
     }
@@ -2585,7 +2585,7 @@  discard block
 block discarded – undo
2585 2585
 
2586 2586
         $header = pack('vv', $record, $length);
2587 2587
         $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100);
2588
-        $this->append($header . $data);
2588
+        $this->append($header.$data);
2589 2589
     }
2590 2590
 
2591 2591
     /**
@@ -2634,7 +2634,7 @@  discard block
 block discarded – undo
2634 2634
                 $length = strlen($dataChunk);
2635 2635
                 $header = pack('vv', $record, $length);
2636 2636
 
2637
-                $this->append($header . $dataChunk);
2637
+                $this->append($header.$dataChunk);
2638 2638
 
2639 2639
                 // OBJ record
2640 2640
                 $record = 0x005D; // record identifier
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
 
2689 2689
                 $length = strlen($objData);
2690 2690
                 $header = pack('vv', $record, $length);
2691
-                $this->append($header . $objData);
2691
+                $this->append($header.$objData);
2692 2692
             }
2693 2693
         }
2694 2694
     }
@@ -2714,7 +2714,7 @@  discard block
 block discarded – undo
2714 2714
 
2715 2715
             $header = pack('vv', $record, $length);
2716 2716
             $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection));
2717
-            $this->append($header . $data);
2717
+            $this->append($header.$data);
2718 2718
 
2719 2719
             // DATAVALIDATION records
2720 2720
             $record = 0x01BE; // Record identifier
@@ -2901,7 +2901,7 @@  discard block
 block discarded – undo
2901 2901
                 $length = strlen($data);
2902 2902
                 $header = pack('vv', $record, $length);
2903 2903
 
2904
-                $this->append($header . $data);
2904
+                $this->append($header.$data);
2905 2905
             }
2906 2906
         }
2907 2907
     }
@@ -2963,7 +2963,7 @@  discard block
 block discarded – undo
2963 2963
 
2964 2964
         $header = pack('vv', $record, $length);
2965 2965
         $data = pack('vvVVvv', $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit);
2966
-        $this->append($header . $data);
2966
+        $this->append($header.$data);
2967 2967
     }
2968 2968
 
2969 2969
     /**
@@ -4428,7 +4428,7 @@  discard block
 block discarded – undo
4428 4428
             $data .= $operand2;
4429 4429
         }
4430 4430
         $header = pack('vv', $record, strlen($data));
4431
-        $this->append($header . $data);
4431
+        $this->append($header.$data);
4432 4432
     }
4433 4433
 
4434 4434
     /**
@@ -4479,6 +4479,6 @@  discard block
 block discarded – undo
4479 4479
         $data .= $cellRange;
4480 4480
         $data .= pack('v', 0x0001);
4481 4481
         $data .= $cellRange;
4482
-        $this->append($header . $data);
4482
+        $this->append($header.$data);
4483 4483
     }
4484 4484
 }
Please login to merge, or discard this patch.
includes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Font.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         $length = strlen($data);
100 100
         $header = pack('vv', $record, $length);
101 101
 
102
-        return $header . $data;
102
+        return $header.$data;
103 103
     }
104 104
 
105 105
     /**
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         // Worksheets
83 83
         $sheetCount = $spreadsheet->getSheetCount();
84 84
         for ($i = 0; $i < $sheetCount; ++$i) {
85
-            $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml');
85
+            $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet'.($i + 1).'.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml');
86 86
         }
87 87
 
88 88
         // Shared strings
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 
100 100
             //    We need a drawing relationship for the worksheet if we have either drawings or charts
101 101
             if (($drawingCount > 0) || ($chartCount > 0) || $hasUnparsedDrawing) {
102
-                $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml');
102
+                $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing'.($i + 1).'.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml');
103 103
             }
104 104
 
105 105
             //    If we have charts, then we need a chart relationship for every individual chart
106 106
             if ($chartCount > 0) {
107 107
                 for ($c = 0; $c < $chartCount; ++$c) {
108
-                    $this->writeOverrideContentType($objWriter, '/xl/charts/chart' . $chart++ . '.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml');
108
+                    $this->writeOverrideContentType($objWriter, '/xl/charts/chart'.$chart++.'.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml');
109 109
                 }
110 110
             }
111 111
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         // Comments
114 114
         for ($i = 0; $i < $sheetCount; ++$i) {
115 115
             if (count($spreadsheet->getSheet($i)->getComments()) > 0) {
116
-                $this->writeOverrideContentType($objWriter, '/xl/comments' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml');
116
+                $this->writeOverrideContentType($objWriter, '/xl/comments'.($i + 1).'.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml');
117 117
             }
118 118
         }
119 119
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             // we need to write "Extension" but not already write for media content
147 147
             $tabRibbonTypes = array_diff($spreadsheet->getRibbonBinObjects('types'), array_keys($aMediaContentTypes));
148 148
             foreach ($tabRibbonTypes as $aRibbonType) {
149
-                $mimeType = 'image/.' . $aRibbonType; //we wrote $mimeType like customUI Editor
149
+                $mimeType = 'image/.'.$aRibbonType; //we wrote $mimeType like customUI Editor
150 150
                 $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType);
151 151
             }
152 152
         }
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Workbook.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             if ($sheetState !== 'visible' && $sheetState != '') {
229 229
                 $objWriter->writeAttribute('state', $sheetState);
230 230
             }
231
-            $objWriter->writeAttribute('r:id', 'rId' . $pRelId);
231
+            $objWriter->writeAttribute('r:id', 'rId'.$pRelId);
232 232
             $objWriter->endElement();
233 233
         } else {
234 234
             throw new WriterException('Invalid parameters passed.');
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
         $range = Coordinate::splitRange($pNamedRange->getRange());
307 307
         $iMax = count($range);
308 308
         for ($i = 0; $i < $iMax; ++$i) {
309
-            $range[$i][0] = '\'' . str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteReference($range[$i][0]);
309
+            $range[$i][0] = '\''.str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()).'\'!'.Coordinate::absoluteReference($range[$i][0]);
310 310
             if (isset($range[$i][1])) {
311 311
                 $range[$i][1] = Coordinate::absoluteReference($range[$i][1]);
312 312
             }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             $range[1] = Coordinate::absoluteCoordinate($range[1]);
346 346
             $range = implode(':', $range);
347 347
 
348
-            $objWriter->writeRawData('\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . $range);
348
+            $objWriter->writeRawData('\''.str_replace("'", "''", $pSheet->getTitle()).'\'!'.$range);
349 349
 
350 350
             $objWriter->endElement();
351 351
         }
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
             if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) {
374 374
                 $repeat = $pSheet->getPageSetup()->getColumnsToRepeatAtLeft();
375 375
 
376
-                $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1];
376
+                $settingString .= '\''.str_replace("'", "''", $pSheet->getTitle()).'\'!$'.$repeat[0].':$'.$repeat[1];
377 377
             }
378 378
 
379 379
             // Rows to repeat
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
 
385 385
                 $repeat = $pSheet->getPageSetup()->getRowsToRepeatAtTop();
386 386
 
387
-                $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1];
387
+                $settingString .= '\''.str_replace("'", "''", $pSheet->getTitle()).'\'!$'.$repeat[0].':$'.$repeat[1];
388 388
             }
389 389
 
390 390
             $objWriter->writeRawData($settingString);
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
             foreach ($printArea as $printAreaRect) {
416 416
                 $printAreaRect[0] = Coordinate::absoluteReference($printAreaRect[0]);
417 417
                 $printAreaRect[1] = Coordinate::absoluteReference($printAreaRect[1]);
418
-                $chunks[] = '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . implode(':', $printAreaRect);
418
+                $chunks[] = '\''.str_replace("'", "''", $pSheet->getTitle()).'\'!'.implode(':', $printAreaRect);
419 419
             }
420 420
 
421 421
             $objWriter->writeRawData(implode(',', $chunks));
Please login to merge, or discard this patch.
phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $objWriter->writeAttribute('macro', '');
112 112
         $objWriter->startElement('xdr:nvGraphicFramePr');
113 113
         $objWriter->startElement('xdr:cNvPr');
114
-        $objWriter->writeAttribute('name', 'Chart ' . $pRelationId);
114
+        $objWriter->writeAttribute('name', 'Chart '.$pRelationId);
115 115
         $objWriter->writeAttribute('id', 1025 * $pRelationId);
116 116
         $objWriter->endElement();
117 117
         $objWriter->startElement('xdr:cNvGraphicFramePr');
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $objWriter->startElement('c:chart');
138 138
         $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart');
139 139
         $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');
140
-        $objWriter->writeAttribute('r:id', 'rId' . $pRelationId);
140
+        $objWriter->writeAttribute('r:id', 'rId'.$pRelationId);
141 141
         $objWriter->endElement();
142 142
         $objWriter->endElement();
143 143
         $objWriter->endElement();
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             // a:blip
218 218
             $objWriter->startElement('a:blip');
219 219
             $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');
220
-            $objWriter->writeAttribute('r:embed', 'rId' . $pRelationId);
220
+            $objWriter->writeAttribute('r:embed', 'rId'.$pRelationId);
221 221
             $objWriter->endElement();
222 222
 
223 223
             // a:stretch
@@ -455,13 +455,13 @@  discard block
 block discarded – undo
455 455
         // v:shape
456 456
         $objWriter->startElement('v:shape');
457 457
         $objWriter->writeAttribute('id', $pReference);
458
-        $objWriter->writeAttribute('o:spid', '_x0000_s' . $id);
458
+        $objWriter->writeAttribute('o:spid', '_x0000_s'.$id);
459 459
         $objWriter->writeAttribute('type', '#_x0000_t75');
460 460
         $objWriter->writeAttribute('style', "position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1");
461 461
 
462 462
         // v:imagedata
463 463
         $objWriter->startElement('v:imagedata');
464
-        $objWriter->writeAttribute('o:relid', 'rId' . $pReference);
464
+        $objWriter->writeAttribute('o:relid', 'rId'.$pReference);
465 465
         $objWriter->writeAttribute('o:title', $pImage->getName());
466 466
         $objWriter->endElement();
467 467
 
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 
514 514
         $objWriter->startElement('a:hlinkClick');
515 515
         $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships');
516
-        $objWriter->writeAttribute('r:id', 'rId' . $hlinkClickId);
516
+        $objWriter->writeAttribute('r:id', 'rId'.$hlinkClickId);
517 517
         $objWriter->endElement();
518 518
     }
519 519
 }
Please login to merge, or discard this patch.