Code Duplication    Length = 17-17 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/GameController.php 1 location

@@ 828-844 (lines=17) @@
825
            );
826
        }
827
    
828
        if (!$user && !$game->getAnonymousAllowed()) {
829
            $redirect = urlencode(
830
                $this->frontendUrl()->fromRoute(
831
                    'postvote/result',
832
                    array(
833
                        'id' => $game->getIdentifier(),
834
                        'channel' => $this->getEvent()->getRouteMatch()->getParam('channel')
835
                    )
836
                )
837
            );
838
            return $this->redirect()->toUrl(
839
                $this->frontendUrl()->fromRoute(
840
                    'zfcuser/register',
841
                    array('channel' => $this->getEvent()->getRouteMatch()->getParam('channel'))
842
                ) . '?redirect='.$redirect
843
            );
844
        }
845
    
846
        $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form');
847
        $form->setAttribute('method', 'post');

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 1 location

@@ 821-837 (lines=17) @@
818
        // With core shortener helper
819
        $socialLinkUrl = $this->shortenUrl()->shortenUrl($socialLinkUrl);
820
    
821
        if (!$user && !$game->getAnonymousAllowed()) {
822
            $redirect = urlencode(
823
                $this->frontendUrl()->fromRoute(
824
                    'postvote/result',
825
                    array(
826
                        'id' => $game->getIdentifier(),
827
                        'channel' => $this->getEvent()->getRouteMatch()->getParam('channel')
828
                    )
829
                )
830
            );
831
            return $this->redirect()->toUrl(
832
                $this->frontendUrl()->fromRoute(
833
                    'zfcuser/register',
834
                    array('channel' => $this->getEvent()->getRouteMatch()->getParam('channel'))
835
                ) . '?redirect='.$redirect
836
            );
837
        }
838
    
839
        $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form');
840
        $form->setAttribute('method', 'post');