Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 563-568 (lines=6) @@
560
        if ($this->getRequest()->isPost()) {
561
            $data = $this->getRequest()->getPost()->toArray();
562
            $form->setData($data);
563
            if ($form->isValid()) {
564
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
565
                if ($result) {
566
                    $statusMail = true;
567
                }
568
            }
569
        }
570
571
        $viewModel->setVariables(array(

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

@@ 936-941 (lines=6) @@
933
        if ($this->getRequest()->isPost()) {
934
            $data = $this->getRequest()->getPost()->toArray();
935
            $form->setData($data);
936
            if ($form->isValid()) {
937
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
938
                if ($result) {
939
                    $statusMail = true;
940
                }
941
            }
942
        }
943
944
        $viewModel = $this->buildView($this->game);