Code Duplication    Length = 10-10 lines in 2 locations

src/PhpSpreadsheet/Cell.php 2 locations

@@ 414-423 (lines=10) @@
411
     *
412
     * @return Cell
413
     */
414
    public function setDataValidation(Cell\DataValidation $pDataValidation = null)
415
    {
416
        if (!isset($this->parent)) {
417
            throw new Exception('Cannot set data validation for cell that is not bound to a worksheet');
418
        }
419
420
        $this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation);
421
422
        return $this->notifyCacheController();
423
    }
424
425
    /**
426
     *    Does this cell contain a Hyperlink?
@@ 466-475 (lines=10) @@
463
     *
464
     * @return Cell
465
     */
466
    public function setHyperlink(Cell\Hyperlink $pHyperlink = null)
467
    {
468
        if (!isset($this->parent)) {
469
            throw new Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
470
        }
471
472
        $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);
473
474
        return $this->notifyCacheController();
475
    }
476
477
    /**
478
     * Get parent worksheet.