Code Duplication    Length = 18-19 lines in 2 locations

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

@@ 650-668 (lines=19) @@
647
648
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
649
650
            if (!$logged) {
651
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
652
                    'Authentication failed. Please try again.'
653
                );
654
                
655
                return $this->redirect()->toUrl(
656
                    $this->frontendUrl()->fromRoute(
657
                        $this->game->getClassType() . '/login',
658
                        array('id' => $this->game->getIdentifier())
659
                    )
660
                );
661
            } else {
662
                return $this->redirect()->toUrl(
663
                    $this->frontendUrl()->fromRoute(
664
                        $this->game->getClassType() . '/' . $this->game->nextStep('index'),
665
                        array('id' => $this->game->getIdentifier())
666
                    )
667
                );
668
            }
669
        }
670
        
671
        $form->setAttribute(
@@ 848-865 (lines=18) @@
845
846
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
847
848
            if ($logged) {
849
                return $this->redirect()->toUrl(
850
                    $this->frontendUrl()->fromRoute(
851
                        $this->game->getClassType() . '/' . $this->game->nextStep('index'),
852
                        array('id' => $this->game->getIdentifier())
853
                    )
854
                );
855
            } else {
856
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
857
                    'Authentication failed. Please try again.'
858
                );
859
                return $this->redirect()->toUrl(
860
                    $this->frontendUrl()->fromRoute(
861
                        $this->game->getClassType() . '/login',
862
                        array('id' => $this->game->getIdentifier())
863
                    )
864
                );
865
            }
866
        }
867
868
        $redirect = $this->frontendUrl()->fromRoute(