@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | [$column, $row] = Coordinate::coordinateFromString($cell); |
1179 | 1179 | if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { |
1180 | 1180 | $formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell); |
1181 | - $this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); |
|
1181 | + $this->phpSheet->getCell($cell)->setValueExplicit('='.$formula, DataType::TYPE_FORMULA); |
|
1182 | 1182 | } |
1183 | 1183 | } |
1184 | 1184 | } |
@@ -1217,7 +1217,7 @@ discard block |
||
1217 | 1217 | $sheetName = trim($explodes[0], "'"); |
1218 | 1218 | if (count($explodes) == 2) { |
1219 | 1219 | if (strpos($explodes[1], ':') === false) { |
1220 | - $explodes[1] = $explodes[1] . ':' . $explodes[1]; |
|
1220 | + $explodes[1] = $explodes[1].':'.$explodes[1]; |
|
1221 | 1221 | } |
1222 | 1222 | $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66 |
1223 | 1223 | } |
@@ -1709,7 +1709,7 @@ discard block |
||
1709 | 1709 | // Concatenate this extension with the currently set comment for the cell |
1710 | 1710 | $comment = $this->phpSheet->getComment($cellAddress); |
1711 | 1711 | $commentText = $comment->getText()->getPlainText(); |
1712 | - $comment->setText($this->parseRichText($commentText . $noteText)); |
|
1712 | + $comment->setText($this->parseRichText($commentText.$noteText)); |
|
1713 | 1713 | } else { |
1714 | 1714 | // Set comment for the cell |
1715 | 1715 | $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText)); |
@@ -1950,7 +1950,7 @@ discard block |
||
1950 | 1950 | $salt = $key->RC4($salt_data); |
1951 | 1951 | $hashedsalt = $key->RC4($hashedsalt_data); |
1952 | 1952 | |
1953 | - $salt .= "\x80" . str_repeat("\0", 47); |
|
1953 | + $salt .= "\x80".str_repeat("\0", 47); |
|
1954 | 1954 | $salt[56] = "\x80"; |
1955 | 1955 | |
1956 | 1956 | $md5->reset(); |
@@ -2921,7 +2921,7 @@ discard block |
||
2921 | 2921 | |
2922 | 2922 | // offset: var; size: $flen; formula data |
2923 | 2923 | $offset = 14 + $string['size']; |
2924 | - $formulaStructure = pack('v', $flen) . substr($recordData, $offset); |
|
2924 | + $formulaStructure = pack('v', $flen).substr($recordData, $offset); |
|
2925 | 2925 | |
2926 | 2926 | try { |
2927 | 2927 | $formula = $this->getFormulaFromStructure($formulaStructure); |
@@ -3090,7 +3090,7 @@ discard block |
||
3090 | 3090 | $newstr = ''; |
3091 | 3091 | $jMax = strlen($retstr); |
3092 | 3092 | for ($j = 0; $j < $jMax; ++$j) { |
3093 | - $newstr .= $retstr[$j] . chr(0); |
|
3093 | + $newstr .= $retstr[$j].chr(0); |
|
3094 | 3094 | } |
3095 | 3095 | $retstr = $newstr; |
3096 | 3096 | $len = min($charsLeft * 2, $limitpos - $pos); |
@@ -3736,7 +3736,7 @@ discard block |
||
3736 | 3736 | $rknum = self::getInt4d($recordData, 6); |
3737 | 3737 | $numValue = self::getIEEE754($rknum); |
3738 | 3738 | |
3739 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3739 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3740 | 3740 | if (!$this->readDataOnly) { |
3741 | 3741 | // add style information |
3742 | 3742 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3813,13 +3813,13 @@ discard block |
||
3813 | 3813 | } |
3814 | 3814 | } |
3815 | 3815 | if ($this->readEmptyCells || trim($richText->getPlainText()) !== '') { |
3816 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3816 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3817 | 3817 | $cell->setValueExplicit($richText, DataType::TYPE_STRING); |
3818 | 3818 | $emptyCell = false; |
3819 | 3819 | } |
3820 | 3820 | } else { |
3821 | 3821 | if ($this->readEmptyCells || trim($this->sst[$index]['value']) !== '') { |
3822 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3822 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3823 | 3823 | $cell->setValueExplicit($this->sst[$index]['value'], DataType::TYPE_STRING); |
3824 | 3824 | $emptyCell = false; |
3825 | 3825 | } |
@@ -3871,7 +3871,7 @@ discard block |
||
3871 | 3871 | |
3872 | 3872 | // offset: var; size: 4; RK value |
3873 | 3873 | $numValue = self::getIEEE754(self::getInt4d($recordData, $offset + 2)); |
3874 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3874 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3875 | 3875 | if (!$this->readDataOnly) { |
3876 | 3876 | // add style |
3877 | 3877 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3915,7 +3915,7 @@ discard block |
||
3915 | 3915 | |
3916 | 3916 | $numValue = self::extractNumber(substr($recordData, 6, 8)); |
3917 | 3917 | |
3918 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
3918 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
3919 | 3919 | if (!$this->readDataOnly) { |
3920 | 3920 | // add cell style |
3921 | 3921 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -3971,14 +3971,14 @@ discard block |
||
3971 | 3971 | // get the base cell, grab tExp token |
3972 | 3972 | $baseRow = self::getUInt2d($formulaStructure, 3); |
3973 | 3973 | $baseCol = self::getUInt2d($formulaStructure, 5); |
3974 | - $this->baseCell = Coordinate::stringFromColumnIndex($baseCol + 1) . ($baseRow + 1); |
|
3974 | + $this->baseCell = Coordinate::stringFromColumnIndex($baseCol + 1).($baseRow + 1); |
|
3975 | 3975 | } |
3976 | 3976 | |
3977 | 3977 | // Read cell? |
3978 | 3978 | if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { |
3979 | 3979 | if ($isPartOfSharedFormula) { |
3980 | 3980 | // formula is added to this cell after the sheet has been read |
3981 | - $this->sharedFormulaParts[$columnString . ($row + 1)] = $this->baseCell; |
|
3981 | + $this->sharedFormulaParts[$columnString.($row + 1)] = $this->baseCell; |
|
3982 | 3982 | } |
3983 | 3983 | |
3984 | 3984 | // offset: 16: size: 4; not used |
@@ -4023,7 +4023,7 @@ discard block |
||
4023 | 4023 | $value = self::extractNumber(substr($recordData, 6, 8)); |
4024 | 4024 | } |
4025 | 4025 | |
4026 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
4026 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
4027 | 4027 | if (!$this->readDataOnly) { |
4028 | 4028 | // add cell style |
4029 | 4029 | $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
@@ -4038,7 +4038,7 @@ discard block |
||
4038 | 4038 | throw new Exception('Not BIFF8. Can only read BIFF8 formulas'); |
4039 | 4039 | } |
4040 | 4040 | $formula = $this->getFormulaFromStructure($formulaStructure); // get formula in human language |
4041 | - $cell->setValueExplicit('=' . $formula, DataType::TYPE_FORMULA); |
|
4041 | + $cell->setValueExplicit('='.$formula, DataType::TYPE_FORMULA); |
|
4042 | 4042 | } catch (PhpSpreadsheetException $e) { |
4043 | 4043 | $cell->setValueExplicit($value, $dataType); |
4044 | 4044 | } |
@@ -4144,7 +4144,7 @@ discard block |
||
4144 | 4144 | // offset: 7; size: 1; 0=boolean; 1=error |
4145 | 4145 | $isError = ord($recordData[7]); |
4146 | 4146 | |
4147 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
4147 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
4148 | 4148 | switch ($isError) { |
4149 | 4149 | case 0: // boolean |
4150 | 4150 | $value = (bool) $boolErr; |
@@ -4200,7 +4200,7 @@ discard block |
||
4200 | 4200 | // Read cell? |
4201 | 4201 | if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { |
4202 | 4202 | $xfIndex = self::getUInt2d($recordData, 4 + 2 * $i); |
4203 | - $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4203 | + $this->phpSheet->getCell($columnString.($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4204 | 4204 | } |
4205 | 4205 | } |
4206 | 4206 | } |
@@ -4248,7 +4248,7 @@ discard block |
||
4248 | 4248 | $value = $string['value']; |
4249 | 4249 | } |
4250 | 4250 | if ($this->readEmptyCells || trim($value) !== '') { |
4251 | - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); |
|
4251 | + $cell = $this->phpSheet->getCell($columnString.($row + 1)); |
|
4252 | 4252 | $cell->setValueExplicit($value, DataType::TYPE_STRING); |
4253 | 4253 | |
4254 | 4254 | if (!$this->readDataOnly) { |
@@ -4284,7 +4284,7 @@ discard block |
||
4284 | 4284 | |
4285 | 4285 | // add style information |
4286 | 4286 | if (!$this->readDataOnly && $this->readEmptyCells) { |
4287 | - $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4287 | + $this->phpSheet->getCell($columnString.($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); |
|
4288 | 4288 | } |
4289 | 4289 | } |
4290 | 4290 | } |
@@ -4498,8 +4498,8 @@ discard block |
||
4498 | 4498 | |
4499 | 4499 | if ($this->frozen) { |
4500 | 4500 | // frozen panes |
4501 | - $cell = Coordinate::stringFromColumnIndex($px + 1) . ($py + 1); |
|
4502 | - $topLeftCell = Coordinate::stringFromColumnIndex($colLeft + 1) . ($rwTop + 1); |
|
4501 | + $cell = Coordinate::stringFromColumnIndex($px + 1).($py + 1); |
|
4502 | + $topLeftCell = Coordinate::stringFromColumnIndex($colLeft + 1).($rwTop + 1); |
|
4503 | 4503 | $this->phpSheet->freezePane($cell, $topLeftCell); |
4504 | 4504 | } |
4505 | 4505 | // unfrozen panes; split windows; not supported by PhpSpreadsheet core |
@@ -4945,7 +4945,7 @@ discard block |
||
4945 | 4945 | |
4946 | 4946 | // offset: var; size: $sz1; formula data for first condition (without size field) |
4947 | 4947 | $formula1 = substr($recordData, $offset, $sz1); |
4948 | - $formula1 = pack('v', $sz1) . $formula1; // prepend the length |
|
4948 | + $formula1 = pack('v', $sz1).$formula1; // prepend the length |
|
4949 | 4949 | try { |
4950 | 4950 | $formula1 = $this->getFormulaFromStructure($formula1); |
4951 | 4951 | |
@@ -4967,7 +4967,7 @@ discard block |
||
4967 | 4967 | |
4968 | 4968 | // offset: var; size: $sz2; formula data for second condition (without size field) |
4969 | 4969 | $formula2 = substr($recordData, $offset, $sz2); |
4970 | - $formula2 = pack('v', $sz2) . $formula2; // prepend the length |
|
4970 | + $formula2 = pack('v', $sz2).$formula2; // prepend the length |
|
4971 | 4971 | try { |
4972 | 4972 | $formula2 = $this->getFormulaFromStructure($formula2); |
4973 | 4973 | } catch (PhpSpreadsheetException $e) { |
@@ -5447,7 +5447,7 @@ discard block |
||
5447 | 5447 | $ops[] = array_pop($formulaStrings); |
5448 | 5448 | } |
5449 | 5449 | $ops = array_reverse($ops); |
5450 | - $formulaStrings[] = "$space1$space0{$token['data']['function']}(" . implode(',', $ops) . ')'; |
|
5450 | + $formulaStrings[] = "$space1$space0{$token['data']['function']}(".implode(',', $ops).')'; |
|
5451 | 5451 | unset($space0, $space1); |
5452 | 5452 | } else { |
5453 | 5453 | // add-in function |
@@ -5457,7 +5457,7 @@ discard block |
||
5457 | 5457 | } |
5458 | 5458 | $ops = array_reverse($ops); |
5459 | 5459 | $function = array_pop($formulaStrings); |
5460 | - $formulaStrings[] = "$space1$space0$function(" . implode(',', $ops) . ')'; |
|
5460 | + $formulaStrings[] = "$space1$space0$function(".implode(',', $ops).')'; |
|
5461 | 5461 | unset($space0, $space1); |
5462 | 5462 | } |
5463 | 5463 | |
@@ -5470,7 +5470,7 @@ discard block |
||
5470 | 5470 | break; |
5471 | 5471 | case 'tArray': // array constant |
5472 | 5472 | $constantArray = self::readBIFF8ConstantArray($additionalData); |
5473 | - $formulaStrings[] = $space1 . $space0 . $constantArray['value']; |
|
5473 | + $formulaStrings[] = $space1.$space0.$constantArray['value']; |
|
5474 | 5474 | $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data |
5475 | 5475 | unset($space0, $space1); |
5476 | 5476 | |
@@ -7089,7 +7089,7 @@ discard block |
||
7089 | 7089 | break; |
7090 | 7090 | // Unknown cases // don't know how to deal with |
7091 | 7091 | default: |
7092 | - throw new Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula'); |
|
7092 | + throw new Exception('Unrecognized token '.sprintf('%02X', $id).' in formula'); |
|
7093 | 7093 | |
7094 | 7094 | break; |
7095 | 7095 | } |
@@ -7121,14 +7121,14 @@ discard block |
||
7121 | 7121 | |
7122 | 7122 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
7123 | 7123 | if (!(0x4000 & self::getUInt2d($cellAddressStructure, 2))) { |
7124 | - $column = '$' . $column; |
|
7124 | + $column = '$'.$column; |
|
7125 | 7125 | } |
7126 | 7126 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
7127 | 7127 | if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) { |
7128 | - $row = '$' . $row; |
|
7128 | + $row = '$'.$row; |
|
7129 | 7129 | } |
7130 | 7130 | |
7131 | - return $column . $row; |
|
7131 | + return $column.$row; |
|
7132 | 7132 | } |
7133 | 7133 | |
7134 | 7134 | /** |
@@ -7157,7 +7157,7 @@ discard block |
||
7157 | 7157 | $colIndex = 0x00FF & self::getUInt2d($cellAddressStructure, 2); |
7158 | 7158 | |
7159 | 7159 | $column = Coordinate::stringFromColumnIndex($colIndex + 1); |
7160 | - $column = '$' . $column; |
|
7160 | + $column = '$'.$column; |
|
7161 | 7161 | } else { |
7162 | 7162 | // offset: 2; size: 2; index to column or column offset + relative flags |
7163 | 7163 | // bit: 7-0; mask 0x00FF; column index |
@@ -7170,13 +7170,13 @@ discard block |
||
7170 | 7170 | |
7171 | 7171 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
7172 | 7172 | if (!(0x8000 & self::getUInt2d($cellAddressStructure, 2))) { |
7173 | - $row = '$' . $row; |
|
7173 | + $row = '$'.$row; |
|
7174 | 7174 | } else { |
7175 | 7175 | $rowIndex = ($rowIndex <= 32767) ? $rowIndex : $rowIndex - 65536; |
7176 | 7176 | $row = $baseRow + $rowIndex; |
7177 | 7177 | } |
7178 | 7178 | |
7179 | - return $column . $row; |
|
7179 | + return $column.$row; |
|
7180 | 7180 | } |
7181 | 7181 | |
7182 | 7182 | /** |
@@ -7288,12 +7288,12 @@ discard block |
||
7288 | 7288 | |
7289 | 7289 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
7290 | 7290 | if (!(0x4000 & self::getUInt2d($subData, 4))) { |
7291 | - $fc = '$' . $fc; |
|
7291 | + $fc = '$'.$fc; |
|
7292 | 7292 | } |
7293 | 7293 | |
7294 | 7294 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
7295 | 7295 | if (!(0x8000 & self::getUInt2d($subData, 4))) { |
7296 | - $fr = '$' . $fr; |
|
7296 | + $fr = '$'.$fr; |
|
7297 | 7297 | } |
7298 | 7298 | |
7299 | 7299 | // offset: 6; size: 2; index to last column or column offset + relative flags |
@@ -7303,12 +7303,12 @@ discard block |
||
7303 | 7303 | |
7304 | 7304 | // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) |
7305 | 7305 | if (!(0x4000 & self::getUInt2d($subData, 6))) { |
7306 | - $lc = '$' . $lc; |
|
7306 | + $lc = '$'.$lc; |
|
7307 | 7307 | } |
7308 | 7308 | |
7309 | 7309 | // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) |
7310 | 7310 | if (!(0x8000 & self::getUInt2d($subData, 6))) { |
7311 | - $lr = '$' . $lr; |
|
7311 | + $lr = '$'.$lr; |
|
7312 | 7312 | } |
7313 | 7313 | |
7314 | 7314 | return "$fc$fr:$lc$lr"; |
@@ -7345,7 +7345,7 @@ discard block |
||
7345 | 7345 | // bit: 7-0; mask 0x00FF; column index |
7346 | 7346 | $fcIndex = 0x00FF & self::getUInt2d($subData, 4); |
7347 | 7347 | $fc = Coordinate::stringFromColumnIndex($fcIndex + 1); |
7348 | - $fc = '$' . $fc; |
|
7348 | + $fc = '$'.$fc; |
|
7349 | 7349 | } else { |
7350 | 7350 | // column offset |
7351 | 7351 | // offset: 4; size: 2; first column with relative/absolute flags |
@@ -7361,7 +7361,7 @@ discard block |
||
7361 | 7361 | if (!(0x8000 & self::getUInt2d($subData, 4))) { |
7362 | 7362 | // absolute row index |
7363 | 7363 | $fr = $frIndex + 1; |
7364 | - $fr = '$' . $fr; |
|
7364 | + $fr = '$'.$fr; |
|
7365 | 7365 | } else { |
7366 | 7366 | // row offset |
7367 | 7367 | $frIndex = ($frIndex <= 32767) ? $frIndex : $frIndex - 65536; |
@@ -7375,7 +7375,7 @@ discard block |
||
7375 | 7375 | // bit: 7-0; mask 0x00FF; column index |
7376 | 7376 | $lcIndex = 0x00FF & self::getUInt2d($subData, 6); |
7377 | 7377 | $lc = Coordinate::stringFromColumnIndex($lcIndex + 1); |
7378 | - $lc = '$' . $lc; |
|
7378 | + $lc = '$'.$lc; |
|
7379 | 7379 | } else { |
7380 | 7380 | // column offset |
7381 | 7381 | // offset: 4; size: 2; first column with relative/absolute flags |
@@ -7391,7 +7391,7 @@ discard block |
||
7391 | 7391 | if (!(0x8000 & self::getUInt2d($subData, 6))) { |
7392 | 7392 | // absolute row index |
7393 | 7393 | $lr = $lrIndex + 1; |
7394 | - $lr = '$' . $lr; |
|
7394 | + $lr = '$'.$lr; |
|
7395 | 7395 | } else { |
7396 | 7396 | // row offset |
7397 | 7397 | $lrIndex = ($lrIndex <= 32767) ? $lrIndex : $lrIndex - 65536; |
@@ -7548,7 +7548,7 @@ discard block |
||
7548 | 7548 | } |
7549 | 7549 | $matrixChunks[] = implode(',', $items); // looks like e.g. '1,"hello"' |
7550 | 7550 | } |
7551 | - $matrix = '{' . implode(';', $matrixChunks) . '}'; |
|
7551 | + $matrix = '{'.implode(';', $matrixChunks).'}'; |
|
7552 | 7552 | |
7553 | 7553 | return [ |
7554 | 7554 | 'value' => $matrix, |
@@ -7585,7 +7585,7 @@ discard block |
||
7585 | 7585 | case 0x02: // string value |
7586 | 7586 | // offset: 1; size: var; Unicode string, 16-bit string length |
7587 | 7587 | $string = self::readUnicodeStringLong(substr($valueData, 1)); |
7588 | - $value = '"' . $string['value'] . '"'; |
|
7588 | + $value = '"'.$string['value'].'"'; |
|
7589 | 7589 | $size = 1 + $string['size']; |
7590 | 7590 | |
7591 | 7591 | break; |
@@ -7776,7 +7776,7 @@ discard block |
||
7776 | 7776 | */ |
7777 | 7777 | private static function UTF8toExcelDoubleQuoted($value) |
7778 | 7778 | { |
7779 | - return '"' . str_replace('"', '""', $value) . '"'; |
|
7779 | + return '"'.str_replace('"', '""', $value).'"'; |
|
7780 | 7780 | } |
7781 | 7781 | |
7782 | 7782 | /** |
@@ -7869,7 +7869,7 @@ discard block |
||
7869 | 7869 | $uncompressedString = ''; |
7870 | 7870 | $strLen = strlen($string); |
7871 | 7871 | for ($i = 0; $i < $strLen; ++$i) { |
7872 | - $uncompressedString .= $string[$i] . "\0"; |
|
7872 | + $uncompressedString .= $string[$i]."\0"; |
|
7873 | 7873 | } |
7874 | 7874 | |
7875 | 7875 | return $uncompressedString; |
@@ -7910,7 +7910,7 @@ discard block |
||
7910 | 7910 | */ |
7911 | 7911 | public static function getInt2d($data, $pos) |
7912 | 7912 | { |
7913 | - return unpack('s', $data[$pos] . $data[$pos + 1])[1]; |
|
7913 | + return unpack('s', $data[$pos].$data[$pos + 1])[1]; |
|
7914 | 7914 | } |
7915 | 7915 | |
7916 | 7916 | /** |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $xml = $this->toUtf8($xml); |
126 | 126 | |
127 | 127 | // Don't rely purely on libxml_disable_entity_loader() |
128 | - $pattern = '/\\0?' . implode('\\0?', str_split($this->pattern)) . '\\0?/'; |
|
128 | + $pattern = '/\\0?'.implode('\\0?', str_split($this->pattern)).'\\0?/'; |
|
129 | 129 | |
130 | 130 | if (preg_match($pattern, $xml)) { |
131 | 131 | throw new Reader\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); |
@@ -95,14 +95,14 @@ discard block |
||
95 | 95 | |
96 | 96 | $zip = new ZipArchive(); |
97 | 97 | if (!$zip->open($pFilename)) { |
98 | - throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); |
|
98 | + throw new Exception('Could not open '.$pFilename.' for reading! Error opening file.'); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $worksheetNames = []; |
102 | 102 | |
103 | 103 | $xml = new XMLReader(); |
104 | 104 | $xml->xml( |
105 | - $this->securityScanner->scanFile('zip://' . realpath($pFilename) . '#content.xml'), |
|
105 | + $this->securityScanner->scanFile('zip://'.realpath($pFilename).'#content.xml'), |
|
106 | 106 | null, |
107 | 107 | Settings::getLibXmlLoaderOptions() |
108 | 108 | ); |
@@ -151,12 +151,12 @@ discard block |
||
151 | 151 | |
152 | 152 | $zip = new ZipArchive(); |
153 | 153 | if (!$zip->open($pFilename)) { |
154 | - throw new Exception('Could not open ' . $pFilename . ' for reading! Error opening file.'); |
|
154 | + throw new Exception('Could not open '.$pFilename.' for reading! Error opening file.'); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | $xml = new XMLReader(); |
158 | 158 | $xml->xml( |
159 | - $this->securityScanner->scanFile('zip://' . realpath($pFilename) . '#content.xml'), |
|
159 | + $this->securityScanner->scanFile('zip://'.realpath($pFilename).'#content.xml'), |
|
160 | 160 | null, |
161 | 161 | Settings::getLibXmlLoaderOptions() |
162 | 162 | ); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $text = $this->scanElementForText($textNode->item(0)); |
398 | 398 | |
399 | 399 | $spreadsheet->getActiveSheet() |
400 | - ->getComment($columnID . $rowID) |
|
400 | + ->getComment($columnID.$rowID) |
|
401 | 401 | ->setText($this->parseRichText($text)); |
402 | 402 | // ->setAuthor( $author ) |
403 | 403 | } |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | |
521 | 521 | $dataValue = Date::PHPToExcel( |
522 | 522 | strtotime( |
523 | - '01-01-1970 ' . implode(':', sscanf($timeValue, 'PT%dH%dM%dS')) |
|
523 | + '01-01-1970 '.implode(':', sscanf($timeValue, 'PT%dH%dM%dS')) |
|
524 | 524 | ) |
525 | 525 | ); |
526 | 526 | $formatting = NumberFormat::FORMAT_DATE_TIME4; |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | $rID = $rowID + $rowAdjust; |
581 | 581 | |
582 | 582 | $cell = $spreadsheet->getActiveSheet() |
583 | - ->getCell($columnID . $rID); |
|
583 | + ->getCell($columnID.$rID); |
|
584 | 584 | |
585 | 585 | // Set value |
586 | 586 | if ($hasCalculatedValue) { |
@@ -596,12 +596,12 @@ discard block |
||
596 | 596 | // Set other properties |
597 | 597 | if ($formatting !== null) { |
598 | 598 | $spreadsheet->getActiveSheet() |
599 | - ->getStyle($columnID . $rID) |
|
599 | + ->getStyle($columnID.$rID) |
|
600 | 600 | ->getNumberFormat() |
601 | 601 | ->setFormatCode($formatting); |
602 | 602 | } else { |
603 | 603 | $spreadsheet->getActiveSheet() |
604 | - ->getStyle($columnID . $rID) |
|
604 | + ->getStyle($columnID.$rID) |
|
605 | 605 | ->getNumberFormat() |
606 | 606 | ->setFormatCode(NumberFormat::FORMAT_GENERAL); |
607 | 607 | } |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $rowTo = $rowTo + (int) $cellData->getAttributeNS($tableNs, 'number-rows-spanned') - 1; |
637 | 637 | } |
638 | 638 | |
639 | - $cellRange = $columnID . $rowID . ':' . $columnTo . $rowTo; |
|
639 | + $cellRange = $columnID.$rowID.':'.$columnTo.$rowTo; |
|
640 | 640 | $spreadsheet->getActiveSheet()->mergeCells($cellRange); |
641 | 641 | } |
642 | 642 | } |
@@ -280,13 +280,13 @@ discard block |
||
280 | 280 | // Only actually write it if there's content in the string |
281 | 281 | // Write to worksheet to be done here... |
282 | 282 | // ... we return the cell so we can mess about with styles more easily |
283 | - $sheet->setCellValue($column . $row, $cellContent); |
|
283 | + $sheet->setCellValue($column.$row, $cellContent); |
|
284 | 284 | $this->dataArray[$row][$column] = $cellContent; |
285 | 285 | } |
286 | 286 | } else { |
287 | 287 | // We have a Rich Text run |
288 | 288 | // TODO |
289 | - $this->dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent; |
|
289 | + $this->dataArray[$row][$column] = 'RICH TEXT: '.$cellContent; |
|
290 | 290 | } |
291 | 291 | $cellContent = (string) ''; |
292 | 292 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | case 'strong': |
341 | 341 | case 'b': |
342 | 342 | if (isset($attributeArray['class']) && $attributeArray['class'] === 'comment') { |
343 | - $sheet->getComment($column . $row) |
|
343 | + $sheet->getComment($column.$row) |
|
344 | 344 | ->getText() |
345 | 345 | ->createTextRun($child->textContent); |
346 | 346 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | if (isset($this->formats[$child->nodeName])) { |
359 | - $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); |
|
359 | + $sheet->getStyle($column.$row)->applyFromArray($this->formats[$child->nodeName]); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | break; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | $this->flushCell($sheet, $column, $row, $cellContent); |
365 | 365 | ++$row; |
366 | 366 | if (isset($this->formats[$child->nodeName])) { |
367 | - $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); |
|
367 | + $sheet->getStyle($column.$row)->applyFromArray($this->formats[$child->nodeName]); |
|
368 | 368 | } else { |
369 | 369 | $cellContent = '----------'; |
370 | 370 | $this->flushCell($sheet, $column, $row, $cellContent); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | if ($this->tableLevel > 0) { |
377 | 377 | // If we're inside a table, replace with a \n and set the cell to wrap |
378 | 378 | $cellContent .= "\n"; |
379 | - $sheet->getStyle($column . $row)->getAlignment()->setWrapText(true); |
|
379 | + $sheet->getStyle($column.$row)->getAlignment()->setWrapText(true); |
|
380 | 380 | } else { |
381 | 381 | // Otherwise flush our existing content and move the row cursor on |
382 | 382 | $this->flushCell($sheet, $column, $row, $cellContent); |
@@ -388,9 +388,9 @@ discard block |
||
388 | 388 | foreach ($attributeArray as $attributeName => $attributeValue) { |
389 | 389 | switch ($attributeName) { |
390 | 390 | case 'href': |
391 | - $sheet->getCell($column . $row)->getHyperlink()->setUrl($attributeValue); |
|
391 | + $sheet->getCell($column.$row)->getHyperlink()->setUrl($attributeValue); |
|
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 | break; |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | $this->flushCell($sheet, $column, $row, $cellContent); |
427 | 427 | |
428 | 428 | if (isset($this->formats[$child->nodeName])) { |
429 | - $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); |
|
429 | + $sheet->getStyle($column.$row)->applyFromArray($this->formats[$child->nodeName]); |
|
430 | 430 | } |
431 | 431 | |
432 | 432 | ++$row; |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | case 'td': |
491 | 491 | $this->processDomElement($child, $sheet, $row, $column, $cellContent); |
492 | 492 | |
493 | - while (isset($this->rowspan[$column . $row])) { |
|
493 | + while (isset($this->rowspan[$column.$row])) { |
|
494 | 494 | ++$column; |
495 | 495 | } |
496 | 496 | |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { |
506 | 506 | ++$columnTo; |
507 | 507 | } |
508 | - $range = $column . $row . ':' . $columnTo . ($row + (int) $attributeArray['rowspan'] - 1); |
|
508 | + $range = $column.$row.':'.$columnTo.($row + (int) $attributeArray['rowspan'] - 1); |
|
509 | 509 | foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) { |
510 | 510 | $this->rowspan[$value] = true; |
511 | 511 | } |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | $column = $columnTo; |
514 | 514 | } elseif (isset($attributeArray['rowspan'])) { |
515 | 515 | //create merging rowspan |
516 | - $range = $column . $row . ':' . $column . ($row + (int) $attributeArray['rowspan'] - 1); |
|
516 | + $range = $column.$row.':'.$column.($row + (int) $attributeArray['rowspan'] - 1); |
|
517 | 517 | foreach (Coordinate::extractAllCellReferencesInRange($range) as $value) { |
518 | 518 | $this->rowspan[$value] = true; |
519 | 519 | } |
@@ -524,10 +524,10 @@ discard block |
||
524 | 524 | for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { |
525 | 525 | ++$columnTo; |
526 | 526 | } |
527 | - $sheet->mergeCells($column . $row . ':' . $columnTo . $row); |
|
527 | + $sheet->mergeCells($column.$row.':'.$columnTo.$row); |
|
528 | 528 | $column = $columnTo; |
529 | 529 | } elseif (isset($attributeArray['bgcolor'])) { |
530 | - $sheet->getStyle($column . $row)->applyFromArray( |
|
530 | + $sheet->getStyle($column.$row)->applyFromArray( |
|
531 | 531 | [ |
532 | 532 | 'fill' => [ |
533 | 533 | 'fillType' => Fill::FILL_SOLID, |
@@ -546,15 +546,15 @@ discard block |
||
546 | 546 | } |
547 | 547 | |
548 | 548 | if (isset($attributeArray['align'])) { |
549 | - $sheet->getStyle($column . $row)->getAlignment()->setHorizontal($attributeArray['align']); |
|
549 | + $sheet->getStyle($column.$row)->getAlignment()->setHorizontal($attributeArray['align']); |
|
550 | 550 | } |
551 | 551 | |
552 | 552 | if (isset($attributeArray['valign'])) { |
553 | - $sheet->getStyle($column . $row)->getAlignment()->setVertical($attributeArray['valign']); |
|
553 | + $sheet->getStyle($column.$row)->getAlignment()->setVertical($attributeArray['valign']); |
|
554 | 554 | } |
555 | 555 | |
556 | 556 | if (isset($attributeArray['data-format'])) { |
557 | - $sheet->getStyle($column . $row)->getNumberFormat()->setFormatCode($attributeArray['data-format']); |
|
557 | + $sheet->getStyle($column.$row)->getNumberFormat()->setFormatCode($attributeArray['data-format']); |
|
558 | 558 | } |
559 | 559 | |
560 | 560 | ++$column; |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | { |
590 | 590 | // Validate |
591 | 591 | if (!$this->canRead($pFilename)) { |
592 | - throw new Exception($pFilename . ' is an Invalid HTML file.'); |
|
592 | + throw new Exception($pFilename.' is an Invalid HTML file.'); |
|
593 | 593 | } |
594 | 594 | |
595 | 595 | // Create a new DOM object |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | // Reload the HTML file into the DOM object |
598 | 598 | $loaded = $dom->loadHTML(mb_convert_encoding($this->securityScanner->scanFile($pFilename), 'HTML-ENTITIES', 'UTF-8')); |
599 | 599 | if ($loaded === false) { |
600 | - throw new Exception('Failed to load ' . $pFilename . ' as a DOM Document'); |
|
600 | + throw new Exception('Failed to load '.$pFilename.' as a DOM Document'); |
|
601 | 601 | } |
602 | 602 | |
603 | 603 | return $this->loadDocument($dom, $spreadsheet); |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | return; |
700 | 700 | } |
701 | 701 | |
702 | - $cellStyle = $sheet->getStyle($column . $row); |
|
702 | + $cellStyle = $sheet->getStyle($column.$row); |
|
703 | 703 | |
704 | 704 | // add color styles (background & text) from dom element,currently support : td & th, using ONLY inline css style with RGB color |
705 | 705 | $styles = explode(';', $attributeArray['style']); |
@@ -879,7 +879,7 @@ discard block |
||
879 | 879 | $drawing = new Drawing(); |
880 | 880 | $drawing->setPath($src); |
881 | 881 | $drawing->setWorksheet($sheet); |
882 | - $drawing->setCoordinates($column . $row); |
|
882 | + $drawing->setCoordinates($column.$row); |
|
883 | 883 | $drawing->setOffsetX(0); |
884 | 884 | $drawing->setOffsetY(10); |
885 | 885 | $drawing->setResizeProportional(true); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | // Open file |
117 | 117 | if (!$this->canRead($pFilename)) { |
118 | - throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); |
|
118 | + throw new Exception($pFilename.' is an Invalid Spreadsheet file.'); |
|
119 | 119 | } |
120 | 120 | $this->openFile($pFilename); |
121 | 121 | $fileHandle = $this->fileHandle; |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | { |
205 | 205 | // Open file |
206 | 206 | if (!$this->canRead($pFilename)) { |
207 | - throw new Exception($pFilename . ' is an Invalid Spreadsheet file.'); |
|
207 | + throw new Exception($pFilename.' is an Invalid Spreadsheet file.'); |
|
208 | 208 | } |
209 | 209 | $this->openFile($pFilename); |
210 | 210 | $fileHandle = $this->fileHandle; |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | break; |
286 | 286 | } |
287 | 287 | } |
288 | - $this->formats['P' . $this->format++] = $formatArray; |
|
288 | + $this->formats['P'.$this->format++] = $formatArray; |
|
289 | 289 | // Read cell value data |
290 | 290 | } elseif ($dataType == 'C') { |
291 | 291 | $hasCalculatedValue = false; |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | |
308 | 308 | break; |
309 | 309 | case 'E': |
310 | - $cellDataFormula = '=' . substr($rowDatum, 1); |
|
310 | + $cellDataFormula = '='.substr($rowDatum, 1); |
|
311 | 311 | // Convert R1C1 style references to A1 style references (but only when not quoted) |
312 | 312 | $temp = explode('"', $cellDataFormula); |
313 | 313 | $key = false; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | if ($columnReference[0] == '[') { |
341 | 341 | $columnReference = $column + trim($columnReference, '[]'); |
342 | 342 | } |
343 | - $A1CellReference = Coordinate::stringFromColumnIndex($columnReference) . $rowReference; |
|
343 | + $A1CellReference = Coordinate::stringFromColumnIndex($columnReference).$rowReference; |
|
344 | 344 | |
345 | 345 | $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); |
346 | 346 | } |
@@ -358,10 +358,10 @@ discard block |
||
358 | 358 | $cellData = Calculation::unwrapResult($cellData); |
359 | 359 | |
360 | 360 | // Set cell value |
361 | - $spreadsheet->getActiveSheet()->getCell($columnLetter . $row)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData); |
|
361 | + $spreadsheet->getActiveSheet()->getCell($columnLetter.$row)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData); |
|
362 | 362 | if ($hasCalculatedValue) { |
363 | 363 | $cellData = Calculation::unwrapResult($cellData); |
364 | - $spreadsheet->getActiveSheet()->getCell($columnLetter . $row)->setCalculatedValue($cellData); |
|
364 | + $spreadsheet->getActiveSheet()->getCell($columnLetter.$row)->setCalculatedValue($cellData); |
|
365 | 365 | } |
366 | 366 | // Read cell formatting |
367 | 367 | } elseif ($dataType == 'F') { |
@@ -425,12 +425,12 @@ discard block |
||
425 | 425 | if (($formatStyle > '') && ($column > '') && ($row > '')) { |
426 | 426 | $columnLetter = Coordinate::stringFromColumnIndex($column); |
427 | 427 | if (isset($this->formats[$formatStyle])) { |
428 | - $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($this->formats[$formatStyle]); |
|
428 | + $spreadsheet->getActiveSheet()->getStyle($columnLetter.$row)->applyFromArray($this->formats[$formatStyle]); |
|
429 | 429 | } |
430 | 430 | } |
431 | 431 | if ((!empty($styleData)) && ($column > '') && ($row > '')) { |
432 | 432 | $columnLetter = Coordinate::stringFromColumnIndex($column); |
433 | - $spreadsheet->getActiveSheet()->getStyle($columnLetter . $row)->applyFromArray($styleData); |
|
433 | + $spreadsheet->getActiveSheet()->getStyle($columnLetter.$row)->applyFromArray($styleData); |
|
434 | 434 | } |
435 | 435 | if ($columnWidth > '') { |
436 | 436 | if ($startCol == $endCol) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | unset($this->index[$pCoord]); |
132 | 132 | |
133 | 133 | // Delete the entry from cache |
134 | - $this->cache->delete($this->cachePrefix . $pCoord); |
|
134 | + $this->cache->delete($this->cachePrefix.$pCoord); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $r = 0; |
179 | 179 | sscanf($coord, '%[A-Z]%d', $c, $r); |
180 | 180 | $row[$r] = $r; |
181 | - $col[$c] = strlen($c) . $c; |
|
181 | + $col[$c] = strlen($c).$c; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | // Determine highest column and row |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | */ |
301 | 301 | private function getUniqueID() |
302 | 302 | { |
303 | - return uniqid('phpspreadsheet.', true) . '.'; |
|
303 | + return uniqid('phpspreadsheet.', true).'.'; |
|
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | if ($this->currentCellIsDirty && !empty($this->currentCoordinate)) { |
391 | 391 | $this->currentCell->detach(); |
392 | 392 | |
393 | - $stored = $this->cache->set($this->cachePrefix . $this->currentCoordinate, $this->currentCell); |
|
393 | + $stored = $this->cache->set($this->cachePrefix.$this->currentCoordinate, $this->currentCell); |
|
394 | 394 | if (!$stored) { |
395 | 395 | $this->__destruct(); |
396 | 396 | |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | } |
450 | 450 | |
451 | 451 | // Check if the entry that has been requested actually exists |
452 | - $cell = $this->cache->get($this->cachePrefix . $pCoord); |
|
452 | + $cell = $this->cache->get($this->cachePrefix.$pCoord); |
|
453 | 453 | if ($cell === null) { |
454 | 454 | throw new PhpSpreadsheetException("Cell entry {$pCoord} no longer exists in cache. This probably means that the cache was cleared by someone else."); |
455 | 455 | } |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | private function getAllCacheKeys() |
501 | 501 | { |
502 | 502 | foreach ($this->getCoordinates() as $coordinate) { |
503 | - yield $this->cachePrefix . $coordinate; |
|
503 | + yield $this->cachePrefix.$coordinate; |
|
504 | 504 | } |
505 | 505 | } |
506 | 506 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | public static function registerWriter($writerType, $writerClass) |
206 | 206 | { |
207 | 207 | if (!is_a($writerClass, Writer\IWriter::class, true)) { |
208 | - throw new Writer\Exception('Registered writers must implement ' . Writer\IWriter::class); |
|
208 | + throw new Writer\Exception('Registered writers must implement '.Writer\IWriter::class); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | self::$writers[$writerType] = $writerClass; |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | public static function registerReader($readerType, $readerClass) |
221 | 221 | { |
222 | 222 | if (!is_a($readerClass, Reader\IReader::class, true)) { |
223 | - throw new Reader\Exception('Registered readers must implement ' . Reader\IReader::class); |
|
223 | + throw new Reader\Exception('Registered readers must implement '.Reader\IReader::class); |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | self::$readers[$readerType] = $readerClass; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | // Check for number in scientific format |
47 | - if (preg_match('/^' . Calculation::CALCULATION_REGEXP_NUMBER . '$/', $value)) { |
|
47 | + if (preg_match('/^'.Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) { |
|
48 | 48 | $cell->setValueExplicit((float) $value, DataType::TYPE_NUMERIC); |
49 | 49 | |
50 | 50 | return true; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $currencyCode = StringHelper::getCurrencyCode(); |
94 | 94 | $decimalSeparator = StringHelper::getDecimalSeparator(); |
95 | 95 | $thousandsSeparator = StringHelper::getThousandsSeparator(); |
96 | - if (preg_match('/^' . preg_quote($currencyCode, '/') . ' *(\d{1,3}(' . preg_quote($thousandsSeparator, '/') . '\d{3})*|(\d+))(' . preg_quote($decimalSeparator, '/') . '\d{2})?$/', $value)) { |
|
96 | + if (preg_match('/^'.preg_quote($currencyCode, '/').' *(\d{1,3}('.preg_quote($thousandsSeparator, '/').'\d{3})*|(\d+))('.preg_quote($decimalSeparator, '/').'\d{2})?$/', $value)) { |
|
97 | 97 | // Convert value to number |
98 | 98 | $value = (float) trim(str_replace([$currencyCode, $thousandsSeparator, $decimalSeparator], ['', '', '.'], $value)); |
99 | 99 | $cell->setValueExplicit($value, DataType::TYPE_NUMERIC); |
@@ -105,8 +105,8 @@ |
||
105 | 105 | public function getHashCode() |
106 | 106 | { |
107 | 107 | return md5( |
108 | - $this->url . |
|
109 | - $this->tooltip . |
|
108 | + $this->url. |
|
109 | + $this->tooltip. |
|
110 | 110 | __CLASS__ |
111 | 111 | ); |
112 | 112 | } |