Code Duplication    Length = 11-11 lines in 2 locations

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

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