Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 684-689 (lines=6) @@
681
        if ($this->getRequest()->isPost()) {
682
            $data = $this->getRequest()->getPost()->toArray();
683
            $form->setData($data);
684
            if ($form->isValid()) {
685
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
686
                if ($result) {
687
                    $statusMail = true;
688
                }
689
            }
690
        }
691
692
        $viewModel = $this->buildView($this->game);

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(