Code Duplication    Length = 12-12 lines in 3 locations

src/PlaygroundGame/Entity/Game.php 3 locations

@@ 815-826 (lines=12) @@
812
        return $this;
813
    }
814
815
    public function isClosed()
816
    {
817
        $today = new DateTime('now');
818
        if (($this->getCloseDate() && $this->getCloseDate()->setTime(23, 59, 59) < $today)
819
            ||
820
            ($this->getPublicationDate() && $this->getPublicationDate()->setTime(0, 0, 0) > $today)
821
        ) {
822
            return true;
823
        }
824
825
        return false;
826
    }
827
828
    public function isOpen()
829
    {
@@ 833-844 (lines=12) @@
830
        return !$this->isClosed();
831
    }
832
833
    public function isStarted()
834
    {
835
        $today = new DateTime('now');
836
        if (((!$this->getStartDate() || $this->getStartDate()->setTime(0, 0, 0) <= $today))
837
                &&
838
                (!$this->getEndDate() || $this->getEndDate()->setTime(23, 59, 59) > $today)
839
        ) {
840
            return true;
841
        }
842
843
        return false;
844
    }
845
846
    public function isFinished()
847
    {
@@ 846-857 (lines=12) @@
843
        return false;
844
    }
845
846
    public function isFinished()
847
    {
848
        $today = new DateTime('now');
849
        if ($this->getEndDate() && $this->getEndDate()->setTime(23, 59, 59) <= $today
850
            ||
851
            ($this->getCloseDate() && $this->getCloseDate()->setTime(23, 59, 59) <= $today)
852
        ) {
853
            return true;
854
        }
855
856
        return false;
857
    }
858
859
    public function isOnline()
860
    {