Code Duplication    Length = 11-11 lines in 2 locations

module/Jobs/src/Jobs/Entity/Job.php 2 locations

@@ 649-659 (lines=11) @@
646
     * @see \Jobs\Entity\JobInterface::setDatePublishStart()
647
     * @return $this
648
     */
649
    public function setDatePublishStart($datePublishStart = null)
650
    {
651
        if (!isset($datePublishStart) || is_string($datePublishStart)) {
652
            $datePublishStart = new \DateTime($datePublishStart);
653
        } else if (!$datePublishStart instanceOf \DateTime) {
654
            throw new \InvalidArgumentException('Expected object of type \DateTime');
655
        }
656
657
        $this->datePublishStart = $datePublishStart;
658
        return $this;
659
    }
660
661
    /**
662
     * (non-PHPdoc)
@@ 675-685 (lines=11) @@
672
     * @see \Jobs\Entity\JobInterface::setDatePublishEnd()
673
     * @return $this
674
     */
675
    public function setDatePublishEnd($datePublishEnd = null)
676
    {
677
        if (is_string($datePublishEnd)) {
678
            $datePublishEnd = new \DateTime($datePublishEnd);
679
        } else if (!$datePublishEnd instanceOf \DateTime) {
680
            throw new \InvalidArgumentException('Expected object of type \DateTime');
681
        }
682
683
        $this->datePublishEnd = $datePublishEnd;
684
        return $this;
685
    }
686
687
    /**
688
     * Modifies the state of an application.