Code Duplication    Length = 6-6 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/GameController.php 1 location

@@ 557-562 (lines=6) @@
554
        if ($this->getRequest()->isPost()) {
555
            $data = $this->getRequest()->getPost()->toArray();
556
            $form->setData($data);
557
            if ($form->isValid()) {
558
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
559
                if ($result) {
560
                    $statusMail = true;
561
                }
562
            }
563
        }
564
565
        $viewModel->setVariables(array(

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 1 location

@@ 793-798 (lines=6) @@
790
        if ($this->getRequest()->isPost()) {
791
            $data = $this->getRequest()->getPost()->toArray();
792
            $form->setData($data);
793
            if ($form->isValid()) {
794
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
795
                if ($result) {
796
                    $statusMail = true;
797
                }
798
            }
799
        }
800
801
        $viewModel = $this->buildView($this->game);