Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Calculation.php 2 locations

@@ 3617-3620 (lines=4) @@
3614
                        $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10];
3615
                        if ($matches[2] > '') {
3616
                            $matches[2] = trim($matches[2], "\"'");
3617
                            if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
3618
                                //    It's a Reference to an external spreadsheet (not currently supported)
3619
                                return $this->raiseFormulaError('Unable to access External Workbook');
3620
                            }
3621
                            $matches[2] = trim($matches[2], "\"'");
3622
                            $this->debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]);
3623
                            if ($pCellParent !== null) {
@@ 3647-3650 (lines=4) @@
3644
                        $cellRef = $matches[6] . $matches[7];
3645
                        if ($matches[2] > '') {
3646
                            $matches[2] = trim($matches[2], "\"'");
3647
                            if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
3648
                                //    It's a Reference to an external spreadsheet (not currently supported)
3649
                                return $this->raiseFormulaError('Unable to access External Workbook');
3650
                            }
3651
                            $this->debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]);
3652
                            if ($pCellParent !== null) {
3653
                                $cellSheet = $this->spreadsheet->getSheetByName($matches[2]);