Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 517-536 (lines=20) @@
514
        return $viewModel;
515
    }
516
    
517
    public function fbshareAction()
518
    {
519
        $viewModel = new JsonModel();
520
        $viewModel->setTerminal(true);
521
        $fbId = $this->params()->fromQuery('fbId');
522
        if (!$this->game) {
523
            return $this->errorJson();
524
        }
525
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
526
        if (! $entry) {
527
            return $this->errorJson();
528
        }
529
        if (!$fbId) {
530
            return $this->errorJson();
531
        }
532
    
533
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
534
    
535
        return $this->successJson();
536
    }
537
    
538
    public function fbrequestAction()
539
    {
@@ 581-601 (lines=21) @@
578
        return $this->successJson();
579
    }
580
    
581
    public function googleAction()
582
    {
583
        $viewModel = new ViewModel();
584
        $viewModel->setTerminal(true);
585
        $googleId = $this->params()->fromQuery('googleId');
586
587
        if (!$this->game) {
588
            return $this->errorJson();
589
        }
590
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
591
        if (! $entry) {
592
            return $this->errorJson();
593
        }
594
        if (!$googleId) {
595
            return $this->errorJson();
596
        }
597
    
598
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
599
    
600
        return $this->successJson();
601
    }
602
603
    public function optinAction()
604
    {