Code Duplication    Length = 6-6 lines in 2 locations

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

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

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

@@ 539-544 (lines=6) @@
536
        if ($this->getRequest()->isPost()) {
537
            $data = $this->getRequest()->getPost()->toArray();
538
            $form->setData($data);
539
            if ($form->isValid()) {
540
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
541
                if ($result) {
542
                    $statusMail = true;
543
                }
544
            }
545
        }
546
547
        $viewModel->setVariables(array(