Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

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