Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 1164-1168 (lines=5) @@
1161
        }
1162
1163
        // Worksheet reference?
1164
        if (strpos($pCoordinate, '!') !== false) {
1165
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1166
1167
            return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists);
1168
        }
1169
1170
        // Named range?
1171
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&
@@ 1263-1267 (lines=5) @@
1260
    public function cellExists($pCoordinate = 'A1')
1261
    {
1262
        // Worksheet reference?
1263
        if (strpos($pCoordinate, '!') !== false) {
1264
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1265
1266
            return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1]));
1267
        }
1268
1269
        // Named range?
1270
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&