Code Duplication    Length = 6-6 lines in 2 locations

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);

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

@@ 582-587 (lines=6) @@
579
        if ($this->getRequest()->isPost()) {
580
            $data = $this->getRequest()->getPost()->toArray();
581
            $form->setData($data);
582
            if ($form->isValid()) {
583
                $result = $this->getGameService()->sendShareMail($data, $this->game, $this->user, $lastEntry);
584
                if ($result) {
585
                    $statusMail = true;
586
                }
587
            }
588
        }
589
590
        $viewModel->setVariables(array(