@@ -258,7 +258,7 @@ |
||
258 | 258 | . pack('V', 0)// Extra BDList Count |
259 | 259 | ); |
260 | 260 | } else { |
261 | - fwrite($FILE, pack('V', $iAll + $iBdCnt) . pack('V', $iBdExL)); |
|
261 | + fwrite($FILE, pack('V', $iAll + $iBdCnt).pack('V', $iBdExL)); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | // BDList |
@@ -266,8 +266,8 @@ |
||
266 | 266 | $x2 = ($width + 1) / self::sizeCol($sheet, Coordinate::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object |
267 | 267 | $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1) * 256; // Distance to bottom of object |
268 | 268 | |
269 | - $startCoordinates = Coordinate::stringFromColumnIndex($col_start) . ($row_start + 1); |
|
270 | - $endCoordinates = Coordinate::stringFromColumnIndex($col_end) . ($row_end + 1); |
|
269 | + $startCoordinates = Coordinate::stringFromColumnIndex($col_start).($row_start + 1); |
|
270 | + $endCoordinates = Coordinate::stringFromColumnIndex($col_end).($row_end + 1); |
|
271 | 271 | |
272 | 272 | return [ |
273 | 273 | 'startCoordinates' => $startCoordinates, |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | // Check OLE identifier |
109 | 109 | $identifierOle = pack('CCCCCCCC', 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1); |
110 | 110 | if ($this->data != $identifierOle) { |
111 | - throw new ReaderException('The filename ' . $pFilename . ' is not recognised as an OLE file'); |
|
111 | + throw new ReaderException('The filename '.$pFilename.' is not recognised as an OLE file'); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | // Get the file data |
@@ -303,12 +303,12 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | // Summary information |
306 | - if ($name == chr(5) . 'SummaryInformation') { |
|
306 | + if ($name == chr(5).'SummaryInformation') { |
|
307 | 307 | $this->summaryInformation = count($this->props) - 1; |
308 | 308 | } |
309 | 309 | |
310 | 310 | // Additional Document Summary information |
311 | - if ($name == chr(5) . 'DocumentSummaryInformation') { |
|
311 | + if ($name == chr(5).'DocumentSummaryInformation') { |
|
312 | 312 | $this->documentSummaryInformation = count($this->props) - 1; |
313 | 313 | } |
314 | 314 | |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | { |
329 | 329 | if ($pos < 0) { |
330 | 330 | // Invalid position |
331 | - throw new ReaderException('Parameter pos=' . $pos . ' is invalid.'); |
|
331 | + throw new ReaderException('Parameter pos='.$pos.' is invalid.'); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | $len = strlen($data); |
@@ -506,12 +506,12 @@ |
||
506 | 506 | |
507 | 507 | break; |
508 | 508 | default: |
509 | - throw new PhpSpreadsheetException('Unknown font name "' . $name . '". Cannot map to TrueType font file'); |
|
509 | + throw new PhpSpreadsheetException('Unknown font name "'.$name.'". Cannot map to TrueType font file'); |
|
510 | 510 | |
511 | 511 | break; |
512 | 512 | } |
513 | 513 | |
514 | - $fontFile = self::$trueTypeFontPath . $fontFile; |
|
514 | + $fontFile = self::$trueTypeFontPath.$fontFile; |
|
515 | 515 | |
516 | 516 | // Check if file actually exists |
517 | 517 | if (!file_exists($fontFile)) { |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $range = Coordinate::splitRange($namedRange->getRange()); |
542 | 542 | $iMax = count($range); |
543 | 543 | for ($i = 0; $i < $iMax; ++$i) { |
544 | - $range[$i][0] = '\'' . str_replace("'", "''", $namedRange->getWorksheet()->getTitle()) . '\'!' . Coordinate::absoluteCoordinate($range[$i][0]); |
|
544 | + $range[$i][0] = '\''.str_replace("'", "''", $namedRange->getWorksheet()->getTitle()).'\'!'.Coordinate::absoluteCoordinate($range[$i][0]); |
|
545 | 545 | if (isset($range[$i][1])) { |
546 | 546 | $range[$i][1] = Coordinate::absoluteCoordinate($range[$i][1]); |
547 | 547 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | |
556 | 556 | // make sure tRef3d is of type tRef3dR (0x3A) |
557 | 557 | if (isset($formulaData[0]) and ($formulaData[0] == "\x7A" or $formulaData[0] == "\x5A")) { |
558 | - $formulaData = "\x3A" . substr($formulaData, 1); |
|
558 | + $formulaData = "\x3A".substr($formulaData, 1); |
|
559 | 559 | } |
560 | 560 | |
561 | 561 | if ($namedRange->getLocalOnly()) { |
@@ -703,12 +703,12 @@ discard block |
||
703 | 703 | |
704 | 704 | // combine the parts |
705 | 705 | $data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0) |
706 | - . $name . $formulaData; |
|
706 | + . $name.$formulaData; |
|
707 | 707 | $length = strlen($data); |
708 | 708 | |
709 | 709 | $header = pack('vv', $record, $length); |
710 | 710 | |
711 | - return $header . $data; |
|
711 | + return $header.$data; |
|
712 | 712 | } |
713 | 713 | |
714 | 714 | /** |
@@ -743,12 +743,12 @@ discard block |
||
743 | 743 | |
744 | 744 | // combine the parts |
745 | 745 | $data = pack('vCCvvvCCCCC', $options, 0, 1, $sz, 0, $sheetIndex, 0, 0, 0, 0, 0) |
746 | - . $name . $extra; |
|
746 | + . $name.$extra; |
|
747 | 747 | $length = strlen($data); |
748 | 748 | |
749 | 749 | $header = pack('vv', $record, $length); |
750 | 750 | |
751 | - return $header . $data; |
|
751 | + return $header.$data; |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | /** |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | $header = pack('vv', $record, $length); |
764 | 764 | $data = pack('v', $cv); |
765 | 765 | |
766 | - $this->append($header . $data); |
|
766 | + $this->append($header.$data); |
|
767 | 767 | } |
768 | 768 | |
769 | 769 | /** |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | |
793 | 793 | $header = pack('vv', $record, $length); |
794 | 794 | $data = pack('vvvvvvvvv', $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio); |
795 | - $this->append($header . $data); |
|
795 | + $this->append($header.$data); |
|
796 | 796 | } |
797 | 797 | |
798 | 798 | /** |
@@ -836,7 +836,7 @@ discard block |
||
836 | 836 | |
837 | 837 | $length = strlen($data); |
838 | 838 | $header = pack('vv', $record, $length); |
839 | - $this->append($header . $data); |
|
839 | + $this->append($header.$data); |
|
840 | 840 | } |
841 | 841 | |
842 | 842 | /** |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | $header = pack('vv', $record, $length); |
851 | 851 | $data = pack('vv', $this->spreadsheet->getSheetCount(), 0x0401); |
852 | 852 | |
853 | - return $this->writeData($header . $data); |
|
853 | + return $this->writeData($header.$data); |
|
854 | 854 | } |
855 | 855 | |
856 | 856 | /** |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $data .= $this->parser->references[$i]; |
871 | 871 | } |
872 | 872 | |
873 | - return $this->writeData($header . $data); |
|
873 | + return $this->writeData($header.$data); |
|
874 | 874 | } |
875 | 875 | |
876 | 876 | /** |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | |
888 | 888 | $header = pack('vv', $record, $length); |
889 | 889 | $data = pack('vCC', $ixfe, $BuiltIn, $iLevel); |
890 | - $this->append($header . $data); |
|
890 | + $this->append($header.$data); |
|
891 | 891 | } |
892 | 892 | |
893 | 893 | /** |
@@ -904,8 +904,8 @@ discard block |
||
904 | 904 | $length = 2 + strlen($numberFormatString); // Number of bytes to follow |
905 | 905 | |
906 | 906 | $header = pack('vv', $record, $length); |
907 | - $data = pack('v', $ifmt) . $numberFormatString; |
|
908 | - $this->append($header . $data); |
|
907 | + $data = pack('v', $ifmt).$numberFormatString; |
|
908 | + $this->append($header.$data); |
|
909 | 909 | } |
910 | 910 | |
911 | 911 | /** |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | |
923 | 923 | $header = pack('vv', $record, $length); |
924 | 924 | $data = pack('v', $f1904); |
925 | - $this->append($header . $data); |
|
925 | + $this->append($header.$data); |
|
926 | 926 | } |
927 | 927 | |
928 | 928 | /** |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | // using the same country code always for simplicity |
940 | 940 | $data = pack('vv', $this->countryCode, $this->countryCode); |
941 | 941 | |
942 | - return $this->writeData($header . $data); |
|
942 | + return $this->writeData($header.$data); |
|
943 | 943 | } |
944 | 944 | |
945 | 945 | /** |
@@ -957,7 +957,7 @@ discard block |
||
957 | 957 | // by inspection of real Excel files, MS Office Excel 2007 writes this |
958 | 958 | $data = pack('VV', 0x000001C1, 0x00001E667); |
959 | 959 | |
960 | - return $this->writeData($header . $data); |
|
960 | + return $this->writeData($header.$data); |
|
961 | 961 | } |
962 | 962 | |
963 | 963 | /** |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | } |
981 | 981 | |
982 | 982 | $header = pack('vvv', $record, $length, $ccv); |
983 | - $this->append($header . $data); |
|
983 | + $this->append($header.$data); |
|
984 | 984 | } |
985 | 985 | |
986 | 986 | /** |
@@ -1100,7 +1100,7 @@ discard block |
||
1100 | 1100 | $record = ($i == 0) ? 0x00FC : 0x003C; |
1101 | 1101 | |
1102 | 1102 | $header = pack('vv', $record, strlen($recordData)); |
1103 | - $data = $header . $recordData; |
|
1103 | + $data = $header.$recordData; |
|
1104 | 1104 | |
1105 | 1105 | $chunk .= $this->writeData($data); |
1106 | 1106 | } |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | $length = strlen($data); |
1123 | 1123 | $header = pack('vv', $record, $length); |
1124 | 1124 | |
1125 | - return $this->writeData($header . $data); |
|
1125 | + return $this->writeData($header.$data); |
|
1126 | 1126 | } |
1127 | 1127 | |
1128 | 1128 | return ''; |
@@ -102,7 +102,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -498,19 +498,19 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -240,7 +240,7 @@ |
||
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 | /** |
@@ -157,7 +157,7 @@ discard block |
||
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 |
||
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 |