Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 571-590 (lines=20) @@
568
        return $viewModel;
569
    }
570
    
571
    public function fbshareAction()
572
    {
573
        $viewModel = new JsonModel();
574
        $viewModel->setTerminal(true);
575
        $fbId = $this->params()->fromQuery('fbId');
576
        if (!$this->game) {
577
            return $this->errorJson();
578
        }
579
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
580
        if (! $entry) {
581
            return $this->errorJson();
582
        }
583
        if (!$fbId) {
584
            return $this->errorJson();
585
        }
586
    
587
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
588
    
589
        return $this->successJson();
590
    }
591
    
592
    public function fbrequestAction()
593
    {
@@ 635-655 (lines=21) @@
632
        return $this->successJson();
633
    }
634
    
635
    public function googleAction()
636
    {
637
        $viewModel = new ViewModel();
638
        $viewModel->setTerminal(true);
639
        $googleId = $this->params()->fromQuery('googleId');
640
641
        if (!$this->game) {
642
            return $this->errorJson();
643
        }
644
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
645
        if (! $entry) {
646
            return $this->errorJson();
647
        }
648
        if (!$googleId) {
649
            return $this->errorJson();
650
        }
651
    
652
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
653
    
654
        return $this->successJson();
655
    }
656
657
    public function optinAction()
658
    {