Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 602-612 (lines=11) @@
599
     * @see \Jobs\Entity\JobInterface::setDatePublishStart()
600
     * @return $this
601
     */
602
    public function setDatePublishStart($datePublishStart = null)
603
    {
604
        if (!isset($datePublishStart) || is_string($datePublishStart)) {
605
            $datePublishStart = new \DateTime($datePublishStart);
606
        } else if (!$datePublishStart instanceOf \DateTime) {
607
            throw new \InvalidArgumentException('Expected object of type \DateTime');
608
        }
609
610
        $this->datePublishStart = $datePublishStart;
611
        return $this;
612
    }
613
614
    /**
615
     * (non-PHPdoc)
@@ 628-638 (lines=11) @@
625
     * @see \Jobs\Entity\JobInterface::setDatePublishEnd()
626
     * @return $this
627
     */
628
    public function setDatePublishEnd($datePublishEnd = null)
629
    {
630
        if (is_string($datePublishEnd)) {
631
            $datePublishEnd = new \DateTime($datePublishEnd);
632
        } else if (!$datePublishEnd instanceOf \DateTime) {
633
            throw new \InvalidArgumentException('Expected object of type \DateTime');
634
        }
635
636
        $this->datePublishEnd = $datePublishEnd;
637
        return $this;
638
    }
639
640
    /**
641
     * Modifies the state of an application.