Code Duplication    Length = 18-19 lines in 2 locations

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

@@ 785-803 (lines=19) @@
782
783
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
784
785
            if (!$logged) {
786
                $this->flashMessenger()->addMessage(
787
                    'Authentication failed. Please try again.'
788
                );
789
790
                return $this->redirect()->toUrl(
791
                    $this->frontendUrl()->fromRoute(
792
                        $this->game->getClassType().'/login',
793
                        array('id' => $this->game->getIdentifier())
794
                    )
795
                );
796
            } else {
797
                return $this->redirect()->toUrl(
798
                    $this->frontendUrl()->fromRoute(
799
                        $this->game->getClassType().'/'.$this->game->nextStep('index'),
800
                        array('id' => $this->game->getIdentifier())
801
                    )
802
                );
803
            }
804
        }
805
806
        $form->setAttribute(
@@ 1063-1080 (lines=18) @@
1060
1061
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
1062
1063
            if ($logged) {
1064
                return $this->redirect()->toUrl(
1065
                    $this->frontendUrl()->fromRoute(
1066
                        $this->game->getClassType().'/'.$this->game->nextStep('index'),
1067
                        array('id' => $this->game->getIdentifier())
1068
                    )
1069
                );
1070
            } else {
1071
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
1072
                    'Authentication failed. Please try again.'
1073
                );
1074
                return $this->redirect()->toUrl(
1075
                    $this->frontendUrl()->fromRoute(
1076
                        $this->game->getClassType().'/login',
1077
                        array('id' => $this->game->getIdentifier())
1078
                    )
1079
                );
1080
            }
1081
        }
1082
1083
        $redirect = $this->frontendUrl()->fromRoute(