Code Duplication    Length = 20-21 lines in 2 locations

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

@@ 507-526 (lines=20) @@
504
        return $viewModel;
505
    }
506
    
507
    public function fbshareAction()
508
    {
509
        $viewModel = new JsonModel();
510
        $viewModel->setTerminal(true);
511
        $fbId = $this->params()->fromQuery('fbId');
512
        if (!$this->game) {
513
            return $this->errorJson();
514
        }
515
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
516
        if (! $entry) {
517
            return $this->errorJson();
518
        }
519
        if (!$fbId) {
520
            return $this->errorJson();
521
        }
522
    
523
        $this->getGameService()->postFbWall($fbId, $this->game, $this->user, $entry);
524
    
525
        return $this->successJson();
526
    }
527
    
528
    public function fbrequestAction()
529
    {
@@ 571-591 (lines=21) @@
568
        return $this->successJson();
569
    }
570
    
571
    public function googleAction()
572
    {
573
        $viewModel = new ViewModel();
574
        $viewModel->setTerminal(true);
575
        $googleId = $this->params()->fromQuery('googleId');
576
577
        if (!$this->game) {
578
            return $this->errorJson();
579
        }
580
        $entry = $this->getGameService()->checkExistingEntry($this->game, $this->user);
581
        if (! $entry) {
582
            return $this->errorJson();
583
        }
584
        if (!$googleId) {
585
            return $this->errorJson();
586
        }
587
    
588
        $this->getGameService()->postGoogle($googleId, $this->game, $this->user, $entry);
589
    
590
        return $this->successJson();
591
    }
592
593
    public function optinAction()
594
    {