Code Duplication    Length = 11-11 lines in 2 locations

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

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