Code Duplication    Length = 10-10 lines in 2 locations

src/PhpSpreadsheet/Cell/Cell.php 2 locations

@@ 399-408 (lines=10) @@
396
     *
397
     * @return Cell
398
     */
399
    public function setDataValidation(DataValidation $pDataValidation = null)
400
    {
401
        if (!isset($this->parent)) {
402
            throw new Exception('Cannot set data validation for cell that is not bound to a worksheet');
403
        }
404
405
        $this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation);
406
407
        return $this->updateInCollection();
408
    }
409
410
    /**
411
     * Does this cell contain valid value?
@@ 463-472 (lines=10) @@
460
     *
461
     * @return Cell
462
     */
463
    public function setHyperlink(Hyperlink $pHyperlink = null)
464
    {
465
        if (!isset($this->parent)) {
466
            throw new Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
467
        }
468
469
        $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);
470
471
        return $this->updateInCollection();
472
    }
473
474
    /**
475
     * Get cell collection.