Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 630-649 (lines=20) @@
627
        return $viewModel;
628
    }
629
630
    public function fbshareAction()
631
    {
632
        $viewModel = new JsonModel();
633
        $viewModel->setTerminal(true);
634
        $fbId = $this->params()->fromQuery('fbId');
635
        if (!$this->game) {
636
            return $this->errorJson();
637
        }
638
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
639
        if (! $entry) {
640
            return $this->errorJson();
641
        }
642
        if (!$fbId) {
643
            return $this->errorJson();
644
        }
645
    
646
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
647
    
648
        return $this->successJson();
649
    }
650
    
651
    public function fbrequestAction()
652
    {
@@ 694-714 (lines=21) @@
691
        return $this->successJson();
692
    }
693
    
694
    public function googleAction()
695
    {
696
        $viewModel = new ViewModel();
697
        $viewModel->setTerminal(true);
698
        $googleId = $this->params()->fromQuery('googleId');
699
700
        if (!$this->game) {
701
            return $this->errorJson();
702
        }
703
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
704
        if (! $entry) {
705
            return $this->errorJson();
706
        }
707
        if (!$googleId) {
708
            return $this->errorJson();
709
        }
710
    
711
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
712
    
713
        return $this->successJson();
714
    }
715
716
    public function optinAction()
717
    {