Code Duplication    Length = 10-10 lines in 2 locations

code/model/DMSDocument.php 2 locations

@@ 557-566 (lines=10) @@
554
     *
555
     * @return DMSDocument
556
     */
557
    public function embargoUntilDate($datetime, $write = true)
558
    {
559
        $this->EmbargoedUntilDate = DBField::create_field('SS_Datetime', $datetime)->Format('Y-m-d H:i:s');
560
561
        if ($write) {
562
            $this->write();
563
        }
564
565
        return $this;
566
    }
567
568
    /**
569
     * Clears any previously set embargos, so the Document always shows up in
@@ 620-629 (lines=10) @@
617
     *
618
     * @return DMSDocument
619
     */
620
    public function expireAtDate($datetime, $write = true)
621
    {
622
        $this->ExpireAtDate = DBField::create_field('SS_Datetime', $datetime)->Format('Y-m-d H:i:s');
623
624
        if ($write) {
625
            $this->write();
626
        }
627
628
        return $this;
629
    }
630
631
    /**
632
     * Clears any previously set expiry.