Code Duplication    Length = 8-12 lines in 2 locations

src/Controller/Frontend/GameController.php 2 locations

@@ 875-886 (lines=12) @@
872
                        array('id' => $this->game->getIdentifier())
873
                    )
874
                );
875
            } else {
876
                if ($redirect != "") {
877
                    return $this->redirect()->toUrl($redirect);
878
                } else {
879
                    return $this->redirect()->toUrl(
880
                        $this->frontendUrl()->fromRoute(
881
                            $this->game->getClassType().'/'.$this->game->nextStep('index'),
882
                            array('id' => $this->game->getIdentifier())
883
                        )
884
                    );
885
                }
886
            }
887
        }
888
889
        $form->setAttribute(
@@ 928-935 (lines=8) @@
925
        $pguserOptions = $this->getServiceLocator()->get('playgrounduser_module_options');
926
        $userOptions = $this->getServiceLocator()->get('zfcuser_module_options');
927
928
        if ($this->zfcUserAuthentication()->hasIdentity()) {
929
            return $this->redirect()->toUrl(
930
                $this->frontendUrl()->fromRoute(
931
                    $this->game->getClassType().'/'.$this->game->nextStep('index'),
932
                    array('id' => $this->game->getIdentifier())
933
                )
934
            );
935
        }
936
        $request       = $this->getRequest();
937
        $service       = $this->getServiceLocator()->get('zfcuser_user_service');
938
        $form          = $this->getServiceLocator()->get('playgroundgame_register_form');