Code Duplication    Length = 21-24 lines in 2 locations

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

@@ 641-661 (lines=21) @@
638
639
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
640
641
            if ($logged) {
642
                return $this->redirect()->toUrl(
643
                    $this->frontendUrl()->fromRoute(
644
                        $this->game->getClassType() . '/' . $this->game->nextStep('index'),
645
                        array('id' => $this->game->getIdentifier())
646
                    )
647
                );
648
            } else {
649
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
650
                    'Authentication failed. Please try again.'
651
                );
652
                return $this->redirect()->toUrl(
653
                    $this->frontendUrl()->fromRoute(
654
                        $this->game->getClassType() . '/login',
655
                        array('id' => $this->game->getIdentifier())
656
                    )
657
                );
658
            }
659
        }
660
        
661
        $form->setAttribute(
662
            'action',
663
            $this->frontendUrl()->fromRoute(
664
                $this->game->getClassType().'/login',
@@ 838-861 (lines=24) @@
835
836
            $logged = $this->forward()->dispatch('playgrounduser_user', array('action' => 'ajaxauthenticate'));
837
838
            if ($logged) {
839
                return $this->redirect()->toUrl(
840
                    $this->frontendUrl()->fromRoute(
841
                        $this->game->getClassType() . '/' . $this->game->nextStep('index'),
842
                        array(
843
                            'id' => $this->game->getIdentifier(),
844
                            
845
                        )
846
                    )
847
                );
848
            } else {
849
                $this->flashMessenger()->setNamespace('zfcuser-login-form')->addMessage(
850
                    'Authentication failed. Please try again.'
851
                );
852
                return $this->redirect()->toUrl(
853
                    $this->frontendUrl()->fromRoute(
854
                        $this->game->getClassType() . '/login',
855
                        array(
856
                            'id' => $this->game->getIdentifier(),
857
                            
858
                        )
859
                    )
860
                );
861
            }
862
        }
863
864
        $redirect = $this->frontendUrl()->fromRoute(