Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 652-671 (lines=20) @@
649
        return $viewModel;
650
    }
651
652
    public function fbshareAction()
653
    {
654
        $viewModel = new JsonModel();
655
        $viewModel->setTerminal(true);
656
        $fbId = $this->params()->fromQuery('fbId');
657
        if (!$this->game) {
658
            return $this->errorJson();
659
        }
660
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
661
        if (!$entry) {
662
            return $this->errorJson();
663
        }
664
        if (!$fbId) {
665
            return $this->errorJson();
666
        }
667
668
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
669
670
        return $this->successJson();
671
    }
672
673
    public function fbrequestAction()
674
    {
@@ 716-736 (lines=21) @@
713
        return $this->successJson();
714
    }
715
716
    public function googleAction()
717
    {
718
        $viewModel = new ViewModel();
719
        $viewModel->setTerminal(true);
720
        $googleId = $this->params()->fromQuery('googleId');
721
722
        if (!$this->game) {
723
            return $this->errorJson();
724
        }
725
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
726
        if (!$entry) {
727
            return $this->errorJson();
728
        }
729
        if (!$googleId) {
730
            return $this->errorJson();
731
        }
732
733
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
734
735
        return $this->successJson();
736
    }
737
738
    public function optinAction()
739
    {