Code Duplication    Length = 20-21 lines in 2 locations

src/Controller/Frontend/GameController.php 2 locations

@@ 752-771 (lines=20) @@
749
        return $viewModel;
750
    }
751
752
    public function fbshareAction()
753
    {
754
        $viewModel = new JsonModel();
755
        $viewModel->setTerminal(true);
756
        $fbId = $this->params()->fromQuery('fbId');
757
        if (!$this->game) {
758
            return $this->errorJson();
759
        }
760
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
761
        if (!$entry) {
762
            return $this->errorJson();
763
        }
764
        if (!$fbId) {
765
            return $this->errorJson();
766
        }
767
768
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
769
770
        return $this->successJson();
771
    }
772
773
    public function fbrequestAction()
774
    {
@@ 816-836 (lines=21) @@
813
        return $this->successJson();
814
    }
815
816
    public function googleAction()
817
    {
818
        $viewModel = new ViewModel();
819
        $viewModel->setTerminal(true);
820
        $googleId = $this->params()->fromQuery('googleId');
821
822
        if (!$this->game) {
823
            return $this->errorJson();
824
        }
825
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
826
        if (!$entry) {
827
            return $this->errorJson();
828
        }
829
        if (!$googleId) {
830
            return $this->errorJson();
831
        }
832
833
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
834
835
        return $this->successJson();
836
    }
837
838
    public function optinAction()
839
    {