Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 556-566 (lines=11) @@
553
     * @see \Jobs\Entity\JobInterface::setDatePublishStart()
554
     * @return $this
555
     */
556
    public function setDatePublishStart($datePublishStart = null)
557
    {
558
        if (!isset($datePublishStart) || is_string($datePublishStart)) {
559
            $datePublishStart = new \DateTime($datePublishStart);
560
        } else if (!$datePublishStart instanceOf \DateTime) {
561
            throw new \InvalidArgumentException('Expected object of type \DateTime');
562
        }
563
564
        $this->datePublishStart = $datePublishStart;
565
        return $this;
566
    }
567
568
    /**
569
     * (non-PHPdoc)
@@ 582-592 (lines=11) @@
579
     * @see \Jobs\Entity\JobInterface::setDatePublishEnd()
580
     * @return $this
581
     */
582
    public function setDatePublishEnd($datePublishEnd = null)
583
    {
584
        if (is_string($datePublishEnd)) {
585
            $datePublishEnd = new \DateTime($datePublishEnd);
586
        } else if (!$datePublishEnd instanceOf \DateTime) {
587
            throw new \InvalidArgumentException('Expected object of type \DateTime');
588
        }
589
590
        $this->datePublishEnd = $datePublishEnd;
591
        return $this;
592
    }
593
594
    /**
595
     * Modifies the state of an application.