@@ -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 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | |
237 | 237 | break; |
238 | 238 | default: |
239 | - throw new Exception('Invalid datatype: ' . $pDataType); |
|
239 | + throw new Exception('Invalid datatype: '.$pDataType); |
|
240 | 240 | |
241 | 241 | break; |
242 | 242 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | } |
276 | 276 | |
277 | 277 | throw new \PhpOffice\PhpSpreadsheet\Calculation\Exception( |
278 | - $this->getWorksheet()->getTitle() . '!' . $this->getCoordinate() . ' -> ' . $ex->getMessage() |
|
278 | + $this->getWorksheet()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage() |
|
279 | 279 | ); |
280 | 280 | } |
281 | 281 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | throw new Exception('Cell coordinate can not be zero-length string'); |
40 | 40 | } |
41 | 41 | |
42 | - throw new Exception('Invalid cell coordinate ' . $pCoordinateString); |
|
42 | + throw new Exception('Invalid cell coordinate '.$pCoordinateString); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | |
79 | 79 | // Create absolute coordinate |
80 | 80 | if (ctype_digit($pCoordinateString)) { |
81 | - return $worksheet . '$' . $pCoordinateString; |
|
81 | + return $worksheet.'$'.$pCoordinateString; |
|
82 | 82 | } elseif (ctype_alpha($pCoordinateString)) { |
83 | - return $worksheet . '$' . strtoupper($pCoordinateString); |
|
83 | + return $worksheet.'$'.strtoupper($pCoordinateString); |
|
84 | 84 | } |
85 | 85 | |
86 | - return $worksheet . self::absoluteCoordinate($pCoordinateString); |
|
86 | + return $worksheet.self::absoluteCoordinate($pCoordinateString); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $column = ltrim($column, '$'); |
113 | 113 | $row = ltrim($row, '$'); |
114 | 114 | |
115 | - return $worksheet . '$' . $column . '$' . $row; |
|
115 | + return $worksheet.'$'.$column.'$'.$row; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
292 | - throw new Exception('Column string index can not be ' . ((isset($pString[0])) ? 'longer than 3 characters' : 'empty')); |
|
292 | + throw new Exception('Column string index can not be '.((isset($pString[0])) ? 'longer than 3 characters' : 'empty')); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | do { |
310 | 310 | $characterValue = ($indexValue % 26) ?: 26; |
311 | 311 | $indexValue = ($indexValue - $characterValue) / 26; |
312 | - $base26 = chr($characterValue + 64) . ($base26 ?: ''); |
|
312 | + $base26 = chr($characterValue + 64).($base26 ?: ''); |
|
313 | 313 | } while ($indexValue > 0); |
314 | 314 | $indexCache[$columnIndex] = $base26; |
315 | 315 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | // Loop cells |
393 | 393 | while ($currentColumnIndex < $endColumnIndex) { |
394 | 394 | while ($currentRow <= $endRow) { |
395 | - $returnValue[] = self::stringFromColumnIndex($currentColumnIndex) . $currentRow; |
|
395 | + $returnValue[] = self::stringFromColumnIndex($currentColumnIndex).$currentRow; |
|
396 | 396 | ++$currentRow; |
397 | 397 | } |
398 | 398 | ++$currentColumnIndex; |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | |
435 | 435 | [$column, $row] = self::coordinateFromString($coord); |
436 | 436 | $row = (int) (ltrim($row, '$')); |
437 | - $hashCode = $column . '-' . (is_object($value) ? $value->getHashCode() : $value); |
|
437 | + $hashCode = $column.'-'.(is_object($value) ? $value->getHashCode() : $value); |
|
438 | 438 | |
439 | 439 | if (!isset($hashedValues[$hashCode])) { |
440 | 440 | $hashedValues[$hashCode] = (object) [ |
@@ -463,9 +463,9 @@ discard block |
||
463 | 463 | $rowEnd = $row; |
464 | 464 | } else { |
465 | 465 | if ($rowStart == $rowEnd) { |
466 | - $ranges[] = $hashedValue->col . $rowStart; |
|
466 | + $ranges[] = $hashedValue->col.$rowStart; |
|
467 | 467 | } else { |
468 | - $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd; |
|
468 | + $ranges[] = $hashedValue->col.$rowStart.':'.$hashedValue->col.$rowEnd; |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | $rowStart = $row; |
@@ -475,9 +475,9 @@ discard block |
||
475 | 475 | |
476 | 476 | if ($rowStart !== null) { |
477 | 477 | if ($rowStart == $rowEnd) { |
478 | - $ranges[] = $hashedValue->col . $rowStart; |
|
478 | + $ranges[] = $hashedValue->col.$rowStart; |
|
479 | 479 | } else { |
480 | - $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd; |
|
480 | + $ranges[] = $hashedValue->col.$rowStart.':'.$hashedValue->col.$rowEnd; |
|
481 | 481 | } |
482 | 482 | } |
483 | 483 | |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | private static function validateRange($cellBlock, $startColumnIndex, $endColumnIndex, $currentRow, $endRow) |
515 | 515 | { |
516 | 516 | if ($startColumnIndex >= $endColumnIndex || $currentRow > $endRow) { |
517 | - throw new Exception('Invalid range: "' . $cellBlock . '"'); |
|
517 | + throw new Exception('Invalid range: "'.$cellBlock.'"'); |
|
518 | 518 | } |
519 | 519 | } |
520 | 520 | } |
@@ -59,7 +59,7 @@ |
||
59 | 59 | return in_array(strtolower($cellValue), explode(',', strtolower(trim($formula1, '"'))), true); |
60 | 60 | } elseif (strpos($formula1, ':') > 0) { |
61 | 61 | // values list cells |
62 | - $matchFormula = '=MATCH(' . $cell->getCoordinate() . ', ' . $formula1 . ', 0)'; |
|
62 | + $matchFormula = '=MATCH('.$cell->getCoordinate().', '.$formula1.', 0)'; |
|
63 | 63 | $calculation = Calculation::getInstance($cell->getWorksheet()->getParent()); |
64 | 64 | |
65 | 65 | try { |