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(
@@ 1061-1078 (lines=18) @@
1058
1059
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
1060
1061
            if ($logged) {
1062
                return $this->redirect()->toUrl(
1063
                    $this->frontendUrl()->fromRoute(
1064
                        $this->game->getClassType().'/'.$this->game->nextStep('index'),
1065
                        array('id' => $this->game->getIdentifier())
1066
                    )
1067
                );
1068
            } else {
1069
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
1070
                    'Authentication failed. Please try again.'
1071
                );
1072
                return $this->redirect()->toUrl(
1073
                    $this->frontendUrl()->fromRoute(
1074
                        $this->game->getClassType().'/login',
1075
                        array('id' => $this->game->getIdentifier())
1076
                    )
1077
                );
1078
            }
1079
        }
1080
1081
        $redirect = $this->frontendUrl()->fromRoute(