Code Duplication    Length = 20-21 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/GameController.php 2 locations

@@ 721-740 (lines=20) @@
718
        return $viewModel;
719
    }
720
721
    public function fbshareAction()
722
    {
723
        $viewModel = new JsonModel();
724
        $viewModel->setTerminal(true);
725
        $fbId = $this->params()->fromQuery('fbId');
726
        if (!$this->game) {
727
            return $this->errorJson();
728
        }
729
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
730
        if (!$entry) {
731
            return $this->errorJson();
732
        }
733
        if (!$fbId) {
734
            return $this->errorJson();
735
        }
736
737
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
738
739
        return $this->successJson();
740
    }
741
742
    public function fbrequestAction()
743
    {
@@ 785-805 (lines=21) @@
782
        return $this->successJson();
783
    }
784
785
    public function googleAction()
786
    {
787
        $viewModel = new ViewModel();
788
        $viewModel->setTerminal(true);
789
        $googleId = $this->params()->fromQuery('googleId');
790
791
        if (!$this->game) {
792
            return $this->errorJson();
793
        }
794
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
795
        if (!$entry) {
796
            return $this->errorJson();
797
        }
798
        if (!$googleId) {
799
            return $this->errorJson();
800
        }
801
802
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
803
804
        return $this->successJson();
805
    }
806
807
    public function optinAction()
808
    {