@@ -187,9 +187,9 @@ |
||
187 | 187 | { |
188 | 188 | if ($this->position <= $this->startColumn) { |
189 | 189 | throw new \PhpOffice\PhpSpreadsheet\Exception( |
190 | - 'Column is already at the beginning of range ('. |
|
191 | - \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn).' - '. |
|
192 | - \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn).')' |
|
190 | + 'Column is already at the beginning of range (' . |
|
191 | + \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn) . ' - ' . |
|
192 | + \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn) . ')' |
|
193 | 193 | ); |
194 | 194 | } |
195 | 195 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $fileName = $this->getFilename(); |
68 | 68 | $fileName = str_replace(' ', '_', $fileName); |
69 | 69 | |
70 | - return str_replace('.'.$this->getExtension(), '', $fileName).$this->getImageIndex().'.'.$this->getExtension(); |
|
70 | + return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension(); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | public function getHashCode() |
131 | 131 | { |
132 | 132 | return md5( |
133 | - $this->path. |
|
134 | - parent::getHashCode(). |
|
133 | + $this->path . |
|
134 | + parent::getHashCode() . |
|
135 | 135 | __CLASS__ |
136 | 136 | ); |
137 | 137 | } |
@@ -352,12 +352,12 @@ |
||
352 | 352 | public function getHashCode() |
353 | 353 | { |
354 | 354 | return md5( |
355 | - $this->path. |
|
356 | - $this->name. |
|
357 | - $this->offsetX. |
|
358 | - $this->offsetY. |
|
359 | - $this->width. |
|
360 | - $this->height. |
|
355 | + $this->path . |
|
356 | + $this->name . |
|
357 | + $this->offsetX . |
|
358 | + $this->offsetY . |
|
359 | + $this->width . |
|
360 | + $this->height . |
|
361 | 361 | __CLASS__ |
362 | 362 | ); |
363 | 363 | } |
@@ -182,9 +182,9 @@ |
||
182 | 182 | { |
183 | 183 | if ($this->position <= $this->startColumn) { |
184 | 184 | throw new \PhpOffice\PhpSpreadsheet\Exception( |
185 | - 'Column is already at the beginning of range ('. |
|
186 | - \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn).' - '. |
|
187 | - \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn).')' |
|
185 | + 'Column is already at the beginning of range (' . |
|
186 | + \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn) . ' - ' . |
|
187 | + \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($this->endColumn) . ')' |
|
188 | 188 | ); |
189 | 189 | } |
190 | 190 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $this->imageResource = null; |
78 | 78 | $this->renderingFunction = self::RENDERING_DEFAULT; |
79 | 79 | $this->mimeType = self::MIMETYPE_DEFAULT; |
80 | - $this->uniqueName = md5(rand(0, 9999).time().rand(0, 9999)); |
|
80 | + $this->uniqueName = md5(rand(0, 9999) . time() . rand(0, 9999)); |
|
81 | 81 | |
82 | 82 | // Initialize parent |
83 | 83 | parent::__construct(); |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $extension = explode('/', $extension); |
173 | 173 | $extension = $extension[1]; |
174 | 174 | |
175 | - return $this->uniqueName.$this->getImageIndex().'.'.$extension; |
|
175 | + return $this->uniqueName . $this->getImageIndex() . '.' . $extension; |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
@@ -183,10 +183,10 @@ discard block |
||
183 | 183 | public function getHashCode() |
184 | 184 | { |
185 | 185 | return md5( |
186 | - $this->renderingFunction. |
|
187 | - $this->mimeType. |
|
188 | - $this->uniqueName. |
|
189 | - parent::getHashCode(). |
|
186 | + $this->renderingFunction . |
|
187 | + $this->mimeType . |
|
188 | + $this->uniqueName . |
|
189 | + parent::getHashCode() . |
|
190 | 190 | __CLASS__ |
191 | 191 | ); |
192 | 192 | } |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | } |
725 | 725 | } elseif ($method == self::SETPRINTRANGE_INSERT) { |
726 | 726 | if ($index == 0) { |
727 | - $this->printArea .= ($this->printArea == '') ? $value : ','.$value; |
|
727 | + $this->printArea .= ($this->printArea == '') ? $value : ',' . $value; |
|
728 | 728 | } else { |
729 | 729 | $printAreas = explode(',', $this->printArea); |
730 | 730 | if ($index < 0) { |
@@ -791,7 +791,7 @@ discard block |
||
791 | 791 | public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) |
792 | 792 | { |
793 | 793 | return $this->setPrintArea( |
794 | - \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column1).$row1.':'.\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column2).$row2, |
|
794 | + \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column1) . $row1 . ':' . \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column2) . $row2, |
|
795 | 795 | $index, |
796 | 796 | $method |
797 | 797 | ); |
@@ -818,7 +818,7 @@ discard block |
||
818 | 818 | public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) |
819 | 819 | { |
820 | 820 | return $this->setPrintArea( |
821 | - \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column1).$row1.':'.\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column2).$row2, |
|
821 | + \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column1) . $row1 . ':' . \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column2) . $row2, |
|
822 | 822 | $index, |
823 | 823 | self::SETPRINTRANGE_INSERT |
824 | 824 | ); |
@@ -500,16 +500,16 @@ |
||
500 | 500 | public function getHashCode() |
501 | 501 | { |
502 | 502 | return md5( |
503 | - $this->name. |
|
504 | - $this->description. |
|
505 | - $this->worksheet->getHashCode(). |
|
506 | - $this->coordinates. |
|
507 | - $this->offsetX. |
|
508 | - $this->offsetY. |
|
509 | - $this->width. |
|
510 | - $this->height. |
|
511 | - $this->rotation. |
|
512 | - $this->shadow->getHashCode(). |
|
503 | + $this->name . |
|
504 | + $this->description . |
|
505 | + $this->worksheet->getHashCode() . |
|
506 | + $this->coordinates . |
|
507 | + $this->offsetX . |
|
508 | + $this->offsetY . |
|
509 | + $this->width . |
|
510 | + $this->height . |
|
511 | + $this->rotation . |
|
512 | + $this->shadow->getHashCode() . |
|
513 | 513 | __CLASS__ |
514 | 514 | ); |
515 | 515 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | { |
425 | 425 | // Check if file exists |
426 | 426 | if (!file_exists($pFilename)) { |
427 | - throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.'); |
|
427 | + throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.'); |
|
428 | 428 | } |
429 | 429 | |
430 | 430 | try { |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | { |
452 | 452 | // Check if file exists |
453 | 453 | if (!file_exists($pFilename)) { |
454 | - throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.'); |
|
454 | + throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.'); |
|
455 | 455 | } |
456 | 456 | |
457 | 457 | $worksheetNames = []; |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | { |
509 | 509 | // Check if file exists |
510 | 510 | if (!file_exists($pFilename)) { |
511 | - throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.'); |
|
511 | + throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.'); |
|
512 | 512 | } |
513 | 513 | |
514 | 514 | $worksheetInfo = []; |
@@ -1085,7 +1085,7 @@ discard block |
||
1085 | 1085 | list($column, $row) = \PhpOffice\PhpSpreadsheet\Cell::coordinateFromString($cell); |
1086 | 1086 | if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { |
1087 | 1087 | $formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell); |
1088 | - $this->phpSheet->getCell($cell)->setValueExplicit('='.$formula, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_FORMULA); |
|
1088 | + $this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_FORMULA); |
|
1089 | 1089 | } |
1090 | 1090 | } |
1091 | 1091 | } |
@@ -1124,7 +1124,7 @@ discard block |
||
1124 | 1124 | $sheetName = trim($explodes[0], "'"); |
1125 | 1125 | if (count($explodes) == 2) { |
1126 | 1126 | if (strpos($explodes[1], ':') === false) { |
1127 | - $explodes[1] = $explodes[1].':'.$explodes[1]; |
|
1127 | + $explodes[1] = $explodes[1] . ':' . $explodes[1]; |
|
1128 | 1128 | } |
1129 | 1129 | $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66 |
1130 | 1130 | } |
@@ -1594,7 +1594,7 @@ discard block |
||
1594 | 1594 | // Concatenate this extension with the currently set comment for the cell |
1595 | 1595 | $comment = $this->phpSheet->getComment($cellAddress); |
1596 | 1596 | $commentText = $comment->getText()->getPlainText(); |
1597 | - $comment->setText($this->parseRichText($commentText.$noteText)); |
|
1597 | + $comment->setText($this->parseRichText($commentText . $noteText)); |
|
1598 | 1598 | } else { |
1599 | 1599 | // Set comment for the cell |
1600 | 1600 | $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText)); |
@@ -1819,7 +1819,7 @@ discard block |
||
1819 | 1819 | $salt = $key->RC4($salt_data); |
1820 | 1820 | $hashedsalt = $key->RC4($hashedsalt_data); |
1821 | 1821 | |
1822 | - $salt .= "\x80".str_repeat("\0", 47); |
|
1822 | + $salt .= "\x80" . str_repeat("\0", 47); |
|
1823 | 1823 | $salt[56] = "\x80"; |
1824 | 1824 | |
1825 | 1825 | $md5->reset(); |
@@ -2753,7 +2753,7 @@ discard block |
||
2753 | 2753 | |
2754 | 2754 | // offset: var; size: $flen; formula data |
2755 | 2755 | $offset = 14 + $string['size']; |
2756 | - $formulaStructure = pack('v', $flen).substr($recordData, $offset); |
|
2756 | + $formulaStructure = pack('v', $flen) . substr($recordData, $offset); |
|
2757 | 2757 | |
2758 | 2758 | try { |
2759 | 2759 | $formula = $this->getFormulaFromStructure($formulaStructure); |
@@ -2919,7 +2919,7 @@ discard block |
||
2919 | 2919 | // this fragment uncompressed |
2920 | 2920 | $newstr = ''; |
2921 | 2921 | for ($j = 0; $j < strlen($retstr); ++$j) { |
2922 | - $newstr .= $retstr[$j].chr(0); |
|
2922 | + $newstr .= $retstr[$j] . chr(0); |
|
2923 | 2923 | } |
2924 | 2924 | $retstr = $newstr; |
2925 | 2925 | $len = min($charsLeft * 2, $limitpos - $pos); |
@@ -3562,7 +3562,7 @@ discard block |
||
3562 | 3562 | $rknum = self::getInt4d($recordData, 6); |
3563 | 3563 | $numValue = self::getIEEE754($rknum); |
3564 | 3564 | |
3565 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3565 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3566 | 3566 | if (!$this->readDataOnly) { |
3567 | 3567 | // add style information |
3568 | 3568 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3639,13 +3639,13 @@ discard block |
||
3639 | 3639 | } |
3640 | 3640 | } |
3641 | 3641 | if ($this->readEmptyCells || trim($richText->getPlainText()) !== '') { |
3642 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3642 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3643 | 3643 | $cell->setValueExplicit($richText, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING); |
3644 | 3644 | $emptyCell = false; |
3645 | 3645 | } |
3646 | 3646 | } else { |
3647 | 3647 | if ($this->readEmptyCells || trim($this->sst[$index]['value']) !== '') { |
3648 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3648 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3649 | 3649 | $cell->setValueExplicit($this->sst[$index]['value'], \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING); |
3650 | 3650 | $emptyCell = false; |
3651 | 3651 | } |
@@ -3697,7 +3697,7 @@ discard block |
||
3697 | 3697 | |
3698 | 3698 | // offset: var; size: 4; RK value |
3699 | 3699 | $numValue = self::getIEEE754(self::getInt4d($recordData, $offset + 2)); |
3700 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3700 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3701 | 3701 | if (!$this->readDataOnly) { |
3702 | 3702 | // add style |
3703 | 3703 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3741,7 +3741,7 @@ discard block |
||
3741 | 3741 | |
3742 | 3742 | $numValue = self::extractNumber(substr($recordData, 6, 8)); |
3743 | 3743 | |
3744 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3744 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3745 | 3745 | if (!$this->readDataOnly) { |
3746 | 3746 | // add cell style |
3747 | 3747 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3797,14 +3797,14 @@ discard block |
||
3797 | 3797 | // get the base cell, grab tExp token |
3798 | 3798 | $baseRow = self::getInt2d($formulaStructure, 3); |
3799 | 3799 | $baseCol = self::getInt2d($formulaStructure, 5); |
3800 | - $this->_baseCell = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($baseCol).($baseRow + 1); |
|
3800 | + $this->_baseCell = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($baseCol) . ($baseRow + 1); |
|
3801 | 3801 | } |
3802 | 3802 | |
3803 | 3803 | // Read cell? |
3804 | 3804 | if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { |
3805 | 3805 | if ($isPartOfSharedFormula) { |
3806 | 3806 | // formula is added to this cell after the sheet has been read |
3807 | - $this->sharedFormulaParts[$columnString.($row + 1)] = $this->_baseCell; |
|
3807 | + $this->sharedFormulaParts[$columnString . ($row + 1)] = $this->_baseCell; |
|
3808 | 3808 | } |
3809 | 3809 | |
3810 | 3810 | // offset: 16: size: 4; not used |
@@ -3849,7 +3849,7 @@ discard block |
||
3849 | 3849 | $value = self::extractNumber(substr($recordData, 6, 8)); |
3850 | 3850 | } |
3851 | 3851 | |
3852 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3852 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3853 | 3853 | if (!$this->readDataOnly) { |
3854 | 3854 | // add cell style |
3855 | 3855 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3864,7 +3864,7 @@ discard block |
||
3864 | 3864 | throw new Exception('Not BIFF8. Can only read BIFF8 formulas'); |
3865 | 3865 | } |
3866 | 3866 | $formula = $this->getFormulaFromStructure($formulaStructure); // get formula in human language |
3867 | - $cell->setValueExplicit('='.$formula, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_FORMULA); |
|
3867 | + $cell->setValueExplicit('=' . $formula, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_FORMULA); |
|
3868 | 3868 | } catch (\PhpOffice\PhpSpreadsheet\Exception $e) { |
3869 | 3869 | $cell->setValueExplicit($value, $dataType); |
3870 | 3870 | } |
@@ -3970,7 +3970,7 @@ discard block |
||
3970 | 3970 | // offset: 7; size: 1; 0=boolean; 1=error |
3971 | 3971 | $isError = ord($recordData{7}); |
3972 | 3972 | |
3973 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3973 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3974 | 3974 | switch ($isError) { |
3975 | 3975 | case 0: // boolean |
3976 | 3976 | $value = (bool) $boolErr; |
@@ -4024,7 +4024,7 @@ discard block |
||
4024 | 4024 | // Read cell? |
4025 | 4025 | if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { |
4026 | 4026 | $xfIndex = self::getInt2d($recordData, 4 + 2 * $i); |
4027 | - $this->phpSheet->getCell($columnString.($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4027 | + $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4028 | 4028 | } |
4029 | 4029 | } |
4030 | 4030 | } |
@@ -4072,7 +4072,7 @@ discard block |
||
4072 | 4072 | $value = $string['value']; |
4073 | 4073 | } |
4074 | 4074 | if ($this->readEmptyCells || trim($value) !== '') { |
4075 | - $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
4075 | + $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
4076 | 4076 | $cell->setValueExplicit($value, \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING); |
4077 | 4077 | |
4078 | 4078 | if (!$this->readDataOnly) { |
@@ -4108,7 +4108,7 @@ discard block |
||
4108 | 4108 | |
4109 | 4109 | // add style information |
4110 | 4110 | if (!$this->readDataOnly && $this->readEmptyCells) { |
4111 | - $this->phpSheet->getCell($columnString.($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4111 | + $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4112 | 4112 | } |
4113 | 4113 | } |
4114 | 4114 | } |
@@ -4316,7 +4316,7 @@ discard block |
||
4316 | 4316 | |
4317 | 4317 | if ($this->frozen) { |
4318 | 4318 | // frozen panes |
4319 | - $this->phpSheet->freezePane(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($px).($py + 1)); |
|
4319 | + $this->phpSheet->freezePane(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($px) . ($py + 1)); |
|
4320 | 4320 | } else { |
4321 | 4321 | // unfrozen panes; split windows; not supported by PhpSpreadsheet core |
4322 | 4322 | } |
@@ -4740,7 +4740,7 @@ discard block |
||
4740 | 4740 | |
4741 | 4741 | // offset: var; size: $sz1; formula data for first condition (without size field) |
4742 | 4742 | $formula1 = substr($recordData, $offset, $sz1); |
4743 | - $formula1 = pack('v', $sz1).$formula1; // prepend the length |
|
4743 | + $formula1 = pack('v', $sz1) . $formula1; // prepend the length |
|
4744 | 4744 | try { |
4745 | 4745 | $formula1 = $this->getFormulaFromStructure($formula1); |
4746 | 4746 | |
@@ -4762,7 +4762,7 @@ discard block |
||
4762 | 4762 | |
4763 | 4763 | // offset: var; size: $sz2; formula data for second condition (without size field) |
4764 | 4764 | $formula2 = substr($recordData, $offset, $sz2); |
4765 | - $formula2 = pack('v', $sz2).$formula2; // prepend the length |
|
4765 | + $formula2 = pack('v', $sz2) . $formula2; // prepend the length |
|
4766 | 4766 | try { |
4767 | 4767 | $formula2 = $this->getFormulaFromStructure($formula2); |
4768 | 4768 | } catch (\PhpOffice\PhpSpreadsheet\Exception $e) { |
@@ -5304,7 +5304,7 @@ discard block |
||
5304 | 5304 | $ops[] = array_pop($formulaStrings); |
5305 | 5305 | } |
5306 | 5306 | $ops = array_reverse($ops); |
5307 | - $formulaStrings[] = "$space1$space0{$token['data']['function']}(".implode(',', $ops).')'; |
|
5307 | + $formulaStrings[] = "$space1$space0{$token['data']['function']}(" . implode(',', $ops) . ')'; |
|
5308 | 5308 | unset($space0, $space1); |
5309 | 5309 | } else { |
5310 | 5310 | // add-in function |
@@ -5314,7 +5314,7 @@ discard block |
||
5314 | 5314 | } |
5315 | 5315 | $ops = array_reverse($ops); |
5316 | 5316 | $function = array_pop($formulaStrings); |
5317 | - $formulaStrings[] = "$space1$space0$function(".implode(',', $ops).')'; |
|
5317 | + $formulaStrings[] = "$space1$space0$function(" . implode(',', $ops) . ')'; |
|
5318 | 5318 | unset($space0, $space1); |
5319 | 5319 | } |
5320 | 5320 | break; |
@@ -5325,7 +5325,7 @@ discard block |
||
5325 | 5325 | break; |
5326 | 5326 | case 'tArray': // array constant |
5327 | 5327 | $constantArray = self::readBIFF8ConstantArray($additionalData); |
5328 | - $formulaStrings[] = $space1.$space0.$constantArray['value']; |
|
5328 | + $formulaStrings[] = $space1 . $space0 . $constantArray['value']; |
|
5329 | 5329 | $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data |
5330 | 5330 | unset($space0, $space1); |
5331 | 5331 | break; |
@@ -6639,7 +6639,7 @@ discard block |
||
6639 | 6639 | break; |
6640 | 6640 | // Unknown cases // don't know how to deal with |
6641 | 6641 | default: |
6642 | - throw new Exception('Unrecognized token '.sprintf('%02X', $id).' in formula'); |
|
6642 | + throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula'); |
|
6643 | 6643 | break; |
6644 | 6644 | } |
6645 | 6645 | |
@@ -6670,14 +6670,14 @@ discard block |
||
6670 | 6670 | |
6671 | 6671 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
6672 | 6672 | if (!(0x4000 & self::getInt2d($cellAddressStructure, 2))) { |
6673 | - $column = '$'.$column; |
|
6673 | + $column = '$' . $column; |
|
6674 | 6674 | } |
6675 | 6675 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
6676 | 6676 | if (!(0x8000 & self::getInt2d($cellAddressStructure, 2))) { |
6677 | - $row = '$'.$row; |
|
6677 | + $row = '$' . $row; |
|
6678 | 6678 | } |
6679 | 6679 | |
6680 | - return $column.$row; |
|
6680 | + return $column . $row; |
|
6681 | 6681 | } |
6682 | 6682 | |
6683 | 6683 | /** |
@@ -6706,7 +6706,7 @@ discard block |
||
6706 | 6706 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
6707 | 6707 | if (!(0x4000 & self::getInt2d($cellAddressStructure, 2))) { |
6708 | 6708 | $column = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($colIndex); |
6709 | - $column = '$'.$column; |
|
6709 | + $column = '$' . $column; |
|
6710 | 6710 | } else { |
6711 | 6711 | $colIndex = ($colIndex <= 127) ? $colIndex : $colIndex - 256; |
6712 | 6712 | $column = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($baseCol + $colIndex); |
@@ -6714,13 +6714,13 @@ discard block |
||
6714 | 6714 | |
6715 | 6715 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
6716 | 6716 | if (!(0x8000 & self::getInt2d($cellAddressStructure, 2))) { |
6717 | - $row = '$'.$row; |
|
6717 | + $row = '$' . $row; |
|
6718 | 6718 | } else { |
6719 | 6719 | $rowIndex = ($rowIndex <= 32767) ? $rowIndex : $rowIndex - 65536; |
6720 | 6720 | $row = $baseRow + $rowIndex; |
6721 | 6721 | } |
6722 | 6722 | |
6723 | - return $column.$row; |
|
6723 | + return $column . $row; |
|
6724 | 6724 | } |
6725 | 6725 | |
6726 | 6726 | /** |
@@ -6832,12 +6832,12 @@ discard block |
||
6832 | 6832 | |
6833 | 6833 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
6834 | 6834 | if (!(0x4000 & self::getInt2d($subData, 4))) { |
6835 | - $fc = '$'.$fc; |
|
6835 | + $fc = '$' . $fc; |
|
6836 | 6836 | } |
6837 | 6837 | |
6838 | 6838 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
6839 | 6839 | if (!(0x8000 & self::getInt2d($subData, 4))) { |
6840 | - $fr = '$'.$fr; |
|
6840 | + $fr = '$' . $fr; |
|
6841 | 6841 | } |
6842 | 6842 | |
6843 | 6843 | // offset: 6; size: 2; index to last column or column offset + relative flags |
@@ -6847,12 +6847,12 @@ discard block |
||
6847 | 6847 | |
6848 | 6848 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
6849 | 6849 | if (!(0x4000 & self::getInt2d($subData, 6))) { |
6850 | - $lc = '$'.$lc; |
|
6850 | + $lc = '$' . $lc; |
|
6851 | 6851 | } |
6852 | 6852 | |
6853 | 6853 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
6854 | 6854 | if (!(0x8000 & self::getInt2d($subData, 6))) { |
6855 | - $lr = '$'.$lr; |
|
6855 | + $lr = '$' . $lr; |
|
6856 | 6856 | } |
6857 | 6857 | |
6858 | 6858 | return "$fc$fr:$lc$lr"; |
@@ -6891,7 +6891,7 @@ discard block |
||
6891 | 6891 | if (!(0x4000 & self::getInt2d($subData, 4))) { |
6892 | 6892 | // absolute column index |
6893 | 6893 | $fc = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($fcIndex); |
6894 | - $fc = '$'.$fc; |
|
6894 | + $fc = '$' . $fc; |
|
6895 | 6895 | } else { |
6896 | 6896 | // column offset |
6897 | 6897 | $fcIndex = ($fcIndex <= 127) ? $fcIndex : $fcIndex - 256; |
@@ -6902,7 +6902,7 @@ discard block |
||
6902 | 6902 | if (!(0x8000 & self::getInt2d($subData, 4))) { |
6903 | 6903 | // absolute row index |
6904 | 6904 | $fr = $frIndex + 1; |
6905 | - $fr = '$'.$fr; |
|
6905 | + $fr = '$' . $fr; |
|
6906 | 6906 | } else { |
6907 | 6907 | // row offset |
6908 | 6908 | $frIndex = ($frIndex <= 32767) ? $frIndex : $frIndex - 65536; |
@@ -6920,7 +6920,7 @@ discard block |
||
6920 | 6920 | if (!(0x4000 & self::getInt2d($subData, 6))) { |
6921 | 6921 | // absolute column index |
6922 | 6922 | $lc = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($lcIndex); |
6923 | - $lc = '$'.$lc; |
|
6923 | + $lc = '$' . $lc; |
|
6924 | 6924 | } else { |
6925 | 6925 | // column offset |
6926 | 6926 | $lcIndex = ($lcIndex <= 127) ? $lcIndex : $lcIndex - 256; |
@@ -6931,7 +6931,7 @@ discard block |
||
6931 | 6931 | if (!(0x8000 & self::getInt2d($subData, 6))) { |
6932 | 6932 | // absolute row index |
6933 | 6933 | $lr = $lrIndex + 1; |
6934 | - $lr = '$'.$lr; |
|
6934 | + $lr = '$' . $lr; |
|
6935 | 6935 | } else { |
6936 | 6936 | // row offset |
6937 | 6937 | $lrIndex = ($lrIndex <= 32767) ? $lrIndex : $lrIndex - 65536; |
@@ -7086,7 +7086,7 @@ discard block |
||
7086 | 7086 | } |
7087 | 7087 | $matrixChunks[] = implode(',', $items); // looks like e.g. '1,"hello"' |
7088 | 7088 | } |
7089 | - $matrix = '{'.implode(';', $matrixChunks).'}'; |
|
7089 | + $matrix = '{' . implode(';', $matrixChunks) . '}'; |
|
7090 | 7090 | |
7091 | 7091 | return [ |
7092 | 7092 | 'value' => $matrix, |
@@ -7121,7 +7121,7 @@ discard block |
||
7121 | 7121 | case 0x02: // string value |
7122 | 7122 | // offset: 1; size: var; Unicode string, 16-bit string length |
7123 | 7123 | $string = self::readUnicodeStringLong(substr($valueData, 1)); |
7124 | - $value = '"'.$string['value'].'"'; |
|
7124 | + $value = '"' . $string['value'] . '"'; |
|
7125 | 7125 | $size = 1 + $string['size']; |
7126 | 7126 | break; |
7127 | 7127 | case 0x04: // boolean |
@@ -7309,7 +7309,7 @@ discard block |
||
7309 | 7309 | */ |
7310 | 7310 | private static function UTF8toExcelDoubleQuoted($value) |
7311 | 7311 | { |
7312 | - return '"'.str_replace('"', '""', $value).'"'; |
|
7312 | + return '"' . str_replace('"', '""', $value) . '"'; |
|
7313 | 7313 | } |
7314 | 7314 | |
7315 | 7315 | /** |
@@ -7400,7 +7400,7 @@ discard block |
||
7400 | 7400 | $uncompressedString = ''; |
7401 | 7401 | $strLen = strlen($string); |
7402 | 7402 | for ($i = 0; $i < $strLen; ++$i) { |
7403 | - $uncompressedString .= $string[$i]."\0"; |
|
7403 | + $uncompressedString .= $string[$i] . "\0"; |
|
7404 | 7404 | } |
7405 | 7405 | |
7406 | 7406 | return $uncompressedString; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | { |
166 | 166 | // Open file |
167 | 167 | if (!$this->canRead($pFilename)) { |
168 | - throw new Exception($pFilename.' is an Invalid Spreadsheet file.'); |
|
168 | + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); |
|
169 | 169 | } |
170 | 170 | $this->openFile($pFilename); |
171 | 171 | $fileHandle = $this->fileHandle; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $this->skipBOM(); |
175 | 175 | $this->checkSeparator(); |
176 | 176 | |
177 | - $escapeEnclosures = ['\\'.$this->enclosure, $this->enclosure.$this->enclosure]; |
|
177 | + $escapeEnclosures = ['\\' . $this->enclosure, $this->enclosure . $this->enclosure]; |
|
178 | 178 | |
179 | 179 | $worksheetInfo = []; |
180 | 180 | $worksheetInfo[0]['worksheetName'] = 'Worksheet'; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | |
234 | 234 | // Open file |
235 | 235 | if (!$this->canRead($pFilename)) { |
236 | - throw new Exception($pFilename.' is an Invalid Spreadsheet file.'); |
|
236 | + throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); |
|
237 | 237 | } |
238 | 238 | $this->openFile($pFilename); |
239 | 239 | $fileHandle = $this->fileHandle; |
@@ -249,8 +249,8 @@ discard block |
||
249 | 249 | $sheet = $spreadsheet->setActiveSheetIndex($this->sheetIndex); |
250 | 250 | |
251 | 251 | $escapeEnclosures = [ |
252 | - '\\'.$this->enclosure, |
|
253 | - $this->enclosure.$this->enclosure, |
|
252 | + '\\' . $this->enclosure, |
|
253 | + $this->enclosure . $this->enclosure, |
|
254 | 254 | ]; |
255 | 255 | |
256 | 256 | // Set our starting row based on whether we're in contiguous mode or not |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | // Set cell value |
276 | - $sheet->getCell($columnLetter.$currentRow)->setValue($rowDatum); |
|
276 | + $sheet->getCell($columnLetter . $currentRow)->setValue($rowDatum); |
|
277 | 277 | } |
278 | 278 | ++$columnLetter; |
279 | 279 | } |