Code Duplication    Length = 20-21 lines in 2 locations

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

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