Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 1154-1157 (lines=4) @@
1151
        }
1152
1153
        // Worksheet reference?
1154
        if (strpos($pCoordinate, '!') !== false) {
1155
            $worksheetReference = Worksheet::extractSheetTitle($pCoordinate, true);
1156
            return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists);
1157
        }
1158
1159
        // Named range?
1160
        if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&
@@ 1251-1254 (lines=4) @@
1248
    public function cellExists($pCoordinate = 'A1')
1249
    {
1250
       // Worksheet reference?
1251
        if (strpos($pCoordinate, '!') !== false) {
1252
            $worksheetReference = Worksheet::extractSheetTitle($pCoordinate, true);
1253
            return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1]));
1254
        }
1255
1256
        // Named range?
1257
        if ((!preg_match('/^'.Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) &&