Code Duplication    Length = 8-12 lines in 2 locations

src/Controller/Frontend/GameController.php 2 locations

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