Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Calculation.php 2 locations

@@ 3598-3601 (lines=4) @@
3595
                        $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10];
3596
                        if ($matches[2] > '') {
3597
                            $matches[2] = trim($matches[2], "\"'");
3598
                            if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
3599
                                //    It's a Reference to an external spreadsheet (not currently supported)
3600
                                return $this->raiseFormulaError('Unable to access External Workbook');
3601
                            }
3602
                            $matches[2] = trim($matches[2], "\"'");
3603
                            $this->_debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]);
3604
                            if ($pCellParent !== null) {
@@ 3628-3631 (lines=4) @@
3625
                        $cellRef = $matches[6] . $matches[7];
3626
                        if ($matches[2] > '') {
3627
                            $matches[2] = trim($matches[2], "\"'");
3628
                            if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
3629
                                //    It's a Reference to an external spreadsheet (not currently supported)
3630
                                return $this->raiseFormulaError('Unable to access External Workbook');
3631
                            }
3632
                            $this->_debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]);
3633
                            if ($pCellParent !== null) {
3634
                                $cellSheet = $this->spreadsheet->getSheetByName($matches[2]);