@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | // URL |
491 | 491 | } else { |
492 | 492 | // external (local file) |
493 | - $url = 'external:'.$url; |
|
493 | + $url = 'external:' . $url; |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | $this->writeUrl($row - 1, \PhpOffice\PhpSpreadsheet\Cell::columnIndexFromString($column) - 1, $url); |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $xl_double = strrev($xl_double); |
637 | 637 | } |
638 | 638 | |
639 | - $this->append($header.$data.$xl_double); |
|
639 | + $this->append($header . $data . $xl_double); |
|
640 | 640 | |
641 | 641 | return 0; |
642 | 642 | } |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | |
679 | 679 | $header = pack('vv', $record, $length); |
680 | 680 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
681 | - $this->append($header.$data); |
|
681 | + $this->append($header . $data); |
|
682 | 682 | } |
683 | 683 | |
684 | 684 | /** |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | |
714 | 714 | $header = pack('vv', $record, $length); |
715 | 715 | $data = pack('vvvv', $row, $col, $xfIndex, $strlen); |
716 | - $this->append($header.$data.$str); |
|
716 | + $this->append($header . $data . $str); |
|
717 | 717 | |
718 | 718 | return $str_error; |
719 | 719 | } |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | |
749 | 749 | $header = pack('vv', $record, $length); |
750 | 750 | $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); |
751 | - $this->append($header.$data); |
|
751 | + $this->append($header . $data); |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | /** |
@@ -769,14 +769,14 @@ discard block |
||
769 | 769 | $length = 0x0006 + min($note_length, 2048); |
770 | 770 | $header = pack('vv', $record, $length); |
771 | 771 | $data = pack('vvv', $row, $col, $note_length); |
772 | - $this->append($header.$data.substr($note, 0, 2048)); |
|
772 | + $this->append($header . $data . substr($note, 0, 2048)); |
|
773 | 773 | |
774 | 774 | for ($i = $max_length; $i < $note_length; $i += $max_length) { |
775 | 775 | $chunk = substr($note, $i, $max_length); |
776 | 776 | $length = 0x0006 + strlen($chunk); |
777 | 777 | $header = pack('vv', $record, $length); |
778 | 778 | $data = pack('vvv', -1, 0, strlen($chunk)); |
779 | - $this->append($header.$data.$chunk); |
|
779 | + $this->append($header . $data . $chunk); |
|
780 | 780 | } |
781 | 781 | |
782 | 782 | return 0; |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | |
806 | 806 | $header = pack('vv', $record, $length); |
807 | 807 | $data = pack('vvv', $row, $col, $xfIndex); |
808 | - $this->append($header.$data); |
|
808 | + $this->append($header . $data); |
|
809 | 809 | |
810 | 810 | return 0; |
811 | 811 | } |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | |
827 | 827 | $header = pack('vv', $record, $length); |
828 | 828 | $data = pack('vvvCC', $row, $col, $xfIndex, $value, $isError); |
829 | - $this->append($header.$data); |
|
829 | + $this->append($header . $data); |
|
830 | 830 | |
831 | 831 | return 0; |
832 | 832 | } |
@@ -912,7 +912,7 @@ discard block |
||
912 | 912 | $data = pack('vvv', $row, $col, $xfIndex) |
913 | 913 | .$num |
914 | 914 | .pack('vVv', $grbit, $unknown, $formlen); |
915 | - $this->append($header.$data.$formula); |
|
915 | + $this->append($header . $data . $formula); |
|
916 | 916 | |
917 | 917 | // Append also a STRING record if necessary |
918 | 918 | if ($stringValue !== null) { |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | $length = strlen($data); |
939 | 939 | $header = pack('vv', $record, $length); |
940 | 940 | |
941 | - $this->append($header.$data); |
|
941 | + $this->append($header . $data); |
|
942 | 942 | } |
943 | 943 | |
944 | 944 | /** |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | |
1027 | 1027 | // Convert URL to a null terminated wchar string |
1028 | 1028 | $url = implode("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY)); |
1029 | - $url = $url."\0\0\0"; |
|
1029 | + $url = $url . "\0\0\0"; |
|
1030 | 1030 | |
1031 | 1031 | // Pack the length of the URL |
1032 | 1032 | $url_len = pack('V', strlen($url)); |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | $data = pack('vvvv', $row1, $row2, $col1, $col2); |
1040 | 1040 | |
1041 | 1041 | // Write the packed data |
1042 | - $this->append($header.$data.$unknown1.$options.$unknown2.$url_len.$url); |
|
1042 | + $this->append($header . $data . $unknown1 . $options . $unknown2 . $url_len . $url); |
|
1043 | 1043 | |
1044 | 1044 | return 0; |
1045 | 1045 | } |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | $data = pack('vvvv', $row1, $row2, $col1, $col2); |
1089 | 1089 | |
1090 | 1090 | // Write the packed data |
1091 | - $this->append($header.$data.$unknown1.$options.$url_len.$url); |
|
1091 | + $this->append($header . $data . $unknown1 . $options . $url_len . $url); |
|
1092 | 1092 | |
1093 | 1093 | return 0; |
1094 | 1094 | } |
@@ -1153,10 +1153,10 @@ discard block |
||
1153 | 1153 | $up_count = pack('v', $up_count); |
1154 | 1154 | |
1155 | 1155 | // Store the short dos dir name (null terminated) |
1156 | - $dir_short = preg_replace("/\.\.\\\/", '', $dir_long)."\0"; |
|
1156 | + $dir_short = preg_replace("/\.\.\\\/", '', $dir_long) . "\0"; |
|
1157 | 1157 | |
1158 | 1158 | // Store the long dir name as a wchar string (non-null terminated) |
1159 | - $dir_long = $dir_long."\0"; |
|
1159 | + $dir_long = $dir_long . "\0"; |
|
1160 | 1160 | |
1161 | 1161 | // Pack the lengths of the dir strings |
1162 | 1162 | $dir_short_len = pack('V', strlen($dir_short)); |
@@ -1170,14 +1170,14 @@ discard block |
||
1170 | 1170 | $unknown4 = pack('v', 0x03); |
1171 | 1171 | |
1172 | 1172 | // Pack the main data stream |
1173 | - $data = pack('vvvv', $row1, $row2, $col1, $col2). |
|
1174 | - $unknown1. |
|
1175 | - $link_type. |
|
1176 | - $unknown2. |
|
1177 | - $up_count. |
|
1178 | - $dir_short_len. |
|
1179 | - $dir_short. |
|
1180 | - $unknown3. |
|
1173 | + $data = pack('vvvv', $row1, $row2, $col1, $col2) . |
|
1174 | + $unknown1 . |
|
1175 | + $link_type . |
|
1176 | + $unknown2 . |
|
1177 | + $up_count . |
|
1178 | + $dir_short_len . |
|
1179 | + $dir_short . |
|
1180 | + $unknown3 . |
|
1181 | 1181 | $stream_len; /*. |
1182 | 1182 | $dir_long_len . |
1183 | 1183 | $unknown4 . |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | $header = pack('vv', $record, $length); |
1191 | 1191 | |
1192 | 1192 | // Write the packed data |
1193 | - $this->append($header.$data); |
|
1193 | + $this->append($header . $data); |
|
1194 | 1194 | |
1195 | 1195 | return 0; |
1196 | 1196 | } |
@@ -1248,7 +1248,7 @@ discard block |
||
1248 | 1248 | |
1249 | 1249 | $header = pack('vv', $record, $length); |
1250 | 1250 | $data = pack('vvvvvvvv', $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe); |
1251 | - $this->append($header.$data); |
|
1251 | + $this->append($header . $data); |
|
1252 | 1252 | } |
1253 | 1253 | |
1254 | 1254 | /** |
@@ -1262,7 +1262,7 @@ discard block |
||
1262 | 1262 | $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved |
1263 | 1263 | |
1264 | 1264 | $header = pack('vv', $record, $length); |
1265 | - $this->append($header.$data); |
|
1265 | + $this->append($header . $data); |
|
1266 | 1266 | } |
1267 | 1267 | |
1268 | 1268 | /** |
@@ -1315,7 +1315,7 @@ discard block |
||
1315 | 1315 | |
1316 | 1316 | $data .= pack('vvvvV', $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000); |
1317 | 1317 | |
1318 | - $this->append($header.$data); |
|
1318 | + $this->append($header . $data); |
|
1319 | 1319 | } |
1320 | 1320 | |
1321 | 1321 | /** |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | |
1338 | 1338 | $header = pack('vv', $record, $length); |
1339 | 1339 | $data = pack('vv', 1, $defaultRowHeight); |
1340 | - $this->append($header.$data); |
|
1340 | + $this->append($header . $data); |
|
1341 | 1341 | } |
1342 | 1342 | |
1343 | 1343 | /** |
@@ -1352,7 +1352,7 @@ discard block |
||
1352 | 1352 | |
1353 | 1353 | $header = pack('vv', $record, $length); |
1354 | 1354 | $data = pack('v', $defaultColWidth); |
1355 | - $this->append($header.$data); |
|
1355 | + $this->append($header . $data); |
|
1356 | 1356 | } |
1357 | 1357 | |
1358 | 1358 | /** |
@@ -1410,7 +1410,7 @@ discard block |
||
1410 | 1410 | |
1411 | 1411 | $header = pack('vv', $record, $length); |
1412 | 1412 | $data = pack('vvvvvv', $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved); |
1413 | - $this->append($header.$data); |
|
1413 | + $this->append($header . $data); |
|
1414 | 1414 | } |
1415 | 1415 | |
1416 | 1416 | /** |
@@ -1471,7 +1471,7 @@ discard block |
||
1471 | 1471 | |
1472 | 1472 | $header = pack('vv', $record, $length); |
1473 | 1473 | $data = pack('CvvvvvvCC', $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast); |
1474 | - $this->append($header.$data); |
|
1474 | + $this->append($header . $data); |
|
1475 | 1475 | } |
1476 | 1476 | |
1477 | 1477 | /** |
@@ -1516,10 +1516,10 @@ discard block |
||
1516 | 1516 | |
1517 | 1517 | // flush record if we have reached limit for number of merged cells, or reached final merged cell |
1518 | 1518 | if ($j == $maxCountMergeCellsPerRecord or $i == $countMergeCells) { |
1519 | - $recordData = pack('v', $j).$recordData; |
|
1519 | + $recordData = pack('v', $j) . $recordData; |
|
1520 | 1520 | $length = strlen($recordData); |
1521 | 1521 | $header = pack('vv', $record, $length); |
1522 | - $this->append($header.$recordData); |
|
1522 | + $this->append($header . $recordData); |
|
1523 | 1523 | |
1524 | 1524 | // initialize for next record, if any |
1525 | 1525 | $recordData = ''; |
@@ -1552,7 +1552,7 @@ discard block |
||
1552 | 1552 | |
1553 | 1553 | $record = 0x0862; // Record identifier |
1554 | 1554 | $header = pack('vv', $record, $length); |
1555 | - $this->append($header.$recordData); |
|
1555 | + $this->append($header . $recordData); |
|
1556 | 1556 | } |
1557 | 1557 | |
1558 | 1558 | /** |
@@ -1596,7 +1596,7 @@ discard block |
||
1596 | 1596 | $length = strlen($recordData); |
1597 | 1597 | $header = pack('vv', $record, $length); |
1598 | 1598 | |
1599 | - $this->append($header.$recordData); |
|
1599 | + $this->append($header . $recordData); |
|
1600 | 1600 | } |
1601 | 1601 | |
1602 | 1602 | /** |
@@ -1637,13 +1637,13 @@ discard block |
||
1637 | 1637 | hexdec($password) |
1638 | 1638 | ); |
1639 | 1639 | |
1640 | - $recordData .= \PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong('p'.md5($recordData)); |
|
1640 | + $recordData .= \PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeLong('p' . md5($recordData)); |
|
1641 | 1641 | |
1642 | 1642 | $length = strlen($recordData); |
1643 | 1643 | |
1644 | 1644 | $record = 0x0868; // Record identifier |
1645 | 1645 | $header = pack('vv', $record, $length); |
1646 | - $this->append($header.$recordData); |
|
1646 | + $this->append($header . $recordData); |
|
1647 | 1647 | } |
1648 | 1648 | } |
1649 | 1649 | |
@@ -1666,7 +1666,7 @@ discard block |
||
1666 | 1666 | |
1667 | 1667 | $header = pack('vv', $record, $length); |
1668 | 1668 | $data = pack('v', $count); |
1669 | - $this->append($header.$data); |
|
1669 | + $this->append($header . $data); |
|
1670 | 1670 | } |
1671 | 1671 | |
1672 | 1672 | /** |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | |
1698 | 1698 | $header = pack('vv', $record, $length); |
1699 | 1699 | $data = pack('CC', $cch, $rgch); |
1700 | - $this->append($header.$data.$sheetname); |
|
1700 | + $this->append($header . $data . $sheetname); |
|
1701 | 1701 | } |
1702 | 1702 | |
1703 | 1703 | /** |
@@ -1779,7 +1779,7 @@ discard block |
||
1779 | 1779 | |
1780 | 1780 | $header = pack('vv', $record, $length); |
1781 | 1781 | $data = pack('vvvvv', $x, $y, $rwTop, $colLeft, $pnnAct); |
1782 | - $this->append($header.$data); |
|
1782 | + $this->append($header . $data); |
|
1783 | 1783 | } |
1784 | 1784 | |
1785 | 1785 | /** |
@@ -1838,9 +1838,9 @@ discard block |
||
1838 | 1838 | |
1839 | 1839 | $header = pack('vv', $record, $length); |
1840 | 1840 | $data1 = pack('vvvvvvvv', $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes); |
1841 | - $data2 = $numHdr.$numFtr; |
|
1841 | + $data2 = $numHdr . $numFtr; |
|
1842 | 1842 | $data3 = pack('v', $iCopies); |
1843 | - $this->append($header.$data1.$data2.$data3); |
|
1843 | + $this->append($header . $data1 . $data2 . $data3); |
|
1844 | 1844 | } |
1845 | 1845 | |
1846 | 1846 | /** |
@@ -1864,7 +1864,7 @@ discard block |
||
1864 | 1864 | |
1865 | 1865 | $header = pack('vv', $record, $length); |
1866 | 1866 | |
1867 | - $this->append($header.$recordData); |
|
1867 | + $this->append($header . $recordData); |
|
1868 | 1868 | } |
1869 | 1869 | |
1870 | 1870 | /** |
@@ -1888,7 +1888,7 @@ discard block |
||
1888 | 1888 | |
1889 | 1889 | $header = pack('vv', $record, $length); |
1890 | 1890 | |
1891 | - $this->append($header.$recordData); |
|
1891 | + $this->append($header . $recordData); |
|
1892 | 1892 | } |
1893 | 1893 | |
1894 | 1894 | /** |
@@ -1904,7 +1904,7 @@ discard block |
||
1904 | 1904 | $header = pack('vv', $record, $length); |
1905 | 1905 | $data = pack('v', $fHCenter); |
1906 | 1906 | |
1907 | - $this->append($header.$data); |
|
1907 | + $this->append($header . $data); |
|
1908 | 1908 | } |
1909 | 1909 | |
1910 | 1910 | /** |
@@ -1919,7 +1919,7 @@ discard block |
||
1919 | 1919 | |
1920 | 1920 | $header = pack('vv', $record, $length); |
1921 | 1921 | $data = pack('v', $fVCenter); |
1922 | - $this->append($header.$data); |
|
1922 | + $this->append($header . $data); |
|
1923 | 1923 | } |
1924 | 1924 | |
1925 | 1925 | /** |
@@ -1938,7 +1938,7 @@ discard block |
||
1938 | 1938 | $data = strrev($data); |
1939 | 1939 | } |
1940 | 1940 | |
1941 | - $this->append($header.$data); |
|
1941 | + $this->append($header . $data); |
|
1942 | 1942 | } |
1943 | 1943 | |
1944 | 1944 | /** |
@@ -1957,7 +1957,7 @@ discard block |
||
1957 | 1957 | $data = strrev($data); |
1958 | 1958 | } |
1959 | 1959 | |
1960 | - $this->append($header.$data); |
|
1960 | + $this->append($header . $data); |
|
1961 | 1961 | } |
1962 | 1962 | |
1963 | 1963 | /** |
@@ -1976,7 +1976,7 @@ discard block |
||
1976 | 1976 | $data = strrev($data); |
1977 | 1977 | } |
1978 | 1978 | |
1979 | - $this->append($header.$data); |
|
1979 | + $this->append($header . $data); |
|
1980 | 1980 | } |
1981 | 1981 | |
1982 | 1982 | /** |
@@ -1995,7 +1995,7 @@ discard block |
||
1995 | 1995 | $data = strrev($data); |
1996 | 1996 | } |
1997 | 1997 | |
1998 | - $this->append($header.$data); |
|
1998 | + $this->append($header . $data); |
|
1999 | 1999 | } |
2000 | 2000 | |
2001 | 2001 | /** |
@@ -2010,7 +2010,7 @@ discard block |
||
2010 | 2010 | |
2011 | 2011 | $header = pack('vv', $record, $length); |
2012 | 2012 | $data = pack('v', $fPrintRwCol); |
2013 | - $this->append($header.$data); |
|
2013 | + $this->append($header . $data); |
|
2014 | 2014 | } |
2015 | 2015 | |
2016 | 2016 | /** |
@@ -2026,7 +2026,7 @@ discard block |
||
2026 | 2026 | |
2027 | 2027 | $header = pack('vv', $record, $length); |
2028 | 2028 | $data = pack('v', $fPrintGrid); |
2029 | - $this->append($header.$data); |
|
2029 | + $this->append($header . $data); |
|
2030 | 2030 | } |
2031 | 2031 | |
2032 | 2032 | /** |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | |
2043 | 2043 | $header = pack('vv', $record, $length); |
2044 | 2044 | $data = pack('v', $fGridSet); |
2045 | - $this->append($header.$data); |
|
2045 | + $this->append($header . $data); |
|
2046 | 2046 | } |
2047 | 2047 | |
2048 | 2048 | /** |
@@ -2058,7 +2058,7 @@ discard block |
||
2058 | 2058 | |
2059 | 2059 | $header = pack('vv', $record, $length); |
2060 | 2060 | $data = pack('v', $iNumFilters); |
2061 | - $this->append($header.$data); |
|
2061 | + $this->append($header . $data); |
|
2062 | 2062 | } |
2063 | 2063 | |
2064 | 2064 | /** |
@@ -2105,7 +2105,7 @@ discard block |
||
2105 | 2105 | $header = pack('vv', $record, $length); |
2106 | 2106 | $data = pack('vvvv', $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level); |
2107 | 2107 | |
2108 | - $this->append($header.$data); |
|
2108 | + $this->append($header . $data); |
|
2109 | 2109 | } |
2110 | 2110 | |
2111 | 2111 | /** |
@@ -2141,7 +2141,7 @@ discard block |
||
2141 | 2141 | |
2142 | 2142 | $header = pack('vv', $record, $length); |
2143 | 2143 | $data = pack('v', $grbit); |
2144 | - $this->append($header.$data); |
|
2144 | + $this->append($header . $data); |
|
2145 | 2145 | } |
2146 | 2146 | |
2147 | 2147 | /** |
@@ -2194,7 +2194,7 @@ discard block |
||
2194 | 2194 | $data .= pack('vvv', $hbreak, 0x0000, 0x00ff); |
2195 | 2195 | } |
2196 | 2196 | |
2197 | - $this->append($header.$data); |
|
2197 | + $this->append($header . $data); |
|
2198 | 2198 | } |
2199 | 2199 | |
2200 | 2200 | // vertical page breaks |
@@ -2221,7 +2221,7 @@ discard block |
||
2221 | 2221 | $data .= pack('vvv', $vbreak, 0x0000, 0xffff); |
2222 | 2222 | } |
2223 | 2223 | |
2224 | - $this->append($header.$data); |
|
2224 | + $this->append($header . $data); |
|
2225 | 2225 | } |
2226 | 2226 | } |
2227 | 2227 | |
@@ -2243,7 +2243,7 @@ discard block |
||
2243 | 2243 | $header = pack('vv', $record, $length); |
2244 | 2244 | $data = pack('v', $fLock); |
2245 | 2245 | |
2246 | - $this->append($header.$data); |
|
2246 | + $this->append($header . $data); |
|
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | /** |
@@ -2267,7 +2267,7 @@ discard block |
||
2267 | 2267 | $header = pack('vv', $record, $length); |
2268 | 2268 | $data = pack('v', 1); |
2269 | 2269 | |
2270 | - $this->append($header.$data); |
|
2270 | + $this->append($header . $data); |
|
2271 | 2271 | } |
2272 | 2272 | |
2273 | 2273 | /** |
@@ -2291,7 +2291,7 @@ discard block |
||
2291 | 2291 | $header = pack('vv', $record, $length); |
2292 | 2292 | $data = pack('v', 1); |
2293 | 2293 | |
2294 | - $this->append($header.$data); |
|
2294 | + $this->append($header . $data); |
|
2295 | 2295 | } |
2296 | 2296 | |
2297 | 2297 | /** |
@@ -2312,7 +2312,7 @@ discard block |
||
2312 | 2312 | $header = pack('vv', $record, $length); |
2313 | 2313 | $data = pack('v', $wPassword); |
2314 | 2314 | |
2315 | - $this->append($header.$data); |
|
2315 | + $this->append($header . $data); |
|
2316 | 2316 | } |
2317 | 2317 | |
2318 | 2318 | /** |
@@ -2346,7 +2346,7 @@ discard block |
||
2346 | 2346 | $lcb = $size; |
2347 | 2347 | |
2348 | 2348 | $header = pack('vvvvV', $record, $length, $cf, $env, $lcb); |
2349 | - $this->append($header.$data); |
|
2349 | + $this->append($header . $data); |
|
2350 | 2350 | } |
2351 | 2351 | |
2352 | 2352 | /** |
@@ -2528,7 +2528,7 @@ discard block |
||
2528 | 2528 | $data .= pack('v', $grbit2); |
2529 | 2529 | $data .= pack('V', $Reserved5); |
2530 | 2530 | |
2531 | - $this->append($header.$data); |
|
2531 | + $this->append($header . $data); |
|
2532 | 2532 | } |
2533 | 2533 | |
2534 | 2534 | /** |
@@ -2550,7 +2550,7 @@ discard block |
||
2550 | 2550 | foreach (['red', 'green', 'blue'] as $key) { |
2551 | 2551 | $color[$key] = $color[$key] + round((255 - $color[$key]) * $color['alpha'] / 127); |
2552 | 2552 | } |
2553 | - $data .= chr($color['blue']).chr($color['green']).chr($color['red']); |
|
2553 | + $data .= chr($color['blue']) . chr($color['green']) . chr($color['red']); |
|
2554 | 2554 | } |
2555 | 2555 | if (3 * $width % 4) { |
2556 | 2556 | $data .= str_repeat("\x00", 4 - 3 * $width % 4); |
@@ -2641,7 +2641,7 @@ discard block |
||
2641 | 2641 | |
2642 | 2642 | // Add the BITMAPCOREHEADER data |
2643 | 2643 | $header = pack('Vvvvv', 0x000c, $width, $height, 0x01, 0x18); |
2644 | - $data = $header.$data; |
|
2644 | + $data = $header . $data; |
|
2645 | 2645 | |
2646 | 2646 | return [$width, $height, $size, $data]; |
2647 | 2647 | } |
@@ -2662,7 +2662,7 @@ discard block |
||
2662 | 2662 | |
2663 | 2663 | $header = pack('vv', $record, $length); |
2664 | 2664 | $data = pack('vv', $this->phpSheet->getSheetView()->getZoomScale(), 100); |
2665 | - $this->append($header.$data); |
|
2665 | + $this->append($header . $data); |
|
2666 | 2666 | } |
2667 | 2667 | |
2668 | 2668 | /** |
@@ -2711,7 +2711,7 @@ discard block |
||
2711 | 2711 | $length = strlen($dataChunk); |
2712 | 2712 | $header = pack('vv', $record, $length); |
2713 | 2713 | |
2714 | - $this->append($header.$dataChunk); |
|
2714 | + $this->append($header . $dataChunk); |
|
2715 | 2715 | |
2716 | 2716 | // OBJ record |
2717 | 2717 | $record = 0x005D; // record identifier |
@@ -2765,7 +2765,7 @@ discard block |
||
2765 | 2765 | |
2766 | 2766 | $length = strlen($objData); |
2767 | 2767 | $header = pack('vv', $record, $length); |
2768 | - $this->append($header.$objData); |
|
2768 | + $this->append($header . $objData); |
|
2769 | 2769 | } |
2770 | 2770 | } |
2771 | 2771 | } |
@@ -2791,7 +2791,7 @@ discard block |
||
2791 | 2791 | |
2792 | 2792 | $header = pack('vv', $record, $length); |
2793 | 2793 | $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection)); |
2794 | - $this->append($header.$data); |
|
2794 | + $this->append($header . $data); |
|
2795 | 2795 | |
2796 | 2796 | // DATAVALIDATION records |
2797 | 2797 | $record = 0x01BE; // Record identifier |
@@ -2956,7 +2956,7 @@ discard block |
||
2956 | 2956 | $length = strlen($data); |
2957 | 2957 | $header = pack('vv', $record, $length); |
2958 | 2958 | |
2959 | - $this->append($header.$data); |
|
2959 | + $this->append($header . $data); |
|
2960 | 2960 | } |
2961 | 2961 | } |
2962 | 2962 | } |
@@ -3018,7 +3018,7 @@ discard block |
||
3018 | 3018 | |
3019 | 3019 | $header = pack('vv', $record, $length); |
3020 | 3020 | $data = pack('vvVVvv', $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit); |
3021 | - $this->append($header.$data); |
|
3021 | + $this->append($header . $data); |
|
3022 | 3022 | } |
3023 | 3023 | |
3024 | 3024 | /** |
@@ -4196,7 +4196,7 @@ discard block |
||
4196 | 4196 | $data .= $operand2; |
4197 | 4197 | } |
4198 | 4198 | $header = pack('vv', $record, strlen($data)); |
4199 | - $this->append($header.$data); |
|
4199 | + $this->append($header . $data); |
|
4200 | 4200 | } |
4201 | 4201 | |
4202 | 4202 | /** |
@@ -4247,6 +4247,6 @@ discard block |
||
4247 | 4247 | $data .= $cellRange; |
4248 | 4248 | $data .= pack('v', 0x0001); |
4249 | 4249 | $data .= $cellRange; |
4250 | - $this->append($header.$data); |
|
4250 | + $this->append($header . $data); |
|
4251 | 4251 | } |
4252 | 4252 | } |
@@ -519,19 +519,19 @@ discard block |
||
519 | 519 | } elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) { |
520 | 520 | return $this->convertRef2d($token); |
521 | 521 | // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1 |
522 | - } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) { |
|
522 | + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) { |
|
523 | 523 | return $this->convertRef3d($token); |
524 | 524 | // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1 |
525 | - } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) { |
|
525 | + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) { |
|
526 | 526 | return $this->convertRef3d($token); |
527 | 527 | // match ranges like A1:B2 or $A$1:$B$2 |
528 | 528 | } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)\:(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $token)) { |
529 | 529 | return $this->convertRange2d($token); |
530 | 530 | // 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 |
531 | - } 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)) { |
|
531 | + } 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)) { |
|
532 | 532 | return $this->convertRange3d($token); |
533 | 533 | // 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 |
534 | - } 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)) { |
|
534 | + } 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)) { |
|
535 | 535 | return $this->convertRange3d($token); |
536 | 536 | // operators (including parentheses) |
537 | 537 | } elseif (isset($this->ptg[$token])) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException('String is too long'); |
588 | 588 | } |
589 | 589 | |
590 | - return pack('C', $this->ptg['ptgStr']).\PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeShort($string); |
|
590 | + return pack('C', $this->ptg['ptgStr']) . \PhpOffice\PhpSpreadsheet\Shared\StringHelper::UTF8toBIFF8UnicodeShort($string); |
|
591 | 591 | } |
592 | 592 | |
593 | 593 | /** |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException("Unknown class $class"); |
648 | 648 | } |
649 | 649 | |
650 | - return $ptgArea.$row1.$row2.$col1.$col2; |
|
650 | + return $ptgArea . $row1 . $row2 . $col1 . $col2; |
|
651 | 651 | } |
652 | 652 | |
653 | 653 | /** |
@@ -674,13 +674,13 @@ discard block |
||
674 | 674 | list($row1, $col1) = $this->cellToPackedRowcol($cell1); |
675 | 675 | list($row2, $col2) = $this->cellToPackedRowcol($cell2); |
676 | 676 | } else { // It's a rows range (like 26:27) |
677 | - list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1.':'.$cell2); |
|
677 | + list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1 . ':' . $cell2); |
|
678 | 678 | } |
679 | 679 | |
680 | 680 | // The ptg value depends on the class of the ptg. |
681 | 681 | $ptgArea = pack('C', $this->ptg['ptgArea3d']); |
682 | 682 | |
683 | - return $ptgArea.$ext_ref.$row1.$row2.$col1.$col2; |
|
683 | + return $ptgArea . $ext_ref . $row1 . $row2 . $col1 . $col2; |
|
684 | 684 | } |
685 | 685 | |
686 | 686 | /** |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | // The ptg value depends on the class of the ptg. |
700 | 700 | $ptgRef = pack('C', $this->ptg['ptgRefA']); |
701 | 701 | |
702 | - return $ptgRef.$row.$col; |
|
702 | + return $ptgRef . $row . $col; |
|
703 | 703 | } |
704 | 704 | |
705 | 705 | /** |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | // The ptg value depends on the class of the ptg. |
725 | 725 | $ptgRef = pack('C', $this->ptg['ptgRef3dA']); |
726 | 726 | |
727 | - return $ptgRef.$ext_ref.$row.$col; |
|
727 | + return $ptgRef . $ext_ref . $row . $col; |
|
728 | 728 | } |
729 | 729 | |
730 | 730 | /** |
@@ -1086,22 +1086,22 @@ discard block |
||
1086 | 1086 | // if it's a reference A1 or $A$1 or $A1 or A$1 |
1087 | 1087 | if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/', $token) and !preg_match('/[0-9]/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.') and ($this->lookAhead != '!')) { |
1088 | 1088 | return $token; |
1089 | - } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { |
|
1089 | + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { |
|
1090 | 1090 | // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) |
1091 | 1091 | return $token; |
1092 | - } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { |
|
1092 | + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { |
|
1093 | 1093 | // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) |
1094 | 1094 | return $token; |
1095 | 1095 | } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $token) && !preg_match('/[0-9]/', $this->lookAhead)) { |
1096 | 1096 | // if it's a range A1:A2 or $A$1:$A$2 |
1097 | 1097 | return $token; |
1098 | - } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead)) { |
|
1098 | + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead)) { |
|
1099 | 1099 | // 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 |
1100 | 1100 | return $token; |
1101 | - } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead)) { |
|
1101 | + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and !preg_match('/[0-9]/', $this->lookAhead)) { |
|
1102 | 1102 | // 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 |
1103 | 1103 | return $token; |
1104 | - } elseif (is_numeric($token) and (!is_numeric($token.$this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead != '!') and ($this->lookAhead != ':')) { |
|
1104 | + } elseif (is_numeric($token) and (!is_numeric($token . $this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead != '!') and ($this->lookAhead != ':')) { |
|
1105 | 1105 | // If it's a number (check that it's not a sheet name or range) |
1106 | 1106 | return $token; |
1107 | 1107 | } elseif (preg_match('/"([^"]|""){0,255}"/', $token) and $this->lookAhead != '"' and (substr_count($token, '"') % 2 == 0)) { |
@@ -1320,13 +1320,13 @@ discard block |
||
1320 | 1320 | $this->advance(); |
1321 | 1321 | |
1322 | 1322 | return $result; |
1323 | - } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->currentToken)) { |
|
1323 | + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->currentToken)) { |
|
1324 | 1324 | // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) |
1325 | 1325 | $result = $this->createTree($this->currentToken, '', ''); |
1326 | 1326 | $this->advance(); |
1327 | 1327 | |
1328 | 1328 | return $result; |
1329 | - } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->currentToken)) { |
|
1329 | + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->currentToken)) { |
|
1330 | 1330 | // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) |
1331 | 1331 | $result = $this->createTree($this->currentToken, '', ''); |
1332 | 1332 | $this->advance(); |
@@ -1340,14 +1340,14 @@ discard block |
||
1340 | 1340 | $this->advance(); |
1341 | 1341 | |
1342 | 1342 | return $result; |
1343 | - } elseif (preg_match('/^'.self::REGEX_SHEET_TITLE_UNQUOTED."(\:".self::REGEX_SHEET_TITLE_UNQUOTED.")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->currentToken)) { |
|
1343 | + } elseif (preg_match('/^' . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->currentToken)) { |
|
1344 | 1344 | // 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) |
1345 | 1345 | // must be an error? |
1346 | 1346 | $result = $this->createTree($this->currentToken, '', ''); |
1347 | 1347 | $this->advance(); |
1348 | 1348 | |
1349 | 1349 | return $result; |
1350 | - } elseif (preg_match("/^'".self::REGEX_SHEET_TITLE_QUOTED."(\:".self::REGEX_SHEET_TITLE_QUOTED.")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->currentToken)) { |
|
1350 | + } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->currentToken)) { |
|
1351 | 1351 | // 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) |
1352 | 1352 | // must be an error? |
1353 | 1353 | $result = $this->createTree($this->currentToken, '', ''); |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | |
1372 | 1372 | return $result; |
1373 | 1373 | } |
1374 | - throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException('Syntax error: '.$this->currentToken.', lookahead: '.$this->lookAhead.', current char: '.$this->currentCharacter); |
|
1374 | + throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException('Syntax error: ' . $this->currentToken . ', lookahead: ' . $this->lookAhead . ', current char: ' . $this->currentCharacter); |
|
1375 | 1375 | } |
1376 | 1376 | |
1377 | 1377 | /** |
@@ -1492,7 +1492,7 @@ discard block |
||
1492 | 1492 | $left_tree = ''; |
1493 | 1493 | } |
1494 | 1494 | // add it's left subtree and return. |
1495 | - return $left_tree.$this->convertFunction($tree['value'], $tree['right']); |
|
1495 | + return $left_tree . $this->convertFunction($tree['value'], $tree['right']); |
|
1496 | 1496 | } else { |
1497 | 1497 | $converted_tree = $this->convert($tree['value']); |
1498 | 1498 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | $header = pack('vvV', $recVerInstance, $recType, strlen($dggData)); |
119 | - $innerData .= $header.$dggData; |
|
119 | + $innerData .= $header . $dggData; |
|
120 | 120 | |
121 | 121 | // write the bstoreContainer |
122 | 122 | if ($bstoreContainer = $this->object->getBstoreContainer()) { |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | |
136 | 136 | $header = pack('vvV', $recVerInstance, $recType, $length); |
137 | 137 | |
138 | - $this->data = $header.$innerData; |
|
138 | + $this->data = $header . $innerData; |
|
139 | 139 | break; |
140 | 140 | case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer': |
141 | 141 | // this is a container record |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $header = pack('vvV', $recVerInstance, $recType, $length); |
164 | 164 | |
165 | - $this->data = $header.$innerData; |
|
165 | + $this->data = $header . $innerData; |
|
166 | 166 | break; |
167 | 167 | case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DggContainer\\BstoreContainer\\BSE': |
168 | 168 | // this is a semi-container record |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | |
293 | 293 | // number of shapes in this drawing (including group shape) |
294 | 294 | $countShapes = count($this->object->getSpgrContainer()->getChildren()); |
295 | - $innerData .= $header.pack('VV', $countShapes, $this->object->getLastSpId()); |
|
295 | + $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId()); |
|
296 | 296 | |
297 | 297 | // write the spgrContainer |
298 | 298 | if ($spgrContainer = $this->object->getSpgrContainer()) { |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | |
324 | 324 | $header = pack('vvV', $recVerInstance, $recType, $length); |
325 | 325 | |
326 | - $this->data = $header.$innerData; |
|
326 | + $this->data = $header . $innerData; |
|
327 | 327 | break; |
328 | 328 | case '\\PhpOffice\\PhpSpreadsheet\\Shared\\Escher\\DgContainer\\SpgrContainer': |
329 | 329 | // this is a container record |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | |
361 | 361 | $header = pack('vvV', $recVerInstance, $recType, $length); |
362 | 362 | |
363 | - $this->data = $header.$innerData; |
|
363 | + $this->data = $header . $innerData; |
|
364 | 364 | $this->spOffsets = $spOffsets; |
365 | 365 | $this->spTypes = $spTypes; |
366 | 366 | break; |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | |
383 | 383 | $header = pack('vvV', $recVerInstance, $recType, $length); |
384 | 384 | |
385 | - $data .= $header.pack('VVVV', 0, 0, 0, 0); |
|
385 | + $data .= $header . pack('VVVV', 0, 0, 0, 0); |
|
386 | 386 | } |
387 | 387 | $this->spTypes[] = ($this->object->getSpType()); |
388 | 388 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | $header = pack('vvV', $recVerInstance, $recType, $length); |
399 | 399 | |
400 | - $data .= $header.pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00); |
|
400 | + $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00); |
|
401 | 401 | |
402 | 402 | // the options |
403 | 403 | if ($this->object->getOPTCollection()) { |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $recVerInstance |= $recInstance << 4; |
416 | 416 | |
417 | 417 | $header = pack('vvV', $recVerInstance, $recType, $length); |
418 | - $data .= $header.$optData; |
|
418 | + $data .= $header . $optData; |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | // the client anchor |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | $recVerInstance |= $recInstance << 4; |
457 | 457 | |
458 | 458 | $header = pack('vvV', $recVerInstance, $recType, $length); |
459 | - $data .= $header.$clientAnchorData; |
|
459 | + $data .= $header . $clientAnchorData; |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | // the client data, just empty for now |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $recVerInstance |= $recInstance << 4; |
474 | 474 | |
475 | 475 | $header = pack('vvV', $recVerInstance, $recType, $length); |
476 | - $data .= $header.$clientDataData; |
|
476 | + $data .= $header . $clientDataData; |
|
477 | 477 | } |
478 | 478 | |
479 | 479 | // write the record |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | |
488 | 488 | $header = pack('vvV', $recVerInstance, $recType, $length); |
489 | 489 | |
490 | - $this->data = $header.$data; |
|
490 | + $this->data = $header . $data; |
|
491 | 491 | break; |
492 | 492 | } |
493 | 493 |
@@ -258,7 +258,7 @@ |
||
258 | 258 | $data .= pack('CCC', self::mapTextRotation($this->_style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib); |
259 | 259 | $data .= pack('VVv', $border1, $border2, $icv); |
260 | 260 | |
261 | - return $header.$data; |
|
261 | + return $header . $data; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | /** |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $bFamily = 0; // Font family |
85 | 85 | $bCharSet = \PhpOffice\PhpSpreadsheet\Shared\Font::getCharsetFromFontName($this->font->getName()); // Character set |
86 | 86 | |
87 | - $record = 0x31; // Record identifier |
|
88 | - $reserved = 0x00; // Reserved |
|
89 | - $grbit = 0x00; // Font attributes |
|
87 | + $record = 0x31; // Record identifier |
|
88 | + $reserved = 0x00; // Reserved |
|
89 | + $grbit = 0x00; // Font attributes |
|
90 | 90 | if ($this->font->getItalic()) { |
91 | 91 | $grbit |= 0x02; |
92 | 92 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $length = strlen($data); |
122 | 122 | $header = pack('vv', $record, $length); |
123 | 123 | |
124 | - return $header.$data; |
|
124 | + return $header . $data; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | private static function mapBold($bold) |
135 | 135 | { |
136 | 136 | if ($bold) { |
137 | - return 0x2BC; // 700 = Bold font weight |
|
137 | + return 0x2BC; // 700 = Bold font weight |
|
138 | 138 | } |
139 | 139 | |
140 | - return 0x190; // 400 = Normal font weight |
|
140 | + return 0x190; // 400 = Normal font weight |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | if ($sheetState != 'visible' && $sheetState != '') { |
254 | 254 | $objWriter->writeAttribute('state', $sheetState); |
255 | 255 | } |
256 | - $objWriter->writeAttribute('r:id', 'rId'.$pRelId); |
|
256 | + $objWriter->writeAttribute('r:id', 'rId' . $pRelId); |
|
257 | 257 | $objWriter->endElement(); |
258 | 258 | } else { |
259 | 259 | throw new \PhpOffice\PhpSpreadsheet\Writer\WriteException('Invalid parameters passed.'); |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | // Create absolute coordinate and write as raw text |
333 | 333 | $range = \PhpOffice\PhpSpreadsheet\Cell::splitRange($pNamedRange->getRange()); |
334 | 334 | for ($i = 0; $i < count($range); ++$i) { |
335 | - $range[$i][0] = '\''.str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()).'\'!'.\PhpOffice\PhpSpreadsheet\Cell::absoluteReference($range[$i][0]); |
|
335 | + $range[$i][0] = '\'' . str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()) . '\'!' . \PhpOffice\PhpSpreadsheet\Cell::absoluteReference($range[$i][0]); |
|
336 | 336 | if (isset($range[$i][1])) { |
337 | 337 | $range[$i][1] = \PhpOffice\PhpSpreadsheet\Cell::absoluteReference($range[$i][1]); |
338 | 338 | } |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | $range[1] = \PhpOffice\PhpSpreadsheet\Cell::absoluteCoordinate($range[1]); |
376 | 376 | $range = implode(':', $range); |
377 | 377 | |
378 | - $objWriter->writeRawData('\''.str_replace("'", "''", $pSheet->getTitle()).'\'!'.$range); |
|
378 | + $objWriter->writeRawData('\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . $range); |
|
379 | 379 | |
380 | 380 | $objWriter->endElement(); |
381 | 381 | } |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { |
406 | 406 | $repeat = $pSheet->getPageSetup()->getColumnsToRepeatAtLeft(); |
407 | 407 | |
408 | - $settingString .= '\''.str_replace("'", "''", $pSheet->getTitle()).'\'!$'.$repeat[0].':$'.$repeat[1]; |
|
408 | + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | // Rows to repeat |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | |
417 | 417 | $repeat = $pSheet->getPageSetup()->getRowsToRepeatAtTop(); |
418 | 418 | |
419 | - $settingString .= '\''.str_replace("'", "''", $pSheet->getTitle()).'\'!$'.$repeat[0].':$'.$repeat[1]; |
|
419 | + $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; |
|
420 | 420 | } |
421 | 421 | |
422 | 422 | $objWriter->writeRawData($settingString); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | foreach ($printArea as $printAreaRect) { |
453 | 453 | $printAreaRect[0] = \PhpOffice\PhpSpreadsheet\Cell::absoluteReference($printAreaRect[0]); |
454 | 454 | $printAreaRect[1] = \PhpOffice\PhpSpreadsheet\Cell::absoluteReference($printAreaRect[1]); |
455 | - $chunks[] = '\''.str_replace("'", "''", $pSheet->getTitle()).'\'!'.implode(':', $printAreaRect); |
|
455 | + $chunks[] = '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . implode(':', $printAreaRect); |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | $objWriter->writeRawData(implode(',', $chunks)); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; |
247 | 247 | $plotGroupingType = ''; |
248 | 248 | foreach ($chartTypes as $chartType) { |
249 | - $objWriter->startElement('c:'.$chartType); |
|
249 | + $objWriter->startElement('c:' . $chartType); |
|
250 | 250 | |
251 | 251 | $groupCount = $plotArea->getPlotGroupCount(); |
252 | 252 | for ($i = 0; $i < $groupCount; ++$i) { |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | |
848 | 848 | if (!is_null($xAxis->getFillProperty('value'))) { |
849 | 849 | $objWriter->startElement('a:solidFill'); |
850 | - $objWriter->startElement('a:'.$xAxis->getFillProperty('type')); |
|
850 | + $objWriter->startElement('a:' . $xAxis->getFillProperty('type')); |
|
851 | 851 | $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); |
852 | 852 | $objWriter->startElement('a:alpha'); |
853 | 853 | $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | |
865 | 865 | if (!is_null($xAxis->getLineProperty('value'))) { |
866 | 866 | $objWriter->startElement('a:solidFill'); |
867 | - $objWriter->startElement('a:'.$xAxis->getLineProperty('type')); |
|
867 | + $objWriter->startElement('a:' . $xAxis->getLineProperty('type')); |
|
868 | 868 | $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); |
869 | 869 | $objWriter->startElement('a:alpha'); |
870 | 870 | $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); |
@@ -1304,13 +1304,13 @@ discard block |
||
1304 | 1304 | |
1305 | 1305 | $objWriter->endElement(); |
1306 | 1306 | } else { |
1307 | - $objWriter->startElement('c:'.$dataType.'Ref'); |
|
1307 | + $objWriter->startElement('c:' . $dataType . 'Ref'); |
|
1308 | 1308 | |
1309 | 1309 | $objWriter->startElement('c:f'); |
1310 | 1310 | $objWriter->writeRawData($plotSeriesValues->getDataSource()); |
1311 | 1311 | $objWriter->endElement(); |
1312 | 1312 | |
1313 | - $objWriter->startElement('c:'.$dataType.'Cache'); |
|
1313 | + $objWriter->startElement('c:' . $dataType . 'Cache'); |
|
1314 | 1314 | |
1315 | 1315 | if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) { |
1316 | 1316 | if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $objWriter, |
161 | 161 | ($i + 1 + 3), |
162 | 162 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', |
163 | - 'worksheets/sheet'.($i + 1).'.xml' |
|
163 | + 'worksheets/sheet' . ($i + 1) . '.xml' |
|
164 | 164 | ); |
165 | 165 | } |
166 | 166 | // Relationships for vbaProject if needed |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $objWriter, |
226 | 226 | ++$d, |
227 | 227 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', |
228 | - '../drawings/drawing'.$pWorksheetId.'.xml' |
|
228 | + '../drawings/drawing' . $pWorksheetId . '.xml' |
|
229 | 229 | ); |
230 | 230 | } |
231 | 231 | |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | if (!$hyperlink->isInternal()) { |
236 | 236 | $this->writeRelationship( |
237 | 237 | $objWriter, |
238 | - '_hyperlink_'.$i, |
|
238 | + '_hyperlink_' . $i, |
|
239 | 239 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', |
240 | 240 | $hyperlink->getUrl(), |
241 | 241 | 'External' |
@@ -250,16 +250,16 @@ discard block |
||
250 | 250 | if (count($pWorksheet->getComments()) > 0) { |
251 | 251 | $this->writeRelationship( |
252 | 252 | $objWriter, |
253 | - '_comments_vml'.$i, |
|
253 | + '_comments_vml' . $i, |
|
254 | 254 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', |
255 | - '../drawings/vmlDrawing'.$pWorksheetId.'.vml' |
|
255 | + '../drawings/vmlDrawing' . $pWorksheetId . '.vml' |
|
256 | 256 | ); |
257 | 257 | |
258 | 258 | $this->writeRelationship( |
259 | 259 | $objWriter, |
260 | - '_comments'.$i, |
|
260 | + '_comments' . $i, |
|
261 | 261 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments', |
262 | - '../comments'.$pWorksheetId.'.xml' |
|
262 | + '../comments' . $pWorksheetId . '.xml' |
|
263 | 263 | ); |
264 | 264 | } |
265 | 265 | |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) { |
269 | 269 | $this->writeRelationship( |
270 | 270 | $objWriter, |
271 | - '_headerfooter_vml'.$i, |
|
271 | + '_headerfooter_vml' . $i, |
|
272 | 272 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', |
273 | - '../drawings/vmlDrawingHF'.$pWorksheetId.'.vml' |
|
273 | + '../drawings/vmlDrawingHF' . $pWorksheetId . '.vml' |
|
274 | 274 | ); |
275 | 275 | } |
276 | 276 | |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $objWriter, |
319 | 319 | $i, |
320 | 320 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', |
321 | - '../media/'.str_replace(' ', '', $iterator->current()->getIndexedFilename()) |
|
321 | + '../media/' . str_replace(' ', '', $iterator->current()->getIndexedFilename()) |
|
322 | 322 | ); |
323 | 323 | } |
324 | 324 | |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | $objWriter, |
336 | 336 | $i++, |
337 | 337 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', |
338 | - '../charts/chart'.++$chartRef.'.xml' |
|
338 | + '../charts/chart' . ++$chartRef . '.xml' |
|
339 | 339 | ); |
340 | 340 | } |
341 | 341 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $objWriter, |
380 | 380 | $key, |
381 | 381 | 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', |
382 | - '../media/'.$value->getIndexedFilename() |
|
382 | + '../media/' . $value->getIndexedFilename() |
|
383 | 383 | ); |
384 | 384 | } |
385 | 385 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | if ($pType != '' && $pTarget != '') { |
405 | 405 | // Write relationship |
406 | 406 | $objWriter->startElement('Relationship'); |
407 | - $objWriter->writeAttribute('Id', 'rId'.$pId); |
|
407 | + $objWriter->writeAttribute('Id', 'rId' . $pId); |
|
408 | 408 | $objWriter->writeAttribute('Type', $pType); |
409 | 409 | $objWriter->writeAttribute('Target', $pTarget); |
410 | 410 |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $objWriter->writeAttribute('macro', ''); |
119 | 119 | $objWriter->startElement('xdr:nvGraphicFramePr'); |
120 | 120 | $objWriter->startElement('xdr:cNvPr'); |
121 | - $objWriter->writeAttribute('name', 'Chart '.$pRelationId); |
|
121 | + $objWriter->writeAttribute('name', 'Chart ' . $pRelationId); |
|
122 | 122 | $objWriter->writeAttribute('id', 1025 * $pRelationId); |
123 | 123 | $objWriter->endElement(); |
124 | 124 | $objWriter->startElement('xdr:cNvGraphicFramePr'); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $objWriter->startElement('c:chart'); |
145 | 145 | $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); |
146 | 146 | $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); |
147 | - $objWriter->writeAttribute('r:id', 'rId'.$pRelationId); |
|
147 | + $objWriter->writeAttribute('r:id', 'rId' . $pRelationId); |
|
148 | 148 | $objWriter->endElement(); |
149 | 149 | $objWriter->endElement(); |
150 | 150 | $objWriter->endElement(); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | // a:blip |
220 | 220 | $objWriter->startElement('a:blip'); |
221 | 221 | $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); |
222 | - $objWriter->writeAttribute('r:embed', 'rId'.$pRelationId); |
|
222 | + $objWriter->writeAttribute('r:embed', 'rId' . $pRelationId); |
|
223 | 223 | $objWriter->endElement(); |
224 | 224 | |
225 | 225 | // a:stretch |
@@ -507,13 +507,13 @@ discard block |
||
507 | 507 | // v:shape |
508 | 508 | $objWriter->startElement('v:shape'); |
509 | 509 | $objWriter->writeAttribute('id', $pReference); |
510 | - $objWriter->writeAttribute('o:spid', '_x0000_s'.$id); |
|
510 | + $objWriter->writeAttribute('o:spid', '_x0000_s' . $id); |
|
511 | 511 | $objWriter->writeAttribute('type', '#_x0000_t75'); |
512 | 512 | $objWriter->writeAttribute('style', "position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1"); |
513 | 513 | |
514 | 514 | // v:imagedata |
515 | 515 | $objWriter->startElement('v:imagedata'); |
516 | - $objWriter->writeAttribute('o:relid', 'rId'.$pReference); |
|
516 | + $objWriter->writeAttribute('o:relid', 'rId' . $pReference); |
|
517 | 517 | $objWriter->writeAttribute('o:title', $pImage->getName()); |
518 | 518 | $objWriter->endElement(); |
519 | 519 |