Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Calculation.php 2 locations

@@ 4048-4051 (lines=4) @@
4045
4046
        if ($pSheet !== null) {
4047
            $pSheetName = $pSheet->getTitle();
4048
            if (strpos($pRange, '!') !== false) {
4049
                list($pSheetName, $pRange) = Worksheet::extractSheetTitle($pRange, true);
4050
                $pSheet = $this->spreadsheet->getSheetByName($pSheetName);
4051
            }
4052
4053
            // Extract range
4054
            $aReferences = Cell::extractAllCellReferencesInRange($pRange);
@@ 4099-4102 (lines=4) @@
4096
4097
        if ($pSheet !== null) {
4098
            $pSheetName = $pSheet->getTitle();
4099
            if (strpos($pRange, '!') !== false) {
4100
                list($pSheetName, $pRange) = Worksheet::extractSheetTitle($pRange, true);
4101
                $pSheet = $this->spreadsheet->getSheetByName($pSheetName);
4102
            }
4103
4104
            // Named range?
4105
            $namedRange = NamedRange::resolveRange($pRange, $pSheet);