Code Duplication    Length = 10-10 lines in 2 locations

code/model/DMSDocument.php 2 locations

@@ 393-402 (lines=10) @@
390
     *
391
     * @return DMSDocument
392
     */
393
    public function embargoUntilDate($datetime, $write = true)
394
    {
395
        $this->EmbargoedUntilDate = DBField::create_field('SS_Datetime', $datetime)->Format('Y-m-d H:i:s');
396
397
        if ($write) {
398
            $this->write();
399
        }
400
401
        return $this;
402
    }
403
404
    /**
405
     * Clears any previously set embargos, so the Document always shows up in
@@ 456-465 (lines=10) @@
453
     *
454
     * @return DMSDocument
455
     */
456
    public function expireAtDate($datetime, $write = true)
457
    {
458
        $this->ExpireAtDate = DBField::create_field('SS_Datetime', $datetime)->Format('Y-m-d H:i:s');
459
460
        if ($write) {
461
            $this->write();
462
        }
463
464
        return $this;
465
    }
466
467
    /**
468
     * Clears any previously set expiry.