Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

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