Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

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