Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 611-630 (lines=20) @@
608
        return $viewModel;
609
    }
610
611
    public function fbshareAction()
612
    {
613
        $viewModel = new JsonModel();
614
        $viewModel->setTerminal(true);
615
        $fbId = $this->params()->fromQuery('fbId');
616
        if (!$this->game) {
617
            return $this->errorJson();
618
        }
619
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
620
        if (! $entry) {
621
            return $this->errorJson();
622
        }
623
        if (!$fbId) {
624
            return $this->errorJson();
625
        }
626
    
627
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
628
    
629
        return $this->successJson();
630
    }
631
    
632
    public function fbrequestAction()
633
    {
@@ 675-695 (lines=21) @@
672
        return $this->successJson();
673
    }
674
    
675
    public function googleAction()
676
    {
677
        $viewModel = new ViewModel();
678
        $viewModel->setTerminal(true);
679
        $googleId = $this->params()->fromQuery('googleId');
680
681
        if (!$this->game) {
682
            return $this->errorJson();
683
        }
684
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
685
        if (! $entry) {
686
            return $this->errorJson();
687
        }
688
        if (!$googleId) {
689
            return $this->errorJson();
690
        }
691
    
692
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
693
    
694
        return $this->successJson();
695
    }
696
697
    public function optinAction()
698
    {