Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 633-643 (lines=11) @@
630
     * @see \Jobs\Entity\JobInterface::setDatePublishStart()
631
     * @return $this
632
     */
633
    public function setDatePublishStart($datePublishStart = null)
634
    {
635
        if (!isset($datePublishStart) || is_string($datePublishStart)) {
636
            $datePublishStart = new \DateTime($datePublishStart);
637
        } else if (!$datePublishStart instanceOf \DateTime) {
638
            throw new \InvalidArgumentException('Expected object of type \DateTime');
639
        }
640
641
        $this->datePublishStart = $datePublishStart;
642
        return $this;
643
    }
644
645
    /**
646
     * (non-PHPdoc)
@@ 659-669 (lines=11) @@
656
     * @see \Jobs\Entity\JobInterface::setDatePublishEnd()
657
     * @return $this
658
     */
659
    public function setDatePublishEnd($datePublishEnd = null)
660
    {
661
        if (is_string($datePublishEnd)) {
662
            $datePublishEnd = new \DateTime($datePublishEnd);
663
        } else if (!$datePublishEnd instanceOf \DateTime) {
664
            throw new \InvalidArgumentException('Expected object of type \DateTime');
665
        }
666
667
        $this->datePublishEnd = $datePublishEnd;
668
        return $this;
669
    }
670
671
    /**
672
     * Modifies the state of an application.