Completed
Pull Request — develop (#47)
by
unknown
10:56
created
src/PhpSpreadsheet/Reader/Xls.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/CSV.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xlsx.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         // Check if file exists
66 66
         if (!file_exists($pFilename)) {
67
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
67
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
68 68
         }
69 69
 
70 70
         $zipClass = \PhpOffice\PhpSpreadsheet\Settings::getZipClass();
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         // Check if file exists
116 116
         if (!file_exists($pFilename)) {
117
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
117
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
118 118
         }
119 119
 
120 120
         $worksheetNames = [];
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     {
169 169
         // Check if file exists
170 170
         if (!file_exists($pFilename)) {
171
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
171
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
172 172
         }
173 173
 
174 174
         $worksheetInfo = [];
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                 $relsWorkbook = simplexml_load_string(
191 191
                     //~ http://schemas.openxmlformats.org/package/2006/relationships"
192 192
                     $this->securityScan(
193
-                        $this->getFromZipArchive($zip, "$dir/_rels/".basename($rel['Target']).'.rels')
193
+                        $this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel['Target']) . '.rels')
194 194
                     ),
195 195
                     'SimpleXMLElement',
196 196
                     \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                         $xml = new \XMLReader();
229 229
                         $res = $xml->xml(
230 230
                             $this->securityScanFile(
231
-                                'zip://'.\PhpOffice\PhpSpreadsheet\Shared\File::realpath($pFilename).'#'."$dir/$fileWorksheet"
231
+                                'zip://' . \PhpOffice\PhpSpreadsheet\Shared\File::realpath($pFilename) . '#' . "$dir/$fileWorksheet"
232 232
                             ),
233 233
                             null,
234 234
                             \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
     {
350 350
         // Check if file exists
351 351
         if (!file_exists($pFilename)) {
352
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
352
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
353 353
         }
354 354
 
355 355
         // Initialisations
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                     $dir = dirname($rel['Target']);
492 492
                     $relsWorkbook = simplexml_load_string(
493 493
                         //~ http://schemas.openxmlformats.org/package/2006/relationships"
494
-                        $this->securityScan($this->getFromZipArchive($zip, "$dir/_rels/".basename($rel['Target']).'.rels')),
494
+                        $this->securityScan($this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel['Target']) . '.rels')),
495 495
                         'SimpleXMLElement',
496 496
                         \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
497 497
                     );
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
                             $aKeys = ['sheet', 'objects', 'scenarios', 'formatCells', 'formatColumns', 'formatRows', 'insertColumns', 'insertRows', 'insertHyperlinks', 'deleteColumns', 'deleteRows', 'selectLockedCells', 'sort', 'autoFilter', 'pivotTables', 'selectUnlockedCells'];
1016 1016
                             if (!$this->readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) {
1017 1017
                                 foreach ($aKeys as $key) {
1018
-                                    $method = 'set'.ucfirst($key);
1018
+                                    $method = 'set' . ucfirst($key);
1019 1019
                                     $docSheet->getProtection()->$method(self::boolean((string) $xmlSheet->sheetProtection[$key]));
1020 1020
                                 }
1021 1021
                             }
@@ -1218,7 +1218,7 @@  discard block
 block discarded – undo
1218 1218
                             if ($xmlSheet && $xmlSheet->colBreaks && $xmlSheet->colBreaks->brk && !$this->readDataOnly) {
1219 1219
                                 foreach ($xmlSheet->colBreaks->brk as $brk) {
1220 1220
                                     if ($brk['man']) {
1221
-                                        $docSheet->setBreak(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $brk['id']).'1', \PhpOffice\PhpSpreadsheet\Worksheet::BREAK_COLUMN);
1221
+                                        $docSheet->setBreak(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $brk['id']) . '1', \PhpOffice\PhpSpreadsheet\Worksheet::BREAK_COLUMN);
1222 1222
                                     }
1223 1223
                                 }
1224 1224
                             }
@@ -1257,11 +1257,11 @@  discard block
 block discarded – undo
1257 1257
                             $hyperlinks = [];
1258 1258
                             if (!$this->readDataOnly) {
1259 1259
                                 // Locate hyperlink relations
1260
-                                if ($zip->locateName(dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')) {
1260
+                                if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) {
1261 1261
                                     $relsWorksheet = simplexml_load_string(
1262 1262
                                         //~ http://schemas.openxmlformats.org/package/2006/relationships"
1263 1263
                                         $this->securityScan(
1264
-                                            $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')
1264
+                                            $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')
1265 1265
                                         ),
1266 1266
                                         'SimpleXMLElement',
1267 1267
                                         \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -1284,11 +1284,11 @@  discard block
 block discarded – undo
1284 1284
                                             if (isset($linkRel['id'])) {
1285 1285
                                                 $hyperlinkUrl = $hyperlinks[(string) $linkRel['id']];
1286 1286
                                                 if (isset($hyperlink['location'])) {
1287
-                                                    $hyperlinkUrl .= '#'.(string) $hyperlink['location'];
1287
+                                                    $hyperlinkUrl .= '#' . (string) $hyperlink['location'];
1288 1288
                                                 }
1289 1289
                                                 $cell->getHyperlink()->setUrl($hyperlinkUrl);
1290 1290
                                             } elseif (isset($hyperlink['location'])) {
1291
-                                                $cell->getHyperlink()->setUrl('sheet://'.(string) $hyperlink['location']);
1291
+                                                $cell->getHyperlink()->setUrl('sheet://' . (string) $hyperlink['location']);
1292 1292
                                             }
1293 1293
 
1294 1294
                                             // Tooltip
@@ -1305,11 +1305,11 @@  discard block
 block discarded – undo
1305 1305
                             $vmlComments = [];
1306 1306
                             if (!$this->readDataOnly) {
1307 1307
                                 // Locate comment relations
1308
-                                if ($zip->locateName(dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')) {
1308
+                                if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) {
1309 1309
                                     $relsWorksheet = simplexml_load_string(
1310 1310
                                         //~ http://schemas.openxmlformats.org/package/2006/relationships"
1311 1311
                                         $this->securityScan(
1312
-                                            $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')
1312
+                                            $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')
1313 1313
                                         ),
1314 1314
                                         'SimpleXMLElement',
1315 1315
                                         \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
                                 // Loop through comments
1328 1328
                                 foreach ($comments as $relName => $relPath) {
1329 1329
                                     // Load comments file
1330
-                                    $relPath = \PhpOffice\PhpSpreadsheet\Shared\File::realpath(dirname("$dir/$fileWorksheet").'/'.$relPath);
1330
+                                    $relPath = \PhpOffice\PhpSpreadsheet\Shared\File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath);
1331 1331
                                     $commentsFile = simplexml_load_string(
1332 1332
                                         $this->securityScan($this->getFromZipArchive($zip, $relPath)),
1333 1333
                                         'SimpleXMLElement',
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
                                 // Loop through VML comments
1355 1355
                                 foreach ($vmlComments as $relName => $relPath) {
1356 1356
                                     // Load VML comments file
1357
-                                    $relPath = \PhpOffice\PhpSpreadsheet\Shared\File::realpath(dirname("$dir/$fileWorksheet").'/'.$relPath);
1357
+                                    $relPath = \PhpOffice\PhpSpreadsheet\Shared\File::realpath(dirname("$dir/$fileWorksheet") . '/' . $relPath);
1358 1358
                                     $vmlCommentsFile = simplexml_load_string(
1359 1359
                                         $this->securityScan($this->getFromZipArchive($zip, $relPath)),
1360 1360
                                         'SimpleXMLElement',
@@ -1422,11 +1422,11 @@  discard block
 block discarded – undo
1422 1422
 
1423 1423
                                 // Header/footer images
1424 1424
                                 if ($xmlSheet && $xmlSheet->legacyDrawingHF && !$this->readDataOnly) {
1425
-                                    if ($zip->locateName(dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')) {
1425
+                                    if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) {
1426 1426
                                         $relsWorksheet = simplexml_load_string(
1427 1427
                                             //~ http://schemas.openxmlformats.org/package/2006/relationships"
1428 1428
                                             $this->securityScan(
1429
-                                                $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')
1429
+                                                $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')
1430 1430
                                             ),
1431 1431
                                             'SimpleXMLElement',
1432 1432
                                             \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
                                             $relsVML = simplexml_load_string(
1445 1445
                                                 //~ http://schemas.openxmlformats.org/package/2006/relationships"
1446 1446
                                                 $this->securityScan(
1447
-                                                    $this->getFromZipArchive($zip, dirname($vmlRelationship).'/_rels/'.basename($vmlRelationship).'.rels')
1447
+                                                    $this->getFromZipArchive($zip, dirname($vmlRelationship) . '/_rels/' . basename($vmlRelationship) . '.rels')
1448 1448
                                                 ),
1449 1449
                                                 'SimpleXMLElement',
1450 1450
                                                 \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -1480,7 +1480,7 @@  discard block
 block discarded – undo
1480 1480
                                                     $hfImages[(string) $shape['id']]->setName((string) $imageData['title']);
1481 1481
                                                 }
1482 1482
 
1483
-                                                $hfImages[(string) $shape['id']]->setPath('zip://'.\PhpOffice\PhpSpreadsheet\Shared_File::realpath($pFilename).'#'.$drawings[(string) $imageData['relid']], false);
1483
+                                                $hfImages[(string) $shape['id']]->setPath('zip://' . \PhpOffice\PhpSpreadsheet\Shared_File::realpath($pFilename) . '#' . $drawings[(string) $imageData['relid']], false);
1484 1484
                                                 $hfImages[(string) $shape['id']]->setResizeProportional(false);
1485 1485
                                                 $hfImages[(string) $shape['id']]->setWidth($style['width']);
1486 1486
                                                 $hfImages[(string) $shape['id']]->setHeight($style['height']);
@@ -1498,11 +1498,11 @@  discard block
 block discarded – undo
1498 1498
                             }
1499 1499
 
1500 1500
                             // TODO: Autoshapes from twoCellAnchors!
1501
-                            if ($zip->locateName(dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')) {
1501
+                            if ($zip->locateName(dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')) {
1502 1502
                                 $relsWorksheet = simplexml_load_string(
1503 1503
                                     //~ http://schemas.openxmlformats.org/package/2006/relationships"
1504 1504
                                     $this->securityScan(
1505
-                                        $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet").'/_rels/'.basename($fileWorksheet).'.rels')
1505
+                                        $this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . '/_rels/' . basename($fileWorksheet) . '.rels')
1506 1506
                                     ),
1507 1507
                                     'SimpleXMLElement',
1508 1508
                                     \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
                                         $relsDrawing = simplexml_load_string(
1520 1520
                                             //~ http://schemas.openxmlformats.org/package/2006/relationships"
1521 1521
                                             $this->securityScan(
1522
-                                                $this->getFromZipArchive($zip, dirname($fileDrawing).'/_rels/'.basename($fileDrawing).'.rels')
1522
+                                                $this->getFromZipArchive($zip, dirname($fileDrawing) . '/_rels/' . basename($fileDrawing) . '.rels')
1523 1523
                                             ),
1524 1524
                                             'SimpleXMLElement',
1525 1525
                                             \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions()
@@ -1556,14 +1556,14 @@  discard block
 block discarded – undo
1556 1556
                                                     $objDrawing->setName((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name'));
1557 1557
                                                     $objDrawing->setDescription((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'descr'));
1558 1558
                                                     $objDrawing->setPath(
1559
-                                                        'zip://'.\PhpOffice\PhpSpreadsheet\Shared\File::realpath($pFilename).'#'.
1559
+                                                        'zip://' . \PhpOffice\PhpSpreadsheet\Shared\File::realpath($pFilename) . '#' .
1560 1560
                                                         $images[(string) self::getArrayItem(
1561 1561
                                                             $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'),
1562 1562
                                                             'embed'
1563 1563
                                                         )],
1564 1564
                                                         false
1565 1565
                                                     );
1566
-                                                    $objDrawing->setCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col).($oneCellAnchor->from->row + 1));
1566
+                                                    $objDrawing->setCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col) . ($oneCellAnchor->from->row + 1));
1567 1567
                                                     $objDrawing->setOffsetX(\PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($oneCellAnchor->from->colOff));
1568 1568
                                                     $objDrawing->setOffsetY(\PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($oneCellAnchor->from->rowOff));
1569 1569
                                                     $objDrawing->setResizeProportional(false);
@@ -1585,7 +1585,7 @@  discard block
 block discarded – undo
1585 1585
                                                     $objDrawing->setWorksheet($docSheet);
1586 1586
                                                 } else {
1587 1587
                                                     //    ? Can charts be positioned with a oneCellAnchor ?
1588
-                                                    $coordinates = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col).($oneCellAnchor->from->row + 1);
1588
+                                                    $coordinates = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col) . ($oneCellAnchor->from->row + 1);
1589 1589
                                                     $offsetX = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($oneCellAnchor->from->colOff);
1590 1590
                                                     $offsetY = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($oneCellAnchor->from->rowOff);
1591 1591
                                                     $width = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), 'cx'));
@@ -1603,14 +1603,14 @@  discard block
 block discarded – undo
1603 1603
                                                     $objDrawing->setName((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'name'));
1604 1604
                                                     $objDrawing->setDescription((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), 'descr'));
1605 1605
                                                     $objDrawing->setPath(
1606
-                                                        'zip://'.\PhpOffice\PhpSpreadsheet\Shared\File::realpath($pFilename).'#'.
1606
+                                                        'zip://' . \PhpOffice\PhpSpreadsheet\Shared\File::realpath($pFilename) . '#' .
1607 1607
                                                         $images[(string) self::getArrayItem(
1608 1608
                                                             $blip->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'),
1609 1609
                                                             'embed'
1610 1610
                                                         )],
1611 1611
                                                         false
1612 1612
                                                     );
1613
-                                                    $objDrawing->setCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col).($twoCellAnchor->from->row + 1));
1613
+                                                    $objDrawing->setCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1));
1614 1614
                                                     $objDrawing->setOffsetX(\PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($twoCellAnchor->from->colOff));
1615 1615
                                                     $objDrawing->setOffsetY(\PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($twoCellAnchor->from->rowOff));
1616 1616
                                                     $objDrawing->setResizeProportional(false);
@@ -1632,17 +1632,17 @@  discard block
 block discarded – undo
1632 1632
                                                     }
1633 1633
                                                     $objDrawing->setWorksheet($docSheet);
1634 1634
                                                 } elseif (($this->includeCharts) && ($twoCellAnchor->graphicFrame)) {
1635
-                                                    $fromCoordinate = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col).($twoCellAnchor->from->row + 1);
1635
+                                                    $fromCoordinate = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1);
1636 1636
                                                     $fromOffsetX = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($twoCellAnchor->from->colOff);
1637 1637
                                                     $fromOffsetY = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($twoCellAnchor->from->rowOff);
1638
-                                                    $toCoordinate = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $twoCellAnchor->to->col).($twoCellAnchor->to->row + 1);
1638
+                                                    $toCoordinate = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex((string) $twoCellAnchor->to->col) . ($twoCellAnchor->to->row + 1);
1639 1639
                                                     $toOffsetX = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($twoCellAnchor->to->colOff);
1640 1640
                                                     $toOffsetY = \PhpOffice\PhpSpreadsheet\Shared\Drawing::EMUToPixels($twoCellAnchor->to->rowOff);
1641 1641
                                                     $graphic = $twoCellAnchor->graphicFrame->children('http://schemas.openxmlformats.org/drawingml/2006/main')->graphic;
1642 1642
                                                     $chartRef = $graphic->graphicData->children('http://schemas.openxmlformats.org/drawingml/2006/chart')->chart;
1643 1643
                                                     $thisChart = (string) $chartRef->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships');
1644 1644
 
1645
-                                                    $chartDetails[$docSheet->getTitle().'!'.$thisChart] = [
1645
+                                                    $chartDetails[$docSheet->getTitle() . '!' . $thisChart] = [
1646 1646
                                                         'fromCoordinate' => $fromCoordinate,
1647 1647
                                                         'fromOffsetX' => $fromOffsetX,
1648 1648
                                                         'fromOffsetY' => $fromOffsetY,
@@ -1664,7 +1664,7 @@  discard block
 block discarded – undo
1664 1664
                                     // Extract range
1665 1665
                                     $extractedRange = (string) $definedName;
1666 1666
                                     if (($spos = strpos($extractedRange, '!')) !== false) {
1667
-                                        $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos));
1667
+                                        $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));
1668 1668
                                     } else {
1669 1669
                                         $extractedRange = str_replace('$', '', $extractedRange);
1670 1670
                                     }
@@ -1714,7 +1714,7 @@  discard block
 block discarded – undo
1714 1714
                                                     $range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark?
1715 1715
                                                     $rangeSet = isset($range[1]) ? $range[1] : $range[0];
1716 1716
                                                     if (strpos($rangeSet, ':') === false) {
1717
-                                                        $rangeSet = $rangeSet.':'.$rangeSet;
1717
+                                                        $rangeSet = $rangeSet . ':' . $rangeSet;
1718 1718
                                                     }
1719 1719
                                                     $newRangeSets[] = str_replace('$', '', $rangeSet);
1720 1720
                                                 }
@@ -1738,7 +1738,7 @@  discard block
 block discarded – undo
1738 1738
                                 // Extract range
1739 1739
                                 $extractedRange = (string) $definedName;
1740 1740
                                 if (($spos = strpos($extractedRange, '!')) !== false) {
1741
-                                    $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos));
1741
+                                    $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));
1742 1742
                                 } else {
1743 1743
                                     $extractedRange = str_replace('$', '', $extractedRange);
1744 1744
                                 }
@@ -1838,7 +1838,7 @@  discard block
 block discarded – undo
1838 1838
                             $objChart = \PhpOffice\PhpSpreadsheet\Reader\Xlsx\Chart::readChart($chartElements, basename($chartEntryRef, '.xml'));
1839 1839
 
1840 1840
                             if (isset($charts[$chartEntryRef])) {
1841
-                                $chartPositionRef = $charts[$chartEntryRef]['sheet'].'!'.$charts[$chartEntryRef]['id'];
1841
+                                $chartPositionRef = $charts[$chartEntryRef]['sheet'] . '!' . $charts[$chartEntryRef]['id'];
1842 1842
                                 if (isset($chartDetails[$chartPositionRef])) {
1843 1843
                                     $excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart);
1844 1844
                                     $objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet']));
@@ -1870,7 +1870,7 @@  discard block
 block discarded – undo
1870 1870
                     $returnColour = \PhpOffice\PhpSpreadsheet\Style\Color::changeBrightness($returnColour, $tintAdjust);
1871 1871
                 }
1872 1872
 
1873
-                return 'FF'.$returnColour;
1873
+                return 'FF' . $returnColour;
1874 1874
             }
1875 1875
         }
1876 1876
 
@@ -2089,7 +2089,7 @@  discard block
 block discarded – undo
2089 2089
         $customUIImagesNames = [];
2090 2090
         $customUIImagesBinaries = [];
2091 2091
         // something like customUI/_rels/customUI.xml.rels
2092
-        $pathRels = $baseDir.'/_rels/'.$nameCustomUI.'.rels';
2092
+        $pathRels = $baseDir . '/_rels/' . $nameCustomUI . '.rels';
2093 2093
         $dataRels = $this->getFromZipArchive($zip, $pathRels);
2094 2094
         if ($dataRels) {
2095 2095
             // exists and not empty if the ribbon have some pictures (other than internal MSO)
@@ -2104,7 +2104,7 @@  discard block
 block discarded – undo
2104 2104
                     if ($ele['Type'] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') {
2105 2105
                         // an image ?
2106 2106
                         $customUIImagesNames[(string) $ele['Id']] = (string) $ele['Target'];
2107
-                        $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir.'/'.(string) $ele['Target']);
2107
+                        $customUIImagesBinaries[(string) $ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']);
2108 2108
                     }
2109 2109
                 }
2110 2110
             }
@@ -2129,7 +2129,7 @@  discard block
 block discarded – undo
2129 2129
 
2130 2130
     private static function dirAdd($base, $add)
2131 2131
     {
2132
-        return preg_replace('~[^/]+/\.\./~', '', dirname($base)."/$add");
2132
+        return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add");
2133 2133
     }
2134 2134
 
2135 2135
     private static function toCSSArray($style)
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Gnumeric.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         // Check if file exists
71 71
         if (!file_exists($pFilename)) {
72
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
72
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
73 73
         }
74 74
 
75 75
         // Check if gzlib functions are available
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $data = fread($fh, 2);
83 83
         fclose($fh);
84 84
 
85
-        if ($data != chr(0x1F).chr(0x8B)) {
85
+        if ($data != chr(0x1F) . chr(0x8B)) {
86 86
             return false;
87 87
         }
88 88
 
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
     {
101 101
         // Check if file exists
102 102
         if (!file_exists($pFilename)) {
103
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
103
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
104 104
         }
105 105
 
106 106
         $xml = new XMLReader();
107
-        $xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions());
107
+        $xml->xml($this->securityScanFile('compress.zlib://' . realpath($pFilename)), null, \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions());
108 108
         $xml->setParserProperty(2, true);
109 109
 
110 110
         $worksheetNames = [];
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
     {
133 133
         // Check if file exists
134 134
         if (!file_exists($pFilename)) {
135
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
135
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
136 136
         }
137 137
 
138 138
         $xml = new XMLReader();
139
-        $xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions());
139
+        $xml->xml($this->securityScanFile('compress.zlib://' . realpath($pFilename)), null, \PhpOffice\PhpSpreadsheet\Settings::getLibXmlLoaderOptions());
140 140
         $xml->setParserProperty(2, true);
141 141
 
142 142
         $worksheetInfo = [];
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     {
222 222
         // Check if file exists
223 223
         if (!file_exists($pFilename)) {
224
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
224
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
225 225
         }
226 226
 
227 227
         $timezoneObj = new DateTimeZone('Europe/London');
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                         case '80':        //    Array
457 457
                     }
458 458
                 }
459
-                $spreadsheet->getActiveSheet()->getCell($column.$row)->setValueExplicit($cell, $type);
459
+                $spreadsheet->getActiveSheet()->getCell($column . $row)->setValueExplicit($cell, $type);
460 460
             }
461 461
 
462 462
             if ((!$this->readDataOnly) && (isset($sheet->Objects))) {
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
                     $endColumn = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($endColumn);
480 480
                     $endRow = ($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow'];
481 481
                     $endRow += 1;
482
-                    $cellRange = $startColumn.$startRow.':'.$endColumn.$endRow;
482
+                    $cellRange = $startColumn . $startRow . ':' . $endColumn . $endRow;
483 483
 
484 484
                     $styleAttributes = $styleRegion->Style->attributes();
485 485
 
@@ -832,6 +832,6 @@  discard block
 block discarded – undo
832 832
         $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2);
833 833
         $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2);
834 834
 
835
-        return $gnmR.$gnmG.$gnmB;
835
+        return $gnmR . $gnmG . $gnmB;
836 836
     }
837 837
 }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Excel2003XML.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
     {
116 116
         // Check if file exists
117 117
         if (!file_exists($pFilename)) {
118
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
118
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
119 119
         }
120 120
         if (!$this->canRead($pFilename)) {
121
-            throw new Exception($pFilename.' is an Invalid Spreadsheet file.');
121
+            throw new Exception($pFilename . ' is an Invalid Spreadsheet file.');
122 122
         }
123 123
 
124 124
         $worksheetNames = [];
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         // Check if file exists
152 152
         if (!file_exists($pFilename)) {
153
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
153
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
154 154
         }
155 155
 
156 156
         $worksheetInfo = [];
@@ -327,11 +327,11 @@  discard block
 block discarded – undo
327 327
 
328 328
         // Check if file exists
329 329
         if (!file_exists($pFilename)) {
330
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
330
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
331 331
         }
332 332
 
333 333
         if (!$this->canRead($pFilename)) {
334
-            throw new Exception($pFilename.' is an Invalid Spreadsheet file.');
334
+            throw new Exception($pFilename . ' is an Invalid Spreadsheet file.');
335 335
         }
336 336
 
337 337
         $xml = simplexml_load_string(
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
                         if (isset($cell_ss['Index'])) {
579 579
                             $columnID = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($cell_ss['Index'] - 1);
580 580
                         }
581
-                        $cellRange = $columnID.$rowID;
581
+                        $cellRange = $columnID . $rowID;
582 582
 
583 583
                         if ($this->getReadFilter() !== null) {
584 584
                             if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) {
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
                             if (isset($cell_ss['MergeDown'])) {
597 597
                                 $rowTo = $rowTo + $cell_ss['MergeDown'];
598 598
                             }
599
-                            $cellRange .= ':'.$columnTo.$rowTo;
599
+                            $cellRange .= ':' . $columnTo . $rowTo;
600 600
                             $spreadsheet->getActiveSheet()->mergeCells($cellRange);
601 601
                         }
602 602
 
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
                                                 if ($columnReference{0} == '[') {
698 698
                                                     $columnReference = $columnNumber + trim($columnReference, '[]');
699 699
                                                 }
700
-                                                $A1CellReference = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($columnReference - 1).$rowReference;
700
+                                                $A1CellReference = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($columnReference - 1) . $rowReference;
701 701
                                                 $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));
702 702
                                             }
703 703
                                         }
@@ -708,9 +708,9 @@  discard block
 block discarded – undo
708 708
                                 $cellDataFormula = implode('"', $temp);
709 709
                             }
710 710
 
711
-                            $spreadsheet->getActiveSheet()->getCell($columnID.$rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type);
711
+                            $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type);
712 712
                             if ($hasCalculatedValue) {
713
-                                $spreadsheet->getActiveSheet()->getCell($columnID.$rowID)->setCalculatedValue($cellValue);
713
+                                $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setCalculatedValue($cellValue);
714 714
                             }
715 715
                             $cellIsSet = $rowHasData = true;
716 716
                         }
@@ -723,14 +723,14 @@  discard block
 block discarded – undo
723 723
                             }
724 724
                             $node = $cell->Comment->Data->asXML();
725 725
                             $annotation = strip_tags($node);
726
-                            $spreadsheet->getActiveSheet()->getComment($columnID.$rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation));
726
+                            $spreadsheet->getActiveSheet()->getComment($columnID . $rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation));
727 727
                         }
728 728
 
729 729
                         if (($cellIsSet) && (isset($cell_ss['StyleID']))) {
730 730
                             $style = (string) $cell_ss['StyleID'];
731 731
                             if ((isset($this->styles[$style])) && (!empty($this->styles[$style]))) {
732
-                                if (!$spreadsheet->getActiveSheet()->cellExists($columnID.$rowID)) {
733
-                                    $spreadsheet->getActiveSheet()->getCell($columnID.$rowID)->setValue(null);
732
+                                if (!$spreadsheet->getActiveSheet()->cellExists($columnID . $rowID)) {
733
+                                    $spreadsheet->getActiveSheet()->getCell($columnID . $rowID)->setValue(null);
734 734
                                 }
735 735
                                 $spreadsheet->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styles[$style]);
736 736
                             }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/BaseReader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -239,13 +239,13 @@  discard block
 block discarded – undo
239 239
     {
240 240
         // Check if file exists
241 241
         if (!file_exists($pFilename) || !is_readable($pFilename)) {
242
-            throw new Exception('Could not open '.$pFilename.' for reading! File does not exist.');
242
+            throw new Exception('Could not open ' . $pFilename . ' for reading! File does not exist.');
243 243
         }
244 244
 
245 245
         // Open file
246 246
         $this->fileHandle = fopen($pFilename, 'r');
247 247
         if ($this->fileHandle === false) {
248
-            throw new Exception('Could not open file '.$pFilename.' for reading.');
248
+            throw new Exception('Could not open file ' . $pFilename . ' for reading.');
249 249
         }
250 250
     }
251 251
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function securityScan($xml)
260 260
     {
261
-        $pattern = '/\\0?'.implode('\\0?', str_split('<!DOCTYPE')).'\\0?/';
261
+        $pattern = '/\\0?' . implode('\\0?', str_split('<!DOCTYPE')) . '\\0?/';
262 262
         if (preg_match($pattern, $xml)) {
263 263
             throw new Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks');
264 264
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/SYLK.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         // Open file
133 133
         if (!$this->canRead($pFilename)) {
134
-            throw new Exception($pFilename.' is an Invalid Spreadsheet file.');
134
+            throw new Exception($pFilename . ' is an Invalid Spreadsheet file.');
135 135
         }
136 136
         $this->openFile($pFilename);
137 137
         $fileHandle = $this->fileHandle;
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     {
222 222
         // Open file
223 223
         if (!$this->canRead($pFilename)) {
224
-            throw new Exception($pFilename.' is an Invalid Spreadsheet file.');
224
+            throw new Exception($pFilename . ' is an Invalid Spreadsheet file.');
225 225
         }
226 226
         $this->openFile($pFilename);
227 227
         $fileHandle = $this->fileHandle;
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
                             break;
293 293
                     }
294 294
                 }
295
-                $this->formats['P'.$this->format++] = $formatArray;
295
+                $this->formats['P' . $this->format++] = $formatArray;
296 296
             //    Read cell value data
297 297
             } elseif ($dataType == 'C') {
298 298
                 $hasCalculatedValue = false;
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                             $cellData = substr($rowDatum, 1);
312 312
                             break;
313 313
                         case 'E':
314
-                            $cellDataFormula = '='.substr($rowDatum, 1);
314
+                            $cellDataFormula = '=' . substr($rowDatum, 1);
315 315
                             //    Convert R1C1 style references to A1 style references (but only when not quoted)
316 316
                             $temp = explode('"', $cellDataFormula);
317 317
                             $key = false;
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
                                         if ($columnReference{0} == '[') {
345 345
                                             $columnReference = $column + trim($columnReference, '[]');
346 346
                                         }
347
-                                        $A1CellReference = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($columnReference - 1).$rowReference;
347
+                                        $A1CellReference = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($columnReference - 1) . $rowReference;
348 348
 
349 349
                                         $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0]));
350 350
                                     }
@@ -361,10 +361,10 @@  discard block
 block discarded – undo
361 361
                 $cellData = \PhpOffice\PhpSpreadsheet\Calculation::unwrapResult($cellData);
362 362
 
363 363
                 // Set cell value
364
-                $spreadsheet->getActiveSheet()->getCell($columnLetter.$row)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData);
364
+                $spreadsheet->getActiveSheet()->getCell($columnLetter . $row)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData);
365 365
                 if ($hasCalculatedValue) {
366 366
                     $cellData = \PhpOffice\PhpSpreadsheet\Calculation::unwrapResult($cellData);
367
-                    $spreadsheet->getActiveSheet()->getCell($columnLetter.$row)->setCalculatedValue($cellData);
367
+                    $spreadsheet->getActiveSheet()->getCell($columnLetter . $row)->setCalculatedValue($cellData);
368 368
                 }
369 369
             //    Read cell formatting
370 370
             } elseif ($dataType == 'F') {
@@ -416,12 +416,12 @@  discard block
 block discarded – undo
416 416
                 if (($formatStyle > '') && ($column > '') && ($row > '')) {
417 417
                     $columnLetter = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column - 1);
418 418
                     if (isset($this->formats[$formatStyle])) {
419
-                        $spreadsheet->getActiveSheet()->getStyle($columnLetter.$row)->applyFromArray($this->formats[$formatStyle]);
419
+                        $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->formats[$formatStyle]);
420 420
                     }
421 421
                 }
422 422
                 if ((!empty($styleData)) && ($column > '') && ($row > '')) {
423 423
                     $columnLetter = \PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($column - 1);
424
-                    $spreadsheet->getActiveSheet()->getStyle($columnLetter.$row)->applyFromArray($styleData);
424
+                    $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($styleData);
425 425
                 }
426 426
                 if ($columnWidth > '') {
427 427
                     if ($startCol == $endCol) {
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/HTML.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -265,13 +265,13 @@  discard block
 block discarded – undo
265 265
                 //    Only actually write it if there's content in the string
266 266
                 //    Write to worksheet to be done here...
267 267
                 //    ... we return the cell so we can mess about with styles more easily
268
-                $sheet->setCellValue($column.$row, $cellContent, true);
268
+                $sheet->setCellValue($column . $row, $cellContent, true);
269 269
                 $this->dataArray[$row][$column] = $cellContent;
270 270
             }
271 271
         } else {
272 272
             //    We have a Rich Text run
273 273
             //    TODO
274
-            $this->dataArray[$row][$column] = 'RICH TEXT: '.$cellContent;
274
+            $this->dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent;
275 275
         }
276 276
         $cellContent = (string) '';
277 277
     }
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
                         $this->flushCell($sheet, $column, $row, $cellContent);
338 338
                         ++$row;
339 339
                         if (isset($this->formats[$child->nodeName])) {
340
-                            $sheet->getStyle($column.$row)->applyFromArray($this->formats[$child->nodeName]);
340
+                            $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]);
341 341
                         } else {
342 342
                             $cellContent = '----------';
343 343
                             $this->flushCell($sheet, $column, $row, $cellContent);
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
                         foreach ($attributeArray as $attributeName => $attributeValue) {
359 359
                             switch ($attributeName) {
360 360
                                 case 'href':
361
-                                    $sheet->getCell($column.$row)->getHyperlink()->setUrl($attributeValue);
361
+                                    $sheet->getCell($column . $row)->getHyperlink()->setUrl($attributeValue);
362 362
                                     if (isset($this->formats[$child->nodeName])) {
363
-                                        $sheet->getStyle($column.$row)->applyFromArray($this->formats[$child->nodeName]);
363
+                                        $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]);
364 364
                                     }
365 365
                                     break;
366 366
                             }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
                             $this->flushCell($sheet, $column, $row, $cellContent);
391 391
 
392 392
                             if (isset($this->formats[$child->nodeName])) {
393
-                                $sheet->getStyle($column.$row)->applyFromArray($this->formats[$child->nodeName]);
393
+                                $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]);
394 394
                             }
395 395
 
396 396
                             ++$row;
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
                     case 'td':
441 441
                         $this->processDomElement($child, $sheet, $row, $column, $cellContent);
442 442
 
443
-                        while (isset($this->rowspan[$column.$row])) {
443
+                        while (isset($this->rowspan[$column . $row])) {
444 444
                             ++$column;
445 445
                         }
446 446
 
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
                             for ($i = 0; $i < $attributeArray['colspan'] - 1; ++$i) {
453 453
                                 ++$columnTo;
454 454
                             }
455
-                            $range = $column.$row.':'.$columnTo.($row + $attributeArray['rowspan'] - 1);
455
+                            $range = $column . $row . ':' . $columnTo . ($row + $attributeArray['rowspan'] - 1);
456 456
                             foreach (\PhpOffice\PhpSpreadsheet\Cell::extractAllCellReferencesInRange($range) as $value) {
457 457
                                 $this->rowspan[$value] = true;
458 458
                             }
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
                             $column = $columnTo;
461 461
                         } elseif (isset($attributeArray['rowspan'])) {
462 462
                             //create merging rowspan
463
-                            $range = $column.$row.':'.$column.($row + $attributeArray['rowspan'] - 1);
463
+                            $range = $column . $row . ':' . $column . ($row + $attributeArray['rowspan'] - 1);
464 464
                             foreach (\PhpOffice\PhpSpreadsheet\Cell::extractAllCellReferencesInRange($range) as $value) {
465 465
                                 $this->rowspan[$value] = true;
466 466
                             }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
                             for ($i = 0; $i < $attributeArray['colspan'] - 1; ++$i) {
472 472
                                 ++$columnTo;
473 473
                             }
474
-                            $sheet->mergeCells($column.$row.':'.$columnTo.$row);
474
+                            $sheet->mergeCells($column . $row . ':' . $columnTo . $row);
475 475
                             $column = $columnTo;
476 476
                         }
477 477
                         ++$column;
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
     {
505 505
         // Validate
506 506
         if (!$this->canRead($pFilename)) {
507
-            throw new Exception($pFilename.' is an Invalid HTML file.');
507
+            throw new Exception($pFilename . ' is an Invalid HTML file.');
508 508
         }
509 509
 
510 510
         // Create new sheet
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
         //    Reload the HTML file into the DOM object
519 519
         $loaded = $dom->loadHTML(mb_convert_encoding($this->securityScanFile($pFilename), 'HTML-ENTITIES', 'UTF-8'));
520 520
         if ($loaded === false) {
521
-            throw new Exception('Failed to load '.$pFilename.' as a DOM Document');
521
+            throw new Exception('Failed to load ' . $pFilename . ' as a DOM Document');
522 522
         }
523 523
 
524 524
         //    Discard white space
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      */
567 567
     public function securityScan($xml)
568 568
     {
569
-        $pattern = '/\\0?'.implode('\\0?', str_split('<!ENTITY')).'\\0?/';
569
+        $pattern = '/\\0?' . implode('\\0?', str_split('<!ENTITY')) . '\\0?/';
570 570
         if (preg_match($pattern, $xml)) {
571 571
             throw new Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks');
572 572
         }
Please login to merge, or discard this patch.
src/PhpSpreadsheet/Reader/Xls/Escher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
         $endOffsetY = \PhpOffice\PhpSpreadsheet\Reader\Xls::getInt2d($recordData, 16);
594 594
 
595 595
         // set the start coordinates
596
-        $this->object->setStartCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($c1).($r1 + 1));
596
+        $this->object->setStartCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($c1) . ($r1 + 1));
597 597
 
598 598
         // set the start offsetX
599 599
         $this->object->setStartOffsetX($startOffsetX);
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
         $this->object->setStartOffsetY($startOffsetY);
603 603
 
604 604
         // set the end coordinates
605
-        $this->object->setEndCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($c2).($r2 + 1));
605
+        $this->object->setEndCoordinates(\PhpOffice\PhpSpreadsheet\Cell::stringFromColumnIndex($c2) . ($r2 + 1));
606 606
 
607 607
         // set the end offsetX
608 608
         $this->object->setEndOffsetX($endOffsetX);
Please login to merge, or discard this patch.