Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Calculation.php 2 locations

@@ 3624-3627 (lines=4) @@
3621
                        $cellRef = $matches[6] . $matches[7] . ':' . $matches[9] . $matches[10];
3622
                        if ($matches[2] > '') {
3623
                            $matches[2] = trim($matches[2], "\"'");
3624
                            if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
3625
                                //    It's a Reference to an external spreadsheet (not currently supported)
3626
                                return $this->raiseFormulaError('Unable to access External Workbook');
3627
                            }
3628
                            $matches[2] = trim($matches[2], "\"'");
3629
                            $this->_debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]);
3630
                            if ($pCellParent !== null) {
@@ 3654-3657 (lines=4) @@
3651
                        $cellRef = $matches[6] . $matches[7];
3652
                        if ($matches[2] > '') {
3653
                            $matches[2] = trim($matches[2], "\"'");
3654
                            if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) {
3655
                                //    It's a Reference to an external spreadsheet (not currently supported)
3656
                                return $this->raiseFormulaError('Unable to access External Workbook');
3657
                            }
3658
                            $this->_debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]);
3659
                            if ($pCellParent !== null) {
3660
                                $cellSheet = $this->spreadsheet->getSheetByName($matches[2]);