Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

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