Code Duplication    Length = 21-22 lines in 2 locations

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

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