Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 1209-1213 (lines=5) @@
1206
        }
1207
1208
        // Worksheet reference?
1209
        if (strpos($pCoordinate, '!') !== false) {
1210
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1211
1212
            return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists);
1213
        }
1214
1215
        // Named range?
1216
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&
@@ 1312-1316 (lines=5) @@
1309
    public function cellExists($pCoordinate = 'A1')
1310
    {
1311
        // Worksheet reference?
1312
        if (strpos($pCoordinate, '!') !== false) {
1313
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1314
1315
            return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1]));
1316
        }
1317
1318
        // Named range?
1319
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&