Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet/Worksheet.php 2 locations

@@ 1199-1203 (lines=5) @@
1196
        }
1197
1198
        // Worksheet reference?
1199
        if (strpos($pCoordinate, '!') !== false) {
1200
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1201
1202
            return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists);
1203
        }
1204
1205
        // Named range?
1206
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&
@@ 1300-1304 (lines=5) @@
1297
    public function cellExists($pCoordinate)
1298
    {
1299
        // Worksheet reference?
1300
        if (strpos($pCoordinate, '!') !== false) {
1301
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1302
1303
            return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1]));
1304
        }
1305
1306
        // Named range?
1307
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&