Code Duplication    Length = 12-12 lines in 2 locations

src/PlaygroundGame/Controller/Frontend/MissionController.php 1 location

@@ 224-235 (lines=12) @@
221
            ));
222
        }*/
223
224
        if (!$this->user && !$this->game->getAnonymousAllowed()) {
225
            $redirect = urlencode(
226
                $this->frontendUrl()->fromRoute(
227
                    'mission/result',
228
                    array('id' => $this->game->getIdentifier())
229
                )
230
            );
231
232
            return $this->redirect()->toUrl(
233
                $this->frontendUrl()->fromRoute('zfcuser/register') . '?redirect='.$redirect
234
            );
235
        }
236
237
        $form = $this->getServiceLocator()->get('playgroundgame_sharemail_form');
238
        $form->setAttribute('method', 'post');

src/PlaygroundGame/Controller/Frontend/PostVoteController.php 1 location

@@ 124-135 (lines=12) @@
121
                $data = $form->getData();
122
                $post = $this->getGameService()->createPost($data, $this->game, $this->user, $form);
123
124
                if ($post && !empty($this->game->nextStep('play'))) {
125
                    // determine the route where the user should go
126
                    $redirectUrl = $this->frontendUrl()->fromRoute(
127
                        'postvote/'.$this->game->nextStep('play'),
128
                        array('id' => $this->game->getIdentifier())
129
                    );
130
131
                    return $this->redirect()->toUrl($redirectUrl);
132
                }
133
            } else {
134
                $messages = $form->getMessages();
135
                $viewModel = $this->buildView($this->game);
136
                $viewModel->setVariables(array(
137
                    'success' => false,
138
                    'message' => implode(',', $messages['title']),