@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $this->imageResource = null; |
54 | 54 | $this->renderingFunction = self::RENDERING_DEFAULT; |
55 | 55 | $this->mimeType = self::MIMETYPE_DEFAULT; |
56 | - $this->uniqueName = md5(rand(0, 9999) . time() . rand(0, 9999)); |
|
56 | + $this->uniqueName = md5(rand(0, 9999).time().rand(0, 9999)); |
|
57 | 57 | |
58 | 58 | // Initialize parent |
59 | 59 | parent::__construct(); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $extension = explode('/', $extension); |
149 | 149 | $extension = $extension[1]; |
150 | 150 | |
151 | - return $this->uniqueName . $this->getImageIndex() . '.' . $extension; |
|
151 | + return $this->uniqueName.$this->getImageIndex().'.'.$extension; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | /** |
@@ -159,10 +159,10 @@ discard block |
||
159 | 159 | public function getHashCode() |
160 | 160 | { |
161 | 161 | return md5( |
162 | - $this->renderingFunction . |
|
163 | - $this->mimeType . |
|
164 | - $this->uniqueName . |
|
165 | - parent::getHashCode() . |
|
162 | + $this->renderingFunction. |
|
163 | + $this->mimeType. |
|
164 | + $this->uniqueName. |
|
165 | + parent::getHashCode(). |
|
166 | 166 | __CLASS__ |
167 | 167 | ); |
168 | 168 | } |
@@ -12,12 +12,12 @@ |
||
12 | 12 | public function getHashCode() |
13 | 13 | { |
14 | 14 | return md5( |
15 | - $this->getPath() . |
|
16 | - $this->name . |
|
17 | - $this->offsetX . |
|
18 | - $this->offsetY . |
|
19 | - $this->width . |
|
20 | - $this->height . |
|
15 | + $this->getPath(). |
|
16 | + $this->name. |
|
17 | + $this->offsetX. |
|
18 | + $this->offsetY. |
|
19 | + $this->width. |
|
20 | + $this->height. |
|
21 | 21 | __CLASS__ |
22 | 22 | ); |
23 | 23 | } |
@@ -261,13 +261,13 @@ |
||
261 | 261 | public function getHashCode() |
262 | 262 | { |
263 | 263 | return md5( |
264 | - ($this->visible ? 't' : 'f') . |
|
265 | - $this->blurRadius . |
|
266 | - $this->distance . |
|
267 | - $this->direction . |
|
268 | - $this->alignment . |
|
269 | - $this->color->getHashCode() . |
|
270 | - $this->alpha . |
|
264 | + ($this->visible ? 't' : 'f'). |
|
265 | + $this->blurRadius. |
|
266 | + $this->distance. |
|
267 | + $this->direction. |
|
268 | + $this->alignment. |
|
269 | + $this->color->getHashCode(). |
|
270 | + $this->alpha. |
|
271 | 271 | __CLASS__ |
272 | 272 | ); |
273 | 273 | } |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | } |
701 | 701 | } elseif ($method == self::SETPRINTRANGE_INSERT) { |
702 | 702 | if ($index == 0) { |
703 | - $this->printArea .= ($this->printArea == '') ? $value : ',' . $value; |
|
703 | + $this->printArea .= ($this->printArea == '') ? $value : ','.$value; |
|
704 | 704 | } else { |
705 | 705 | $printAreas = explode(',', $this->printArea); |
706 | 706 | if ($index < 0) { |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) |
768 | 768 | { |
769 | 769 | return $this->setPrintArea( |
770 | - Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2, |
|
770 | + Coordinate::stringFromColumnIndex($column1).$row1.':'.Coordinate::stringFromColumnIndex($column2).$row2, |
|
771 | 771 | $index, |
772 | 772 | $method |
773 | 773 | ); |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) |
795 | 795 | { |
796 | 796 | return $this->setPrintArea( |
797 | - Coordinate::stringFromColumnIndex($column1) . $row1 . ':' . Coordinate::stringFromColumnIndex($column2) . $row2, |
|
797 | + Coordinate::stringFromColumnIndex($column1).$row1.':'.Coordinate::stringFromColumnIndex($column2).$row2, |
|
798 | 798 | $index, |
799 | 799 | self::SETPRINTRANGE_INSERT |
800 | 800 | ); |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | |
444 | 444 | // Enforce maximum characters allowed for sheet title |
445 | 445 | if ($CharCount > self::SHEET_TITLE_MAXIMUM_LENGTH) { |
446 | - throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet code name.'); |
|
446 | + throw new Exception('Maximum '.self::SHEET_TITLE_MAXIMUM_LENGTH.' characters allowed in sheet code name.'); |
|
447 | 447 | } |
448 | 448 | |
449 | 449 | return $pValue; |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | |
468 | 468 | // Enforce maximum characters allowed for sheet title |
469 | 469 | if (Shared\StringHelper::countCharacters($pValue) > self::SHEET_TITLE_MAXIMUM_LENGTH) { |
470 | - throw new Exception('Maximum ' . self::SHEET_TITLE_MAXIMUM_LENGTH . ' characters allowed in sheet title.'); |
|
470 | + throw new Exception('Maximum '.self::SHEET_TITLE_MAXIMUM_LENGTH.' characters allowed in sheet title.'); |
|
471 | 471 | } |
472 | 472 | |
473 | 473 | return $pValue; |
@@ -690,7 +690,7 @@ discard block |
||
690 | 690 | public function calculateWorksheetDimension() |
691 | 691 | { |
692 | 692 | // Return |
693 | - return 'A1:' . $this->getHighestColumn() . $this->getHighestRow(); |
|
693 | + return 'A1:'.$this->getHighestColumn().$this->getHighestRow(); |
|
694 | 694 | } |
695 | 695 | |
696 | 696 | /** |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | public function calculateWorksheetDataDimension() |
702 | 702 | { |
703 | 703 | // Return |
704 | - return 'A1:' . $this->getHighestDataColumn() . $this->getHighestDataRow(); |
|
704 | + return 'A1:'.$this->getHighestDataColumn().$this->getHighestDataRow(); |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | /** |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | $pValue = Shared\StringHelper::substring($pValue, 0, 29); |
864 | 864 | } |
865 | 865 | $i = 1; |
866 | - while ($this->parent->sheetNameExists($pValue . ' ' . $i)) { |
|
866 | + while ($this->parent->sheetNameExists($pValue.' '.$i)) { |
|
867 | 867 | ++$i; |
868 | 868 | if ($i == 10) { |
869 | 869 | if (Shared\StringHelper::countCharacters($pValue) > 28) { |
@@ -1207,8 +1207,8 @@ discard block |
||
1207 | 1207 | } |
1208 | 1208 | |
1209 | 1209 | // Named range? |
1210 | - if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) && |
|
1211 | - (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) { |
|
1210 | + if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) && |
|
1211 | + (preg_match('/^'.Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) { |
|
1212 | 1212 | $namedRange = NamedRange::resolveRange($pCoordinate, $this); |
1213 | 1213 | if ($namedRange !== null) { |
1214 | 1214 | $pCoordinate = $namedRange->getRange(); |
@@ -1240,7 +1240,7 @@ discard block |
||
1240 | 1240 | public function getCellByColumnAndRow($columnIndex, $row, $createIfNotExists = true) |
1241 | 1241 | { |
1242 | 1242 | $columnLetter = Coordinate::stringFromColumnIndex($columnIndex); |
1243 | - $coordinate = $columnLetter . $row; |
|
1243 | + $coordinate = $columnLetter.$row; |
|
1244 | 1244 | |
1245 | 1245 | if ($this->cellCollection->has($coordinate)) { |
1246 | 1246 | return $this->cellCollection->get($coordinate); |
@@ -1307,8 +1307,8 @@ discard block |
||
1307 | 1307 | } |
1308 | 1308 | |
1309 | 1309 | // Named range? |
1310 | - if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) && |
|
1311 | - (preg_match('/^' . Calculation::CALCULATION_REGEXP_NAMEDRANGE . '$/i', $pCoordinate, $matches))) { |
|
1310 | + if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) && |
|
1311 | + (preg_match('/^'.Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) { |
|
1312 | 1312 | $namedRange = NamedRange::resolveRange($pCoordinate, $this); |
1313 | 1313 | if ($namedRange !== null) { |
1314 | 1314 | $pCoordinate = $namedRange->getRange(); |
@@ -1317,7 +1317,7 @@ discard block |
||
1317 | 1317 | return $namedRange->getWorksheet()->cellExists($pCoordinate); |
1318 | 1318 | } |
1319 | 1319 | |
1320 | - throw new Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle()); |
|
1320 | + throw new Exception('Named range '.$namedRange->getName().' is not accessible from within sheet '.$this->getTitle()); |
|
1321 | 1321 | } |
1322 | 1322 | } else { |
1323 | 1323 | return false; |
@@ -1347,7 +1347,7 @@ discard block |
||
1347 | 1347 | */ |
1348 | 1348 | public function cellExistsByColumnAndRow($columnIndex, $row) |
1349 | 1349 | { |
1350 | - return $this->cellExists(Coordinate::stringFromColumnIndex($columnIndex) . $row); |
|
1350 | + return $this->cellExists(Coordinate::stringFromColumnIndex($columnIndex).$row); |
|
1351 | 1351 | } |
1352 | 1352 | |
1353 | 1353 | /** |
@@ -1527,12 +1527,12 @@ discard block |
||
1527 | 1527 | public function getStyleByColumnAndRow($columnIndex1, $row1, $columnIndex2 = null, $row2 = null) |
1528 | 1528 | { |
1529 | 1529 | if ($columnIndex2 !== null && $row2 !== null) { |
1530 | - $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; |
|
1530 | + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1).$row1.':'.Coordinate::stringFromColumnIndex($columnIndex2).$row2; |
|
1531 | 1531 | |
1532 | 1532 | return $this->getStyle($cellRange); |
1533 | 1533 | } |
1534 | 1534 | |
1535 | - return $this->getStyle(Coordinate::stringFromColumnIndex($columnIndex1) . $row1); |
|
1535 | + return $this->getStyle(Coordinate::stringFromColumnIndex($columnIndex1).$row1); |
|
1536 | 1536 | } |
1537 | 1537 | |
1538 | 1538 | /** |
@@ -1561,7 +1561,7 @@ discard block |
||
1561 | 1561 | } |
1562 | 1562 | |
1563 | 1563 | // Calculate range outer borders |
1564 | - [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange . ':' . $pRange); |
|
1564 | + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange.':'.$pRange); |
|
1565 | 1565 | |
1566 | 1566 | // Make sure we can loop upwards on rows and columns |
1567 | 1567 | if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { |
@@ -1573,7 +1573,7 @@ discard block |
||
1573 | 1573 | // Loop through cells and apply styles |
1574 | 1574 | for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { |
1575 | 1575 | for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { |
1576 | - $this->getCell(Coordinate::stringFromColumnIndex($col) . $row)->setXfIndex($xfIndex); |
|
1576 | + $this->getCell(Coordinate::stringFromColumnIndex($col).$row)->setXfIndex($xfIndex); |
|
1577 | 1577 | } |
1578 | 1578 | } |
1579 | 1579 | |
@@ -1601,7 +1601,7 @@ discard block |
||
1601 | 1601 | } |
1602 | 1602 | |
1603 | 1603 | // Calculate range outer borders |
1604 | - [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange . ':' . $pRange); |
|
1604 | + [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($pRange.':'.$pRange); |
|
1605 | 1605 | |
1606 | 1606 | // Make sure we can loop upwards on rows and columns |
1607 | 1607 | if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { |
@@ -1613,7 +1613,7 @@ discard block |
||
1613 | 1613 | // Loop through cells and apply styles |
1614 | 1614 | for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { |
1615 | 1615 | for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { |
1616 | - $this->setConditionalStyles(Coordinate::stringFromColumnIndex($col) . $row, $pCellStyle); |
|
1616 | + $this->setConditionalStyles(Coordinate::stringFromColumnIndex($col).$row, $pCellStyle); |
|
1617 | 1617 | } |
1618 | 1618 | } |
1619 | 1619 | |
@@ -1661,7 +1661,7 @@ discard block |
||
1661 | 1661 | */ |
1662 | 1662 | public function setBreakByColumnAndRow($columnIndex, $row, $break) |
1663 | 1663 | { |
1664 | - return $this->setBreak(Coordinate::stringFromColumnIndex($columnIndex) . $row, $break); |
|
1664 | + return $this->setBreak(Coordinate::stringFromColumnIndex($columnIndex).$row, $break); |
|
1665 | 1665 | } |
1666 | 1666 | |
1667 | 1667 | /** |
@@ -1730,7 +1730,7 @@ discard block |
||
1730 | 1730 | */ |
1731 | 1731 | public function mergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) |
1732 | 1732 | { |
1733 | - $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; |
|
1733 | + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1).$row1.':'.Coordinate::stringFromColumnIndex($columnIndex2).$row2; |
|
1734 | 1734 | |
1735 | 1735 | return $this->mergeCells($cellRange); |
1736 | 1736 | } |
@@ -1753,7 +1753,7 @@ discard block |
||
1753 | 1753 | if (isset($this->mergeCells[$pRange])) { |
1754 | 1754 | unset($this->mergeCells[$pRange]); |
1755 | 1755 | } else { |
1756 | - throw new Exception('Cell range ' . $pRange . ' not known as merged.'); |
|
1756 | + throw new Exception('Cell range '.$pRange.' not known as merged.'); |
|
1757 | 1757 | } |
1758 | 1758 | } else { |
1759 | 1759 | throw new Exception('Merge can only be removed from a range of cells.'); |
@@ -1776,7 +1776,7 @@ discard block |
||
1776 | 1776 | */ |
1777 | 1777 | public function unmergeCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) |
1778 | 1778 | { |
1779 | - $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; |
|
1779 | + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1).$row1.':'.Coordinate::stringFromColumnIndex($columnIndex2).$row2; |
|
1780 | 1780 | |
1781 | 1781 | return $this->unmergeCells($cellRange); |
1782 | 1782 | } |
@@ -1842,7 +1842,7 @@ discard block |
||
1842 | 1842 | */ |
1843 | 1843 | public function protectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2, $password, $alreadyHashed = false) |
1844 | 1844 | { |
1845 | - $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; |
|
1845 | + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1).$row1.':'.Coordinate::stringFromColumnIndex($columnIndex2).$row2; |
|
1846 | 1846 | |
1847 | 1847 | return $this->protectCells($cellRange, $password, $alreadyHashed); |
1848 | 1848 | } |
@@ -1864,7 +1864,7 @@ discard block |
||
1864 | 1864 | if (isset($this->protectedCells[$pRange])) { |
1865 | 1865 | unset($this->protectedCells[$pRange]); |
1866 | 1866 | } else { |
1867 | - throw new Exception('Cell range ' . $pRange . ' not known as protected.'); |
|
1867 | + throw new Exception('Cell range '.$pRange.' not known as protected.'); |
|
1868 | 1868 | } |
1869 | 1869 | |
1870 | 1870 | return $this; |
@@ -1884,7 +1884,7 @@ discard block |
||
1884 | 1884 | */ |
1885 | 1885 | public function unprotectCellsByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) |
1886 | 1886 | { |
1887 | - $cellRange = Coordinate::stringFromColumnIndex($columnIndex1) . $row1 . ':' . Coordinate::stringFromColumnIndex($columnIndex2) . $row2; |
|
1887 | + $cellRange = Coordinate::stringFromColumnIndex($columnIndex1).$row1.':'.Coordinate::stringFromColumnIndex($columnIndex2).$row2; |
|
1888 | 1888 | |
1889 | 1889 | return $this->unprotectCells($cellRange); |
1890 | 1890 | } |
@@ -1945,9 +1945,9 @@ discard block |
||
1945 | 1945 | public function setAutoFilterByColumnAndRow($columnIndex1, $row1, $columnIndex2, $row2) |
1946 | 1946 | { |
1947 | 1947 | return $this->setAutoFilter( |
1948 | - Coordinate::stringFromColumnIndex($columnIndex1) . $row1 |
|
1949 | - . ':' . |
|
1950 | - Coordinate::stringFromColumnIndex($columnIndex2) . $row2 |
|
1948 | + Coordinate::stringFromColumnIndex($columnIndex1).$row1 |
|
1949 | + . ':'. |
|
1950 | + Coordinate::stringFromColumnIndex($columnIndex2).$row2 |
|
1951 | 1951 | ); |
1952 | 1952 | } |
1953 | 1953 | |
@@ -1997,7 +1997,7 @@ discard block |
||
1997 | 1997 | |
1998 | 1998 | if ($cell !== null && $topLeftCell === null) { |
1999 | 1999 | $coordinate = Coordinate::coordinateFromString($cell); |
2000 | - $topLeftCell = $coordinate[0] . $coordinate[1]; |
|
2000 | + $topLeftCell = $coordinate[0].$coordinate[1]; |
|
2001 | 2001 | } |
2002 | 2002 | |
2003 | 2003 | $this->freezePane = $cell; |
@@ -2016,7 +2016,7 @@ discard block |
||
2016 | 2016 | */ |
2017 | 2017 | public function freezePaneByColumnAndRow($columnIndex, $row) |
2018 | 2018 | { |
2019 | - return $this->freezePane(Coordinate::stringFromColumnIndex($columnIndex) . $row); |
|
2019 | + return $this->freezePane(Coordinate::stringFromColumnIndex($columnIndex).$row); |
|
2020 | 2020 | } |
2021 | 2021 | |
2022 | 2022 | /** |
@@ -2053,7 +2053,7 @@ discard block |
||
2053 | 2053 | { |
2054 | 2054 | if ($pBefore >= 1) { |
2055 | 2055 | $objReferenceHelper = ReferenceHelper::getInstance(); |
2056 | - $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this); |
|
2056 | + $objReferenceHelper->insertNewBefore('A'.$pBefore, 0, $pNumRows, $this); |
|
2057 | 2057 | } else { |
2058 | 2058 | throw new Exception('Rows can only be inserted before at least row 1.'); |
2059 | 2059 | } |
@@ -2075,7 +2075,7 @@ discard block |
||
2075 | 2075 | { |
2076 | 2076 | if (!is_numeric($pBefore)) { |
2077 | 2077 | $objReferenceHelper = ReferenceHelper::getInstance(); |
2078 | - $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this); |
|
2078 | + $objReferenceHelper->insertNewBefore($pBefore.'1', $pNumCols, 0, $this); |
|
2079 | 2079 | } else { |
2080 | 2080 | throw new Exception('Column references should not be numeric.'); |
2081 | 2081 | } |
@@ -2129,7 +2129,7 @@ discard block |
||
2129 | 2129 | } |
2130 | 2130 | |
2131 | 2131 | $objReferenceHelper = ReferenceHelper::getInstance(); |
2132 | - $objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this); |
|
2132 | + $objReferenceHelper->insertNewBefore('A'.($pRow + $pNumRows), 0, -$pNumRows, $this); |
|
2133 | 2133 | for ($r = 0; $r < $removedRowsCounter; ++$r) { |
2134 | 2134 | $this->getCellCollection()->removeRow($highestRow); |
2135 | 2135 | --$highestRow; |
@@ -2164,7 +2164,7 @@ discard block |
||
2164 | 2164 | |
2165 | 2165 | $pColumn = Coordinate::stringFromColumnIndex($pColumnIndex + $pNumCols); |
2166 | 2166 | $objReferenceHelper = ReferenceHelper::getInstance(); |
2167 | - $objReferenceHelper->insertNewBefore($pColumn . '1', -$pNumCols, 0, $this); |
|
2167 | + $objReferenceHelper->insertNewBefore($pColumn.'1', -$pNumCols, 0, $this); |
|
2168 | 2168 | |
2169 | 2169 | $maxPossibleColumnsToBeRemoved = $highestColumnIndex - $pColumnIndex + 1; |
2170 | 2170 | |
@@ -2385,7 +2385,7 @@ discard block |
||
2385 | 2385 | */ |
2386 | 2386 | public function getCommentByColumnAndRow($columnIndex, $row) |
2387 | 2387 | { |
2388 | - return $this->getComment(Coordinate::stringFromColumnIndex($columnIndex) . $row); |
|
2388 | + return $this->getComment(Coordinate::stringFromColumnIndex($columnIndex).$row); |
|
2389 | 2389 | } |
2390 | 2390 | |
2391 | 2391 | /** |
@@ -2467,7 +2467,7 @@ discard block |
||
2467 | 2467 | */ |
2468 | 2468 | public function setSelectedCellByColumnAndRow($columnIndex, $row) |
2469 | 2469 | { |
2470 | - return $this->setSelectedCells(Coordinate::stringFromColumnIndex($columnIndex) . $row); |
|
2470 | + return $this->setSelectedCells(Coordinate::stringFromColumnIndex($columnIndex).$row); |
|
2471 | 2471 | } |
2472 | 2472 | |
2473 | 2473 | /** |
@@ -2523,12 +2523,12 @@ discard block |
||
2523 | 2523 | if ($strictNullComparison) { |
2524 | 2524 | if ($cellValue !== $nullValue) { |
2525 | 2525 | // Set cell value |
2526 | - $this->getCell($currentColumn . $startRow)->setValue($cellValue); |
|
2526 | + $this->getCell($currentColumn.$startRow)->setValue($cellValue); |
|
2527 | 2527 | } |
2528 | 2528 | } else { |
2529 | 2529 | if ($cellValue != $nullValue) { |
2530 | 2530 | // Set cell value |
2531 | - $this->getCell($currentColumn . $startRow)->setValue($cellValue); |
|
2531 | + $this->getCell($currentColumn.$startRow)->setValue($cellValue); |
|
2532 | 2532 | } |
2533 | 2533 | } |
2534 | 2534 | ++$currentColumn; |
@@ -2573,9 +2573,9 @@ discard block |
||
2573 | 2573 | $cRef = $returnCellRef ? $col : ++$c; |
2574 | 2574 | // Using getCell() will create a new cell if it doesn't already exist. We don't want that to happen |
2575 | 2575 | // so we test and retrieve directly against cellCollection |
2576 | - if ($this->cellCollection->has($col . $row)) { |
|
2576 | + if ($this->cellCollection->has($col.$row)) { |
|
2577 | 2577 | // Cell exists |
2578 | - $cell = $this->cellCollection->get($col . $row); |
|
2578 | + $cell = $this->cellCollection->get($col.$row); |
|
2579 | 2579 | if ($cell->getValue() !== null) { |
2580 | 2580 | if ($cell->getValue() instanceof RichText) { |
2581 | 2581 | $returnValue[$rRef][$cRef] = $cell->getValue()->getPlainText(); |
@@ -2633,7 +2633,7 @@ discard block |
||
2633 | 2633 | return $pWorkSheet->rangeToArray($pCellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef); |
2634 | 2634 | } |
2635 | 2635 | |
2636 | - throw new Exception('Named Range ' . $pNamedRange . ' does not exist.'); |
|
2636 | + throw new Exception('Named Range '.$pNamedRange.' does not exist.'); |
|
2637 | 2637 | } |
2638 | 2638 | |
2639 | 2639 | /** |
@@ -2657,7 +2657,7 @@ discard block |
||
2657 | 2657 | $maxRow = $this->getHighestRow(); |
2658 | 2658 | |
2659 | 2659 | // Return |
2660 | - return $this->rangeToArray('A1:' . $maxCol . $maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef); |
|
2660 | + return $this->rangeToArray('A1:'.$maxCol.$maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef); |
|
2661 | 2661 | } |
2662 | 2662 | |
2663 | 2663 | /** |
@@ -2731,7 +2731,7 @@ discard block |
||
2731 | 2731 | public function getHashCode() |
2732 | 2732 | { |
2733 | 2733 | if ($this->dirty) { |
2734 | - $this->hash = md5($this->title . $this->autoFilter . ($this->protection->isProtectionEnabled() ? 't' : 'f') . __CLASS__); |
|
2734 | + $this->hash = md5($this->title.$this->autoFilter.($this->protection->isProtectionEnabled() ? 't' : 'f').__CLASS__); |
|
2735 | 2735 | $this->dirty = false; |
2736 | 2736 | } |
2737 | 2737 | |
@@ -2914,7 +2914,7 @@ discard block |
||
2914 | 2914 | if ($rangeBoundaries[1][1] > $maxRow) { |
2915 | 2915 | $rangeBoundaries[1][1] = $maxRow; |
2916 | 2916 | } |
2917 | - $rangeSet = $rangeBoundaries[0][0] . $rangeBoundaries[0][1] . ':' . $rangeBoundaries[1][0] . $rangeBoundaries[1][1]; |
|
2917 | + $rangeSet = $rangeBoundaries[0][0].$rangeBoundaries[0][1].':'.$rangeBoundaries[1][0].$rangeBoundaries[1][1]; |
|
2918 | 2918 | } |
2919 | 2919 | unset($rangeSet); |
2920 | 2920 | |
@@ -3039,7 +3039,7 @@ discard block |
||
3039 | 3039 | $pValue = Shared\StringHelper::substring($pValue, 0, 29); |
3040 | 3040 | } |
3041 | 3041 | $i = 1; |
3042 | - while ($this->getParent()->sheetCodeNameExists($pValue . '_' . $i)) { |
|
3042 | + while ($this->getParent()->sheetCodeNameExists($pValue.'_'.$i)) { |
|
3043 | 3043 | ++$i; |
3044 | 3044 | if ($i == 10) { |
3045 | 3045 | if (Shared\StringHelper::countCharacters($pValue) > 28) { |
@@ -3052,7 +3052,7 @@ discard block |
||
3052 | 3052 | } |
3053 | 3053 | } |
3054 | 3054 | |
3055 | - $pValue .= '_' . $i; // ok, we have a valid name |
|
3055 | + $pValue .= '_'.$i; // ok, we have a valid name |
|
3056 | 3056 | } |
3057 | 3057 | } |
3058 | 3058 | } |
@@ -124,8 +124,7 @@ discard block |
||
124 | 124 | $this->rotation = 0; |
125 | 125 | $this->shadow = new Drawing\Shadow(); |
126 | 126 | |
127 | - // Set image index |
|
128 | - ++self::$imageCounter; |
|
127 | + // Set image index++self::$imageCounter; |
|
129 | 128 | $this->imageIndex = self::$imageCounter; |
130 | 129 | } |
131 | 130 | |
@@ -488,16 +487,16 @@ discard block |
||
488 | 487 | public function getHashCode() |
489 | 488 | { |
490 | 489 | return md5( |
491 | - $this->name . |
|
492 | - $this->description . |
|
493 | - $this->worksheet->getHashCode() . |
|
494 | - $this->coordinates . |
|
495 | - $this->offsetX . |
|
496 | - $this->offsetY . |
|
497 | - $this->width . |
|
498 | - $this->height . |
|
499 | - $this->rotation . |
|
500 | - $this->shadow->getHashCode() . |
|
490 | + $this->name. |
|
491 | + $this->description. |
|
492 | + $this->worksheet->getHashCode(). |
|
493 | + $this->coordinates. |
|
494 | + $this->offsetX. |
|
495 | + $this->offsetY. |
|
496 | + $this->width. |
|
497 | + $this->height. |
|
498 | + $this->rotation. |
|
499 | + $this->shadow->getHashCode(). |
|
501 | 500 | __CLASS__ |
502 | 501 | ); |
503 | 502 | } |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | -spl_autoload_register(function ($class_name) { |
|
2 | +spl_autoload_register(function($class_name) { |
|
3 | 3 | $preg_match = preg_match('/^PhpOffice\\\PhpSpreadsheet\\\/', $class_name); |
4 | 4 | |
5 | 5 | if (1 === $preg_match) { |
6 | 6 | $class_name = preg_replace('/\\\/', '/', $class_name); |
7 | 7 | $class_name = preg_replace('/^PhpOffice\\/PhpSpreadsheet\\//', '', $class_name); |
8 | - require_once __DIR__ . '/PhpSpreadsheet/' . $class_name . '.php'; |
|
8 | + require_once __DIR__.'/PhpSpreadsheet/'.$class_name.'.php'; |
|
9 | 9 | } |
10 | 10 | }); |
@@ -7,8 +7,8 @@ |
||
7 | 7 | // This sucks, but we have to try to find the composer autoloader |
8 | 8 | |
9 | 9 | $paths = [ |
10 | - __DIR__ . '/../vendor/autoload.php', // In case PhpSpreadsheet is cloned directly |
|
11 | - __DIR__ . '/../../../autoload.php', // In case PhpSpreadsheet is a composer dependency. |
|
10 | + __DIR__.'/../vendor/autoload.php', // In case PhpSpreadsheet is cloned directly |
|
11 | + __DIR__.'/../../../autoload.php', // In case PhpSpreadsheet is a composer dependency. |
|
12 | 12 | ]; |
13 | 13 | |
14 | 14 | foreach ($paths as $path) { |
@@ -398,7 +398,7 @@ |
||
398 | 398 | $map = static::$controlCharsMap; |
399 | 399 | $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; |
400 | 400 | $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; |
401 | - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { |
|
401 | + $value = preg_replace_callback(static::$controlCharsRx, function($c) use ($map, $startCchr, $endCchr) { |
|
402 | 402 | $s = $startCchr; |
403 | 403 | $c = $c[$i = 0]; |
404 | 404 | do { |