Code Duplication    Length = 20-21 lines in 2 locations

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

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