Code Duplication    Length = 5-5 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 1178-1182 (lines=5) @@
1175
        }
1176
1177
        // Worksheet reference?
1178
        if (strpos($pCoordinate, '!') !== false) {
1179
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1180
1181
            return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists);
1182
        }
1183
1184
        // Named range?
1185
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&
@@ 1277-1281 (lines=5) @@
1274
    public function cellExists($pCoordinate = 'A1')
1275
    {
1276
        // Worksheet reference?
1277
        if (strpos($pCoordinate, '!') !== false) {
1278
            $worksheetReference = self::extractSheetTitle($pCoordinate, true);
1279
1280
            return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1]));
1281
        }
1282
1283
        // Named range?
1284
        if ((!preg_match('/^' . Calculation::CALCULATION_REGEXP_CELLREF . '$/i', $pCoordinate, $matches)) &&